Re: [Lazarus] Menu editor unstable?

2018-03-10 Thread Bilbo47 via Lazarus
Lazarus would become unresponsive after trying to add a new menu item using
the Menu Editor. Don't know what the problem was. Got around it by manually
adding the menu item by editing the .LFM file while Lazarus was not running.
Also added the declaration and procedure body for the Click event in the
.PAS file. FPC compiler ate it up, and the new menu item's event fired as
expected. Lazarus was then able to modify the new menu item as expected.
Version 1.8.0 32/64 bit on Windows 8.0. 



--
Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-09 Thread Mattias Gaertner via Lazarus
On Wed, 10 May 2017 00:06:35 +0200 (CEST)
Michael Van Canneyt via Lazarus  wrote:

>[...]
> > I have tested here:
> > 64bit Linux Mint 18.1 Cinnamon, GTK2 version 2.24.30, Lazarus 1.9.0 
> > r54844 FPC 3.0.2 x86_64-linux-gtk2  
> 
> This is the exact version I am using. (lazarus SVN version may differ, but
> it is the day before yesterday's SVN version)
> 
> >
> > Maybe it is a problem with your GTK2 version?
> > Maybe it is a problem with your OS?  
> 
> They are the same as yours.

Maybe the bug is not in the menu editor, but in an installed package
and the menu editor is only the symptom?
Try uninstalling all unneeded packages. Does that change anything?

Mattias
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-09 Thread Michael Van Canneyt via Lazarus



On Tue, 9 May 2017, Michael W. Vogel via Lazarus wrote:


Am 09.05.2017 um 15:15 schrieb Michael Van Canneyt via Lazarus:

Hi,

I manage to reliably reproduce it !

1 Open attached project.
2 Double click MainMenu1 to edit
3 Under MenuItem5, delete MenuItem14,13,12,11
  (I use the - button in the menu editor)
4 The last menu item under MenuItem5 is then 'Action3'
5 Add new menu item (I click 'add menu item' below the Action3 item)
6 Click on Action 3
7 Click on the newly added (in step 5) MenuItem11 --->> BOOM

Never fails.

The delete step 3 is important. Without that, I don't get a crash.
I then tested deleting a single item instead of 4 items as described 
above,

then I also get a crash. So as soon as a delete is performed - boom...


Thank you for your exact explanation and test project! But sorry again, 
again I don't get it.


I have tested here:
64bit Linux Mint 18.1 Cinnamon, GTK2 version 2.24.30, Lazarus 1.9.0 
r54844 FPC 3.0.2 x86_64-linux-gtk2


This is the exact version I am using. (lazarus SVN version may differ, but
it is the day before yesterday's SVN version)



Maybe it is a problem with your GTK2 version?
Maybe it is a problem with your OS?


They are the same as yours.



Maybe it was fixed in meantime?
Maybe you have a broken installation of Lazarus?


Define broken ? It's a clean SVN update.

Maybe it is a timing problem (as my development pc was out of order, I 
bought a relativ fast Core I5, so I'm not fast enough to click)?


Clicking speed has nothing to do with it. 
I can wait a second, 2 seconds. Doesn't matter.


The only thing that matters is the delete.

I wish to point out that there is a LCL warning about freeing an item with
LCLCount>1, which clearly points at a logic error: something is probably 
being freed twice.


Maybe it is better to open a bugreport about that issue? Then we can 
better gather informations about it.


I will post the steps and project in the bugtracker.

Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-09 Thread Michael W. Vogel via Lazarus

Am 09.05.2017 um 15:15 schrieb Michael Van Canneyt via Lazarus:

Hi,

I manage to reliably reproduce it !

1 Open attached project.
2 Double click MainMenu1 to edit
3 Under MenuItem5, delete MenuItem14,13,12,11
  (I use the - button in the menu editor)
4 The last menu item under MenuItem5 is then 'Action3'
5 Add new menu item (I click 'add menu item' below the Action3 item)
6 Click on Action 3
7 Click on the newly added (in step 5) MenuItem11 --->> BOOM

Never fails.

The delete step 3 is important. Without that, I don't get a crash.
I then tested deleting a single item instead of 4 items as described 
above,

then I also get a crash. So as soon as a delete is performed - boom...


Thank you for your exact explanation and test project! But sorry again, 
again I don't get it.


I have tested here:
64bit Linux Mint 18.1 Cinnamon, GTK2 version 2.24.30, Lazarus 1.9.0 
r54844 FPC 3.0.2 x86_64-linux-gtk2
64bit Linux Mint 17.3 KDE, GTK2 version 2.24.23, Lazarus 1.9.0 r54826 
FPC 3.0.2 x86_64-linux-gtk2
64bit OpenSuse Leap 42.2 KDE GTK2 version 2.24.31, Lazarus 1.9.0 r54809 
FPC 3.0.2 x86_64-linux-gtk2

64bit Windows 7, Lazarus 1.9.0 r54844 FPC 3.0.2 x86_64-win64-win32/win64

Maybe it is a problem with your GTK2 version?
Maybe it is a problem with your OS?
Maybe it was fixed in meantime?
Maybe you have a broken installation of Lazarus?
Maybe it is a timing problem (as my development pc was out of order, I 
bought a relativ fast Core I5, so I'm not fast enough to click)?


Maybe it is better to open a bugreport about that issue? Then we can 
better gather informations about it.


Is there anybody else how can create a crash with the test project and 
the steps above?


Michl
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-09 Thread Michael Van Canneyt via Lazarus




- Open project
- Select a popup menu (there are several)
- Double click to edit
- Select menu item 1
- Immediatly select menu item 2


Here, the crash happens when going to the object inspector.




If you want, you can add a minimal example and explain every single step 
again, what you do, to create a crash. Then, I'll test again, but for 
now, I don't know what to do more.


I will try. I do use actions.


What Lazarus revision are you using?
Do you have installed AnchorDockingDsgn, Sparta_DockedFormEditor or 
something similar?


Hi,

I manage to reliably reproduce it !

1 Open attached project.
2 Double click MainMenu1 to edit
3 Under MenuItem5, delete MenuItem14,13,12,11
  (I use the - button in the menu editor)
4 The last menu item under MenuItem5 is then 'Action3'
5 Add new menu item (I click 'add menu item' below the Action3 item)
6 Click on Action 3
7 Click on the newly added (in step 5) MenuItem11 
--->> BOOM


Never fails.

The delete step 3 is important. Without that, I don't get a crash.
I then tested deleting a single item instead of 4 items as described above,
then I also get a crash. So as soon as a delete is performed - boom...

Michael.


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-08 Thread Michael W. Vogel via Lazarus

Am 08.05.2017 um 15:54 schrieb Michael Van Canneyt via Lazarus:


OK. It seems clear to me that something is being freed which should 
not yet be

freed:

WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the 
component is processing an event?


This indicates to me that an unforeseen order of events is happening ?
As far as I know, there is a global call to free components once the 
message processing is finished ?


Well, I hope you can reproduce it...


Sorry, I don't get it. After over two hours of testing with 64bit Linux 
Mint 18.1 Cinnamon and Lazarus 1.9.0 r54833M FPC 3.0.2 
x86_64-linux-gtk2, with new or saved projects, without or with 
AnchorDockingDsgn / Sparta_DockedFormEditor, I'm not able to create a 
crash.


I tried this steps and around:
- Open project
- Select a popup menu (there are several)
- Double click to edit
- Select menu item 1
- Immediatly select menu item 2


If you want, you can add a minimal example and explain every single step 
again, what you do, to create a crash. Then, I'll test again, but for 
now, I don't know what to do more.


What Lazarus revision are you using?
Do you have installed AnchorDockingDsgn, Sparta_DockedFormEditor or 
something similar?



Kind regards

Michl



--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-08 Thread Michael Van Canneyt via Lazarus



On Mon, 8 May 2017, Michael W. Vogel via Lazarus wrote:


Am 08.05.2017 um 15:09 schrieb Michael Van Canneyt via Lazarus:
I managed to produce a stacktrace. Hopefully this, combined with the 
stacktrace

at the end is sufficient to solve the issue.

Michael.

(gdb) cont
Continuing.
WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the 
component is processing an event?

Thread 1 "lazarus" received signal SIGSEGV, Segmentation fault.
0x in ?? ()
(gdb) bt
#0  0x in ?? ()
#1  0x009fd6f2 in SETSELECTEDSHADOW (this=0x7fffe02077b0, 
PREVSELECTEDITEM=0x7fffe37107c0, CURSELECTEDITEM=0x7fffe03c1e80, 
VIADESIGNER=false)

at ../designer/menueditor.pp:1663
#2  0x009fd49d in SETSELECTEDMENUITEM (this=0x7fffe02077b0, 
AMI=0x7fffe03c1e80, VIADESIGNER=false, PREVWASDELETED=false)

at ../designer/menueditor.pp:1617
#3  0x00a02673 in MOUSEDOWN (this=0x7fffe9371e10, 
BUTTON=MBLEFT, SHIFT=8, X=73, Y=8) at ../designer/menueditor.pp:2590
#4  0x005b29f8 in DOMOUSEDOWN (this=0x7fffe9371e10, 
MESSAGE=..., BUTTON=MBLEFT, SHIFT=0) at include/control.inc:2242
#5  0x005b2e61 in WMLBUTTONDOWN (this=0x7fffe9371e10, 
MESSAGE=...) at include/control.inc:2375
#6  0x00436562 in DISPATCH (this=0x7fffe9371e10, MESSAGE=0) at 
../inc/objpas.inc:602
#7  0x005b28fd in WNDPROC (this=0x7fffe9371e10, 
THEMESSAGE=...) at include/control.inc:2202
#8  0x005a580c in WNDPROC (this=0x7fffe9371e10, MESSAGE=...) 
at include/wincontrol.inc:5396
#9  0x007722ac in DELIVERMESSAGE (TARGET=0x7fffe9371e10, 
AMESSAGE=0) at lclmessageglue.pas:112
#10 0x0066c191 in DELIVERMESSAGE (TARGET=0x7fffe9371e10, 
AMESSAGE=0) at gtk2/gtk2proc.inc:3702
#11 0x0067aec6 in DELIVERMOUSEDOWNMESSAGE (WIDGET=0x3aced90, 
EVENT=0x3624ea0, AWINCONTROL=0x7fffe9371e10) at 
gtk2/gtk2callback.inc:2137
#12 0x0067a5c8 in GTKMOUSEBTNPRESS (WIDGET=0x32d2b80, 
EVENT=0x3624ea0, DATA=0x7fffe9371e10) at gtk2/gtk2callback.inc:1899
#13 0x76c8cafc in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x76916fa5 in g_closure_invoke () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x76928fc1 in ?? () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x769317f9 in g_signal_emit_valist () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x7693208f in g_signal_emit () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x76da48cc in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x76c8b294 in gtk_propagate_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x76c8b64b in gtk_main_do_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#21 0x7775bc4c in ?? () from 
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#22 0x76640197 in g_main_context_dispatch () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x766403f0 in ?? () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x7664049c in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x004fc6ec in APPPROCESSMESSAGES (this=0x77f75230) at 
gtk2/gtk2widgetset.inc:2338
#26 0x0049435d in HANDLEMESSAGE (this=0x77f74bf0) at 
include/application.inc:1276
#27 0x004948ac in RUNLOOP (this=0x77f74bf0) at 
include/application.inc:1413
#28 0x006585a6 in APPRUN (this=0x77f75230, ALOOP=...) at 
include/interfacebase.inc:54
#29 0x00494850 in RUN (this=0x77f74bf0) at 
include/application.inc:1401

#30 0x00420127 in main () at lazarus.pp:145
(gdb) cont
Continuing.
TApplication.HandleException Access violation
  Stack trace:
  $
  $009FD49D line 1617 of ../designer/menueditor.pp
  $00A02673 line 2590 of ../designer/menueditor.pp
  $005B29F8 line 2242 of include/control.inc
  $005B2E61 line 2375 of include/control.inc
  $00436562 line 602 of ../inc/objpas.inc
  $005B28FD line 2202 of include/control.inc
  $005A580C line 5396 of include/wincontrol.inc
  $007722AC line 112 of lclmessageglue.pas
  $0066C191 line 3702 of gtk2/gtk2proc.inc
  $0067AEC6 line 2137 of gtk2/gtk2callback.inc
  $0067A5C8 line 1899 of gtk2/gtk2callback.inc
  $76C8CAFC


As I've made some bug fixes for the Menueditor last time, I tried to 
reproduce this error. Till now I wasn't able to reproduce it on Lazarus 
Trunk revision 54826 with FPC 3.0.2 on Windows 7, 10, OpenSuse 42.2 KDE 
GTK2 or Linux Mint 17.3 KDE GTK2. I currently install on a VM a 64bit 
Linux Mint 18.1 Cinnamon (your OS?!), to test the issue there.


OK. 
It seems clear to me that something is being freed which should not yet be

freed:

WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the 
component is processing an event?


This indicates to me that an unforeseen order of events is happening ?
As far as I know, 

Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-08 Thread Michael W. Vogel via Lazarus

Am 08.05.2017 um 15:09 schrieb Michael Van Canneyt via Lazarus:
I managed to produce a stacktrace. Hopefully this, combined with the 
stacktrace

at the end is sufficient to solve the issue.

Michael.

(gdb) cont
Continuing.
WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the 
component is processing an event?

Thread 1 "lazarus" received signal SIGSEGV, Segmentation fault.
0x in ?? ()
(gdb) bt
#0  0x in ?? ()
#1  0x009fd6f2 in SETSELECTEDSHADOW (this=0x7fffe02077b0, 
PREVSELECTEDITEM=0x7fffe37107c0, CURSELECTEDITEM=0x7fffe03c1e80, 
VIADESIGNER=false)

at ../designer/menueditor.pp:1663
#2  0x009fd49d in SETSELECTEDMENUITEM (this=0x7fffe02077b0, 
AMI=0x7fffe03c1e80, VIADESIGNER=false, PREVWASDELETED=false)

at ../designer/menueditor.pp:1617
#3  0x00a02673 in MOUSEDOWN (this=0x7fffe9371e10, 
BUTTON=MBLEFT, SHIFT=8, X=73, Y=8) at ../designer/menueditor.pp:2590
#4  0x005b29f8 in DOMOUSEDOWN (this=0x7fffe9371e10, 
MESSAGE=..., BUTTON=MBLEFT, SHIFT=0) at include/control.inc:2242
#5  0x005b2e61 in WMLBUTTONDOWN (this=0x7fffe9371e10, 
MESSAGE=...) at include/control.inc:2375
#6  0x00436562 in DISPATCH (this=0x7fffe9371e10, MESSAGE=0) at 
../inc/objpas.inc:602
#7  0x005b28fd in WNDPROC (this=0x7fffe9371e10, 
THEMESSAGE=...) at include/control.inc:2202
#8  0x005a580c in WNDPROC (this=0x7fffe9371e10, MESSAGE=...) 
at include/wincontrol.inc:5396
#9  0x007722ac in DELIVERMESSAGE (TARGET=0x7fffe9371e10, 
AMESSAGE=0) at lclmessageglue.pas:112
#10 0x0066c191 in DELIVERMESSAGE (TARGET=0x7fffe9371e10, 
AMESSAGE=0) at gtk2/gtk2proc.inc:3702
#11 0x0067aec6 in DELIVERMOUSEDOWNMESSAGE (WIDGET=0x3aced90, 
EVENT=0x3624ea0, AWINCONTROL=0x7fffe9371e10) at 
gtk2/gtk2callback.inc:2137
#12 0x0067a5c8 in GTKMOUSEBTNPRESS (WIDGET=0x32d2b80, 
EVENT=0x3624ea0, DATA=0x7fffe9371e10) at gtk2/gtk2callback.inc:1899
#13 0x76c8cafc in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x76916fa5 in g_closure_invoke () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x76928fc1 in ?? () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x769317f9 in g_signal_emit_valist () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x7693208f in g_signal_emit () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x76da48cc in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x76c8b294 in gtk_propagate_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x76c8b64b in gtk_main_do_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#21 0x7775bc4c in ?? () from 
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#22 0x76640197 in g_main_context_dispatch () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x766403f0 in ?? () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x7664049c in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x004fc6ec in APPPROCESSMESSAGES (this=0x77f75230) at 
gtk2/gtk2widgetset.inc:2338
#26 0x0049435d in HANDLEMESSAGE (this=0x77f74bf0) at 
include/application.inc:1276
#27 0x004948ac in RUNLOOP (this=0x77f74bf0) at 
include/application.inc:1413
#28 0x006585a6 in APPRUN (this=0x77f75230, ALOOP=...) at 
include/interfacebase.inc:54
#29 0x00494850 in RUN (this=0x77f74bf0) at 
include/application.inc:1401

#30 0x00420127 in main () at lazarus.pp:145
(gdb) cont
Continuing.
TApplication.HandleException Access violation
  Stack trace:
  $
  $009FD49D line 1617 of ../designer/menueditor.pp
  $00A02673 line 2590 of ../designer/menueditor.pp
  $005B29F8 line 2242 of include/control.inc
  $005B2E61 line 2375 of include/control.inc
  $00436562 line 602 of ../inc/objpas.inc
  $005B28FD line 2202 of include/control.inc
  $005A580C line 5396 of include/wincontrol.inc
  $007722AC line 112 of lclmessageglue.pas
  $0066C191 line 3702 of gtk2/gtk2proc.inc
  $0067AEC6 line 2137 of gtk2/gtk2callback.inc
  $0067A5C8 line 1899 of gtk2/gtk2callback.inc
  $76C8CAFC


As I've made some bug fixes for the Menueditor last time, I tried to 
reproduce this error. Till now I wasn't able to reproduce it on Lazarus 
Trunk revision 54826 with FPC 3.0.2 on Windows 7, 10, OpenSuse 42.2 KDE 
GTK2 or Linux Mint 17.3 KDE GTK2. I currently install on a VM a 64bit 
Linux Mint 18.1 Cinnamon (your OS?!), to test the issue there.


I'll report.

Michl
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-08 Thread Michael Van Canneyt via Lazarus

y

On Mon, 8 May 2017, Michael Van Canneyt via Lazarus wrote:




On Mon, 8 May 2017, Juha Manninen via Lazarus wrote:


Can you please create a proper backtrace with gdb using the latest
Lazarus trunk.
It shows also function names and parameter values etc.

I was actually able to reproduce the access violation once but not
more however much I tried.


The stack trace I posted earlier for this issue will have to do.

It's simply *impossible* to debug lazarus using GDB.


As always, you get an idea after sending a mail saying you don't find it... :/

I managed to produce a stacktrace. Hopefully this, combined with the stacktrace
at the end is sufficient to solve the issue.

Michael.

(gdb) cont
Continuing.
WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the component is 
processing an event?
Thread 1 "lazarus" received signal SIGSEGV, Segmentation fault.
0x in ?? ()
(gdb) bt
#0  0x in ?? ()
#1  0x009fd6f2 in SETSELECTEDSHADOW (this=0x7fffe02077b0, 
PREVSELECTEDITEM=0x7fffe37107c0, CURSELECTEDITEM=0x7fffe03c1e80, 
VIADESIGNER=false)
at ../designer/menueditor.pp:1663
#2  0x009fd49d in SETSELECTEDMENUITEM (this=0x7fffe02077b0, 
AMI=0x7fffe03c1e80, VIADESIGNER=false, PREVWASDELETED=false)
at ../designer/menueditor.pp:1617
#3  0x00a02673 in MOUSEDOWN (this=0x7fffe9371e10, BUTTON=MBLEFT, 
SHIFT=8, X=73, Y=8) at ../designer/menueditor.pp:2590
#4  0x005b29f8 in DOMOUSEDOWN (this=0x7fffe9371e10, MESSAGE=..., 
BUTTON=MBLEFT, SHIFT=0) at include/control.inc:2242
#5  0x005b2e61 in WMLBUTTONDOWN (this=0x7fffe9371e10, MESSAGE=...) at 
include/control.inc:2375
#6  0x00436562 in DISPATCH (this=0x7fffe9371e10, MESSAGE=0) at 
../inc/objpas.inc:602
#7  0x005b28fd in WNDPROC (this=0x7fffe9371e10, THEMESSAGE=...) at 
include/control.inc:2202
#8  0x005a580c in WNDPROC (this=0x7fffe9371e10, MESSAGE=...) at 
include/wincontrol.inc:5396
#9  0x007722ac in DELIVERMESSAGE (TARGET=0x7fffe9371e10, AMESSAGE=0) at 
lclmessageglue.pas:112
#10 0x0066c191 in DELIVERMESSAGE (TARGET=0x7fffe9371e10, AMESSAGE=0) at 
gtk2/gtk2proc.inc:3702
#11 0x0067aec6 in DELIVERMOUSEDOWNMESSAGE (WIDGET=0x3aced90, 
EVENT=0x3624ea0, AWINCONTROL=0x7fffe9371e10) at gtk2/gtk2callback.inc:2137
#12 0x0067a5c8 in GTKMOUSEBTNPRESS (WIDGET=0x32d2b80, EVENT=0x3624ea0, 
DATA=0x7fffe9371e10) at gtk2/gtk2callback.inc:1899
#13 0x76c8cafc in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x76916fa5 in g_closure_invoke () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x76928fc1 in ?? () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x769317f9 in g_signal_emit_valist () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x7693208f in g_signal_emit () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x76da48cc in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x76c8b294 in gtk_propagate_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x76c8b64b in gtk_main_do_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#21 0x7775bc4c in ?? () from 
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#22 0x76640197 in g_main_context_dispatch () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x766403f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x7664049c in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x004fc6ec in APPPROCESSMESSAGES (this=0x77f75230) at 
gtk2/gtk2widgetset.inc:2338
#26 0x0049435d in HANDLEMESSAGE (this=0x77f74bf0) at 
include/application.inc:1276
#27 0x004948ac in RUNLOOP (this=0x77f74bf0) at 
include/application.inc:1413
#28 0x006585a6 in APPRUN (this=0x77f75230, ALOOP=...) at 
include/interfacebase.inc:54
#29 0x00494850 in RUN (this=0x77f74bf0) at 
include/application.inc:1401
#30 0x00420127 in main () at lazarus.pp:145
(gdb) cont
Continuing.
TApplication.HandleException Access violation
  Stack trace:
  $
  $009FD49D line 1617 of ../designer/menueditor.pp
  $00A02673 line 2590 of ../designer/menueditor.pp
  $005B29F8 line 2242 of include/control.inc
  $005B2E61 line 2375 of include/control.inc
  $00436562 line 602 of ../inc/objpas.inc
  $005B28FD line 2202 of include/control.inc
  $005A580C line 5396 of include/wincontrol.inc
  $007722AC line 112 of lclmessageglue.pas
  $0066C191 line 3702 of gtk2/gtk2proc.inc
  $0067AEC6 line 2137 of gtk2/gtk2callback.inc
  $0067A5C8 line 1899 of gtk2/gtk2callback.inc
  $76C8CAFC
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-08 Thread Michael Van Canneyt via Lazarus



On Mon, 8 May 2017, Juha Manninen via Lazarus wrote:


Can you please create a proper backtrace with gdb using the latest
Lazarus trunk.
It shows also function names and parameter values etc.

I was actually able to reproduce the access violation once but not
more however much I tried.


The stack trace I posted earlier for this issue will have to do.

It's simply *impossible* to debug lazarus using GDB.

I get exceptions from the code tools *ALL THE TIME* because it is timer
triggered. because of this, the working process becomes simply impossible.

And so, every *$รงยง1@#!!! stacktrace looks like this:

#1  0x00c4dcf0 in RAISEEXCEPTIONINSTANCE (this=0x7fffdbad3390, 
THEEXCEPTION=0x7fffdb508a40, CLEARNICEPOS=true) at customcodetool.pas:2439
#2  0x00c4dd67 in RAISEEXCEPTIONCLASS (this=0x7fffdbad3390, 
ID=20170421200105, AMESSAGE=0x7fffe0128698 'identifier not found: Name',
EXCEPTIONCLASS=0x2225010, CLEARNICEPOS=true) at customcodetool.pas:2450
#3  0x00c47dc0 in RAISEEXCEPTION (this=0x7fffdbad3390, 
ID=20170421200105, AMESSAGE=0x7fffe0128698 'identifier not found: Name', 
CLEARNICEPOS=true)
at customcodetool.pas:399
#4  0x00c47e62 in RAISEEXCEPTIONFMT (this=0x7fffdbad3390, 
ID=20170421200105, AMESSAGE=0x1a6e038 'identifier not found: %s', ARGS=..., 
highARGS=0,
CLEARNICEPOS=true) at customcodetool.pas:405
#5  0x00861726 in RAISENOTFOUND (parentfp=0x7fffcf50) at 
finddeclarationtool.pas:4071
#6  0x0086159e in CHECKRESULT (parentfp=0x7fffcfe0, 
NEWRESULT=false, CALLONIDENTIFIERFOUND=false) at finddeclarationtool.pas:4177
#7  0x0085fd3d in FINDIDENTIFIERINCONTEXT (this=0x7fffdbad3390, 
PARAMS=0x7fffe927b4e0, IDENTFOUNDRESULT=(unknown: 3685561232))
at finddeclarationtool.pas:4998
#8  0x00867d05 in FINDIDENTIFIERINCONTEXT (this=0x7fffdbad3390, 
PARAMS=0x7fffe927b4e0) at finddeclarationtool.pas:7163
#9  0x008595f7 in FINDDECLARATION (this=0x7fffdbad3390, CURSORPOS=..., 
SEARCHSMARTFLAGS=4, NEWEXPRTYPE=..., NEWPOS=..., NEWTOPLINE=-610849184)
at finddeclarationtool.pas:2409
#10 0x00859f54 in FINDDECLARATION (this=0x7fffdbad3390, CURSORPOS=..., 
SEARCHSMARTFLAGS=4, NEWTOOL=0x7fffdbad3390, NEWNODE=0x7fffdb972e60,
NEWPOS=..., NEWTOPLINE=-610849184) at finddeclarationtool.pas:2468
#11 0x009b6c13 in GETHTMLHINTFOREXPR (this=0x7fffe9787540, 
CTEXPRTYPE=..., XYPOS=..., OPTIONS=0, BASEURL=0x1a98e20 'lazdoc://', 
HTMLHINT=0x0,
CACHEWASUSED=false) at codehelp.pas:2601
#12 0x009b6267 in GETHTMLHINT (this=0x7fffe9787540, 
CODE=0x7fffe82367e0, X=14, Y=1872, OPTIONS=0, BASEURL=0x1a98e20 'lazdoc://', 
HTMLHINT=0x0,
PROPDETAILS=0x0, CACHEWASUSED=false) at codehelp.pas:2469
#13 0x004d96a6 in OICHANGEDTIMERTIMER (this=0x77f99550, 
SENDER=0x7fffe80448c0) at main.pp:12191
#14 0x00752b94 in DOONTIMER (this=0x7fffe80448c0) at customtimer.pas:175
#15 0x00752ae5 in TIMER (this=0x7fffe80448c0) at customtimer.pas:150

This error is obviously bogus, since the compiler processes the program fine.

So the original stack trace which I posted should suffice to diagnose the
problem:

ObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.DesignerRenameComponent Old=MenuItem37:TMenuItem 
New=MIResize Owner=FPReportDesignerForm:TFPReportDesignerForm
WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the component is 
processing an event?
TApplication.HandleException Access violation
   Stack trace:
   $
   $009FD49D line 1617 of ../designer/menueditor.pp
   $00A02673 line 2590 of ../designer/menueditor.pp
   $005B29F8 line 2242 of include/control.inc
   $005B2E61 line 2375 of include/control.inc
   $00436562 line 602 of ../inc/objpas.inc
   $005B28FD line 2202 of include/control.inc
   $005A580C line 5396 of include/wincontrol.inc
   $007722AC line 112 of lclmessageglue.pas
   $0066C191 line 3702 of gtk2/gtk2proc.inc
   $0067AEC6 line 2137 of gtk2/gtk2callback.inc
   $0067A5C8 line 1899 of gtk2/gtk2callback.inc
   $7F04FDB6EAFC


The 2 following lines should tell you everything you need, IMHO:
   $009FD49D line 1617 of ../designer/menueditor.pp
   $00A02673 line 2590 of ../designer/menueditor.pp

The GDB stack trace will give you little more useful information.

Michael.-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable? - stack trace

2017-05-07 Thread Juha Manninen via Lazarus
Can you please create a proper backtrace with gdb using the latest
Lazarus trunk.
It shows also function names and parameter values etc.

I was actually able to reproduce the access violation once but not
more however much I tried.

Juha
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable?

2017-05-07 Thread Victor Campillo via Lazarus

On 07/05/17 13:08, zeljko via Lazarus wrote:

Not here, but using Lazarus Qt 64-bit + fpc-3.0.2.


Hi,

I can't reproduce it here either, using latest Lazarus GTK2, linux 
64-bit, FPC 3.0.2


--
Victor Campillo

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable?

2017-05-07 Thread Michael Van Canneyt via Lazarus



On Sun, 7 May 2017, Mattias Gaertner via Lazarus wrote:


On Sat, 6 May 2017 21:26:38 +0200 (CEST)
Michael Van Canneyt via Lazarus  wrote:


[...]
I have not exactly been able to reproduce reliably, but the following just 
triggered
it:
- Start IDE
- Open project
- Select a popup menu (there are several)
- Double click to edit
- Select menu item 1
- Immediatly select menu item 2.
-> crash. 


But also simply selecting something in the menu editor, and going to the object
inspector can crash it.

As a result I find myself saving all files before entering the menu editor.
Not exactly ideal, to say the least.

Anyone else experiencing this ?

Latest Lazarus from SVN. GTK2, linux 64-bit.


It does not crash here. So it needs something more to trigger the bug.
Maybe the FPC Version?


3.0.2


Stacktrace?


I will try to get one.

Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Menu editor unstable?

2017-05-07 Thread Mattias Gaertner via Lazarus
On Sat, 6 May 2017 21:26:38 +0200 (CEST)
Michael Van Canneyt via Lazarus  wrote:

>[...]
> I have not exactly been able to reproduce reliably, but the following just 
> triggered
> it:
> - Start IDE
> - Open project
> - Select a popup menu (there are several)
> - Double click to edit
> - Select menu item 1
> - Immediatly select menu item 2.
> -> crash.  
> 
> But also simply selecting something in the menu editor, and going to the 
> object
> inspector can crash it.
> 
> As a result I find myself saving all files before entering the menu editor.
> Not exactly ideal, to say the least.
> 
> Anyone else experiencing this ?
> 
> Latest Lazarus from SVN. GTK2, linux 64-bit.

It does not crash here. So it needs something more to trigger the bug.
Maybe the FPC Version?
Stacktrace?

Mattias
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus