View Issue Details

IDProjectCategoryView StatusLast Update
0031791LazarusIDEpublic2017-05-17 23:04
ReporterMichael Van Canneyt Assigned ToMichl  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinux Mint 18.1, cinnamonOSLinux 
Product Version1.9 (SVN) 
Target Version1.8 
Summary0031791: Menu editor unstable after deleting an item
DescriptionAfter deleting an item and adding one, clicking on a previous item and clicking on the newly added item, the lazarus IDE crashes completely.

Only a kill -KILL helps.
Steps To Reproduce1. open attached program.
2. Open menu editor.
3. Under MenuItem5 delete all items with caption MenuItemN.
4. Add a new item below 'Action3' (so it will be the last item)
5. Click on menu item Action 3
6. Click on the newly added menu item.
-> 'Access Violation'

If you delete just 1 item below 'MenuItem5' it also happens
Even waiting 5 seconds between
Additional InformationOutput on the console:

TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event?
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem14:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem13:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem12:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem11:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event?
TApplication.HandleException Access violation
  Stack trace:
  $0000000000000000
  $0000000000A08B7D line 1606 of ../designer/menueditor.pp
  $0000000000A0DD03 line 2578 of ../designer/menueditor.pp
  $00000000005B467A line 2242 of include/control.inc
  $00000000005B4B17 line 2375 of include/control.inc
  $0000000000434EF2 line 602 of ../inc/objpas.inc
  $00000000005B457F line 2202 of include/control.inc
  $00000000005A6FAD line 5396 of include/wincontrol.inc
  $000000000077B7A2 line 112 of lclmessageglue.pas
  $0000000000673075 line 3702 of gtk2proc.inc
  $00000000006826EA line 2137 of gtk2callback.inc
  $0000000000681D68 line 1899 of gtk2callback.inc
  $00007FCBE2536AFC
TagsNo tags attached.
Fixed in Revision54849, 54857, 54863, r54874, r54957
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

related to 0031816 resolvedMichl AV on closing the IDE 

Activities

Michael Van Canneyt

2017-05-10 14:23

administrator  

bug.zip (2,854 bytes)

Michael Van Canneyt

2017-05-10 14:29

administrator   ~0100196

The following is the backtrace when the WARNING appears:
#0 DESTROY (this=0x7fffe7a0e1b0, vmt=0x0) at lclclasses.pp:125
0000001 0x00000000005bbd31 in DESTROY (this=0x7fffe7a0e1b0, vmt=0x0) at include/control.inc:4991
0000002 0x00000000005a9a86 in DESTROY (this=0x7fffe7a0e1b0, vmt=0x0) at include/wincontrol.inc:6601
0000003 0x00000000005be651 in DESTROY (this=0x7fffe7a0e1b0, vmt=0x0) at include/customcontrol.inc:54
0000004 0x0000000000fff581 in DESTROY (this=0x7fffe7a0e1b0, vmt=0x1) at ../designer/menudesignerbase.pas:143
0000005 0x0000000000535366 in DESTROYCOMPONENTS (this=0x7fffe7a074d0) at ../objpas/classes/compon.inc:512
0000006 0x0000000000535296 in DESTROY (this=0x7fffe7a074d0, vmt=0x0) at ../objpas/classes/compon.inc:490
0000007 0x00000000006ad1b8 in DESTROY (this=0x7fffe7a074d0, vmt=0x0) at lclclasses.pp:131
0000008 0x00000000005bbd31 in DESTROY (this=0x7fffe7a074d0, vmt=0x0) at include/control.inc:4991
0000009 0x00000000005a9a86 in DESTROY (this=0x7fffe7a074d0, vmt=0x0) at include/wincontrol.inc:6601
0000010 0x00000000005be651 in DESTROY (this=0x7fffe7a074d0, vmt=0x0) at include/customcontrol.inc:54
0000011 0x0000000000fff891 in DESTROY (this=0x7fffe7a074d0, vmt=0x0) at ../designer/menudesignerbase.pas:193
0000012 0x0000000000a0afc1 in DESTROY (this=0x7fffe7a074d0, vmt=0x1) at ../designer/menueditor.pp:2069
0000013 0x0000000000535366 in DESTROYCOMPONENTS (this=0x7fffe7a024d0) at ../objpas/classes/compon.inc:512
0000014 0x0000000000535296 in DESTROY (this=0x7fffe7a024d0, vmt=0x0) at ../objpas/classes/compon.inc:490
0000015 0x00000000006ad1b8 in DESTROY (this=0x7fffe7a024d0, vmt=0x0) at lclclasses.pp:131
0000016 0x00000000005bbd31 in DESTROY (this=0x7fffe7a024d0, vmt=0x0) at include/control.inc:4991
0000017 0x00000000005a9a86 in DESTROY (this=0x7fffe7a024d0, vmt=0x0) at include/wincontrol.inc:6601
0000018 0x00000000005be651 in DESTROY (this=0x7fffe7a024d0, vmt=0x0) at include/customcontrol.inc:54
0000019 0x00000000004824c1 in DESTROY (this=0x7fffe7a024d0, vmt=0x0) at include/scrollingwincontrol.inc:316
0000020 0x0000000000fffd70 in DESTROY (this=0x7fffe7a024d0, vmt=0x0) at ../designer/menudesignerbase.pas:247
0000021 0x0000000000a09e5a in DESTROY (this=0x7fffe7a024d0, vmt=0x1) at ../designer/menueditor.pp:1844
0000022 0x0000000000434811 in FREE (this=0x7fffe7a024d0) at ../inc/objpas.inc:288
0000023 0x0000000000475c0c in FREEANDNIL (OBJ=0) at ../objpas/sysutils/sysutils.inc:160
0000024 0x00000000010003ca in FREESHADOWMENU (this=0x7fffe4885b40) at ../designer/menudesignerbase.pas:306
0000025 0x0000000001002c5a in SETMENU (this=0x7fffeee10230, AMENU=0x0, AMENUITEM=0x0) at ../designer/menueditorform.pas:557
0000026 0x00000000010019f0 in ONDESIGNERSETSELECTION (this=0x7fffeee10230, ASELECTION=0x7fffee319f40) at ../designer/menueditorform.pas:308
0000027 0x0000000000916c9e in SETSELECTION (this=0x7fffeee4d6c0, ASELECTION=0x7fffee319f40) at propedits.pp:6394
0000028 0x00000000004adf22 in OIONSELECTPERSISTENTS (this=0x7fffeeece090, SENDER=0x7fffe7b0c470) at main.pp:1719
0000029 0x0000000000902d7f in COMPONENTTREESELECTIONCHANGED (this=0x7fffe7b0c470, SENDER=0x7fffe7b16810) at objectinspector.pp:4904
0000030 0x0000000000642980 in DOSELECTIONCHANGED (this=0x7fffe7b16810) at include/treeview.inc:4617
0000031 0x0000000000cead22 in DOSELECTIONCHANGED (this=0x7fffe7b16810) at componenttreeview.pas:314
0000032 0x0000000000646c3b in INTERNALSELECTIONCHANGED (this=0x7fffe7b16810) at include/treeview.inc:5909
0000033 0x000000000064792d in UNLOCKSELECTIONCHANGEEVENT (this=0x7fffe7b16810) at include/treeview.inc:6111
0000034 0x000000000063f329 in ENDUPDATE (this=0x7fffe7b16810) at include/treeview.inc:3394
0000035 0x0000000000cec4e0 in UPDATESELECTED (this=0x7fffe7b16810) at componenttreeview.pas:758
0000036 0x0000000000ceabc5 in SETSELECTION (this=0x7fffe7b16810, NEWSELECTION=0x7fffee319f40) at componenttreeview.pas:283
0000037 0x0000000000902698 in REFRESHCOMPONENTTREESELECTION (this=0x7fffe7b0c470) at objectinspector.pp:4776
0000038 0x00000000009025e6 in REFRESHSELECTION (this=0x7fffe7b0c470) at objectinspector.pp:4765
0000039 0x0000000000902492 in SETSELECTION (this=0x7fffe7b0c470, ASELECTION=0x7fffee320780) at objectinspector.pp:4739
0000040 0x00000000009eb2cb in SETSELECTION (this=0x7fffed6f1c80, ASELECTION=0x7fffe489f
0000041 0x00000000004cdc23 in CONTROLSELECTIONCHANGED (this=0x7fffeeece090, SENDER=0x7fffed733110, FORCEUPDATE=false) at main.pp:9043
---Type <return> to continue, or q <return> to quit---
0000042 0x00000000009f97a7 in DOCHANGE (this=0x7fffed733110, FORCEUPDATE=false) at ../designer/controlselection.pp:2092
0000043 0x00000000009f5a02 in ENDUPDATE (this=0x7fffed733110) at ../designer/controlselection.pp:1004
0000044 0x00000000009f9f89 in ASSIGNPERSISTENT (this=0x7fffed733110, APERSISTENT=0x7fffe48dc040) at ../designer/controlselection.pp:2257
0000045 0x00000000009e0405 in SELECTONLYTHISCOMPONENT (this=0x7fffe7a6fdb0, ACOMPONENT=0x7fffe48dc040) at ../designer/designer.pp:1619
0000046 0x0000000000a08d43 in SETSELECTEDSHADOW (this=0x7fffe7a024d0, PREVSELECTEDITEM=0x7fffe48dbf00, CURSELECTEDITEM=0x7fffe48dc040, VIADESIGNER=false)
    at ../designer/menueditor.pp:1647
0000047 0x0000000000a08b7d in SETSELECTEDMENUITEM (this=0x7fffe7a024d0, AMI=0x7fffe48dc040, VIADESIGNER=false, PREVWASDELETED=false)
    at ../designer/menueditor.pp:1606
0000048 0x0000000000a0dd03 in MOUSEDOWN (this=0x7fffe7a0e1b0, BUTTON=MBLEFT, SHIFT=8, X=51, Y=11) at ../designer/menueditor.pp:2578
0000049 0x00000000005b467a in DOMOUSEDOWN (this=0x7fffe7a0e1b0, MESSAGE=..., BUTTON=MBLEFT, SHIFT=0) at include/control.inc:2242
0000050 0x00000000005b4b17 in WMLBUTTONDOWN (this=0x7fffe7a0e1b0, MESSAGE=...) at include/control.inc:2375
0000051 0x0000000000434ef2 in DISPATCH (this=0x7fffe7a0e1b0, MESSAGE=0) at ../inc/objpas.inc:602
0000052 0x00000000005b457f in WNDPROC (this=0x7fffe7a0e1b0, THEMESSAGE=...) at include/control.inc:2202
#53 0x00000000005a6fad in WNDPROC (this=0x7fffe7a0e1b0, MESSAGE=...) at include/wincontrol.inc:5396
#54 0x000000000077b7a2 in DELIVERMESSAGE (TARGET=0x7fffe7a0e1b0, AMESSAGE=0) at lclmessageglue.pas:112
0000055 0x0000000000673075 in DELIVERMESSAGE (TARGET=0x7fffe7a0e1b0, AMESSAGE=0) at gtk2proc.inc:3702
0000056 0x00000000006826ea in DELIVERMOUSEDOWNMESSAGE (WIDGET=0x2045370, EVENT=0x242b150, AWINCONTROL=0x7fffe7a0e1b0) at gtk2callback.inc:2137
0000057 0x0000000000681d68 in GTKMOUSEBTNPRESS (WIDGET=0x224b010, EVENT=0x242b150, DATA=0x7fffe7a0e1b0) at gtk2callback.inc:1899

Michael Van Canneyt

2017-05-10 14:30

administrator   ~0100197

And after continuing after the warning, here is the backtrace when the AV happens:

0000001 0x0000000000a08d82 in SETSELECTEDSHADOW (this=0x7fffe7a024d0, PREVSELECTEDITEM=0x7fffe48dbf00, CURSELECTEDITEM=0x7fffe48dc040, VIADESIGNER=false)
    at ../designer/menueditor.pp:1651
0000002 0x0000000000a08b7d in SETSELECTEDMENUITEM (this=0x7fffe7a024d0, AMI=0x7fffe48dc040, VIADESIGNER=false, PREVWASDELETED=false)
    at ../designer/menueditor.pp:1606
0000003 0x0000000000a0dd03 in MOUSEDOWN (this=0x7fffe7a0e1b0, BUTTON=MBLEFT, SHIFT=8, X=51, Y=11) at ../designer/menueditor.pp:2578
0000004 0x00000000005b467a in DOMOUSEDOWN (this=0x7fffe7a0e1b0, MESSAGE=..., BUTTON=MBLEFT, SHIFT=0) at include/control.inc:2242
0000005 0x00000000005b4b17 in WMLBUTTONDOWN (this=0x7fffe7a0e1b0, MESSAGE=...) at include/control.inc:2375
0000006 0x0000000000434ef2 in DISPATCH (this=0x7fffe7a0e1b0, MESSAGE=0) at ../inc/objpas.inc:602
0000007 0x00000000005b457f in WNDPROC (this=0x7fffe7a0e1b0, THEMESSAGE=...) at include/control.inc:2202
0000008 0x00000000005a6fad in WNDPROC (this=0x7fffe7a0e1b0, MESSAGE=...) at include/wincontrol.inc:5396
0000009 0x000000000077b7a2 in DELIVERMESSAGE (TARGET=0x7fffe7a0e1b0, AMESSAGE=0) at lclmessageglue.pas:112
0000010 0x0000000000673075 in DELIVERMESSAGE (TARGET=0x7fffe7a0e1b0, AMESSAGE=0) at gtk2proc.inc:3702
0000011 0x00000000006826ea in DELIVERMOUSEDOWNMESSAGE (WIDGET=0x2045370, EVENT=0x242b150, AWINCONTROL=0x7fffe7a0e1b0) at gtk2callback.inc:2137
0000012 0x0000000000681d68 in GTKMOUSEBTNPRESS (WIDGET=0x224b010, EVENT=0x242b150, DATA=0x7fffe7a0e1b0) at gtk2callback.inc:1899

Mattias Gaertner

2017-05-10 15:03

manager   ~0100198

I can't reproduce the crash.

I fixed the TShadowItem.Destroy with LCLRefCount>0.
Does that fix the bug for you?

Michael Van Canneyt

2017-05-10 15:24

administrator   ~0100199

Last edited: 2017-05-10 15:25

View 2 revisions

No. Updated from svn. Made minimal IDE using make all

home: >./lazarus

(lazarus:5322): Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk",
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/michael/.lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TComponentTreeView.SetSelection: Updating component node values.
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
----------------
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/michael/source/bugmenueditor/frmmain.pp
TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TDesigner.InvokeComponentEditor A MainMenu1:TMainMenu
TDesigner.InvokeComponentEditor B TMainMenuComponentEditor
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem14:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem13:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem12:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem11:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event?
TApplication.HandleException Access violation
  Stack trace:
  $0000000000000000
  $0000000000A2F8A3 SETSELECTEDMENUITEM, line 1607 of ../designer/menueditor.pp
  $0000000000A34B1D MOUSEDOWN, line 2579 of ../designer/menueditor.pp
  $00000000005C8E6A DOMOUSEDOWN, line 2242 of include/control.inc
  $00000000005C9315 WMLBUTTONDOWN, line 2375 of include/control.inc
  $0000000000435DF8 DISPATCH, line 674 of ../inc/objpas.inc
  $00000000005C8D71 WNDPROC, line 2202 of include/control.inc
  $00000000005BB32B WNDPROC, line 5396 of include/wincontrol.inc
  $000000000079DDD8 DELIVERMESSAGE, line 112 of lclmessageglue.pas
  $000000000068CC85 DELIVERMESSAGE, line 3702 of gtk2proc.inc
  $000000000069C32C DELIVERMOUSEDOWNMESSAGE, line 2137 of gtk2callback.inc
  $000000000069B9F8 GTKMOUSEBTNPRESS, line 1899 of gtk2callback.inc
  $00007FCA86CD9AFC


As you see, the warning persists.

Michael Van Canneyt

2017-05-10 15:34

administrator   ~0100200

Additional info. The line

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

happens at the click on the newly added item.

Tried several times now. Crash is very reliable :(

Mattias Gaertner

2017-05-10 16:14

manager   ~0100202

I can't reproduce the "TShadowItem.Destroy with LCLRefCount", but I found some strange code and replaced it with the usual technique.

How do you delete items? With the 'delete' key or the popup menu?

Michael Van Canneyt

2017-05-10 16:26

administrator   ~0100203

Still doesn't solve the issue.

I use the 'delete' button which is located below 'Menu Item Actions' in the left pane of the menu editor.

But to test, I tried also with the delete key on the keyboard, and the popup menu item. The result is 100% the same. Here is the output on the console:


home: >./lazarus
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/michael/.lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TComponentTreeView.SetSelection: Updating component node values.
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
----------------
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/michael/source/bugmenueditor/frmmain.pp
TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TDesigner.InvokeComponentEditor A MainMenu1:TMainMenu
TDesigner.InvokeComponentEditor B TMainMenuComponentEditor
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem14:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem13:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem12:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem11:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event?
TApplication.HandleException Access violation
  Stack trace:
  $0000000000000000
  $0000000000A08B5D line 1598 of ../designer/menueditor.pp
  $0000000000A0DC53 line 2558 of ../designer/menueditor.pp
  $00000000005B467A line 2242 of include/control.inc
  $00000000005B4B17 line 2375 of include/control.inc
  $0000000000434EF2 line 602 of ../inc/objpas.inc
  $00000000005B457F line 2202 of include/control.inc
  $00000000005A6FAD line 5396 of include/wincontrol.inc
  $000000000077B7A2 line 112 of lclmessageglue.pas
  $0000000000673075 line 3702 of gtk2proc.inc
  $00000000006826EA line 2137 of gtk2callback.inc
  $0000000000681D68 line 1899 of gtk2callback.inc
  $00007FA45E3DDAFC

Michael Van Canneyt

2017-05-10 16:30

administrator   ~0100204

To be *absolutely* sure, I did a clean checkout of Lazarus sources.
Rebuilt. Same issue (rev 54852)

Mattias Gaertner

2017-05-10 16:44

manager   ~0100205

I wonder where this TShadowItem.Destroy is coming from. Please update svn and compile with -dDebugTLCLComponentDestroy -Criot. This adds a dumpstack. Hopefully this gives a hint where it is happenning.

Michael Van Canneyt

2017-05-10 16:54

administrator   ~0100207

Seems like progress:

Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/michael/.lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TComponentTreeView.SetSelection: Updating component node values.
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
----------------
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/michael/source/bugmenueditor/frmmain.pp
TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TDesigner.InvokeComponentEditor A MainMenu1:TMainMenu
TDesigner.InvokeComponentEditor B TMainMenuComponentEditor
TDesigner.InvokeComponentEditor A MainMenu1:TMainMenu
TDesigner.InvokeComponentEditor B TMainMenuComponentEditor
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem14:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem13:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem12:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem11:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components

WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event?
  $000000000073638E line 729 of lazloggerbase.pas
  $000000000075A7F0 line 127 of lclclasses.pp
  $0000000000603D59 line 4991 of include/control.inc
  $00000000005EA6EB line 6601 of include/wincontrol.inc
  $000000000060741F line 54 of include/customcontrol.inc
  $00000000012A534F line 143 of ../designer/menudesignerbase.pas
  $0000000000562296 line 512 of ../objpas/classes/compon.inc
  $00000000005621C6 line 490 of ../objpas/classes/compon.inc
  $000000000075A803 line 135 of lclclasses.pp
Runtime error 210 at $0000000000421596
  $0000000000421596 line 829 of ../inc/generic.inc
  $0000000000F20CD9 line 1158 of editbtn.pas
  $0000000000A2B93E line 4532 of objectinspector.pp
  $0000000000A46298 line 7054 of propedits.pp
  $0000000000A464BF line 7098 of propedits.pp
  $000000000056216E line 481 of ../objpas/classes/compon.inc
  $000000000075A803 line 135 of lclclasses.pp
  $0000000000603D59 line 4991 of include/control.inc
  $00000000005EA6EB line 6601 of include/wincontrol.inc
  $000000000060741F line 54 of include/customcontrol.inc

[TJITComponentList.DestroyJITComponent] ERROR destroying component Error: Access violation
  Stack trace:
  $00000000004E7F35 line 9499 of main.pp
  $0000000000D687BA line 129 of transfermacros.pp
  $0000000000AA1646 line 4030 of compileroptions.pp
  $0000000000A9EE16 line 3761 of compileroptions.pp
  $0000000000B032B8 line 4284 of ../packager/packagedefs.pas
  $0000000000A9F0B0 line 3779 of compileroptions.pp
  $0000000000AF96E9 line 2699 of ../packager/packagedefs.pas
  $0000000000AF8DF0 line 2608 of ../packager/packagedefs.pas
  $0000000000434901 line 288 of ../inc/objpas.inc
  $0000000000BD9F20 line 1144 of ../packager/packagesystem.pas
  $0000000000BD9CE0 line 1104 of ../packager/packagesystem.pas
  $0000000000BD9BCF line 1090 of ../packager/packagesystem.pas
  $0000000000434901 line 288 of ../inc/objpas.inc
  $00000000004A65D4 line 870 of lclproc.pas
  $0000000000C02BAB line 2990 of ../packager/pkgmanager.pas
  $0000000000434901 line 288 of ../inc/objpas.inc
  $00000000004A65D4 line 870 of lclproc.pas
TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil

Mattias Gaertner

2017-05-10 17:29

manager   ~0100209

Ah, another unit. I changed that place too. Please test.

Michael Van Canneyt

2017-05-10 17:37

administrator   ~0100210

Still happening :(
home: >./lazarus
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/michael/.lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TComponentTreeView.SetSelection: Updating component node values.
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
----------------
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/michael/source/bugmenueditor/frmmain.pp
TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TDesigner.InvokeComponentEditor A MainMenu1:TMainMenu
TDesigner.InvokeComponentEditor B TMainMenuComponentEditor
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem14:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem13:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem12:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem11:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
WARNING: TShadowItem.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event?

  $00000000007363CE line 729 of lazloggerbase.pas
  $000000000075A830 line 127 of lclclasses.pp
  $0000000000603D99 line 4991 of include/control.inc
  $00000000005EA72B line 6601 of include/wincontrol.inc
  $000000000060745F line 54 of include/customcontrol.inc
  $00000000012A537F line 143 of ../designer/menudesignerbase.pas
  $00000000005622D6 line 512 of ../objpas/classes/compon.inc
  $0000000000562206 line 490 of ../objpas/classes/compon.inc
  $000000000075A843 line 135 of lclclasses.pp
Runtime error 210 at $0000000000421596
  $0000000000421596 line 829 of ../inc/generic.inc
  $0000000000F20D09 line 1158 of editbtn.pas
  $0000000000A2B97E line 4532 of objectinspector.pp
  $0000000000A462D8 line 7054 of propedits.pp
  $0000000000A464FF line 7098 of propedits.pp
  $00000000005621AE line 481 of ../objpas/classes/compon.inc
  $000000000075A843 line 135 of lclclasses.pp
  $0000000000603D99 line 4991 of include/control.inc
  $00000000005EA72B line 6601 of include/wincontrol.inc
  $000000000060745F line 54 of include/customcontrol.inc

[TJITComponentList.DestroyJITComponent] ERROR destroying component Error: Access violation
  Stack trace:
  $00000000004E7F75 line 9501 of main.pp
  $0000000000D687EA line 129 of transfermacros.pp
  $0000000000AA1686 line 4030 of compileroptions.pp
  $0000000000A9EE56 line 3761 of compileroptions.pp
  $0000000000B032F8 line 4284 of ../packager/packagedefs.pas
  $0000000000A9F0F0 line 3779 of compileroptions.pp
  $0000000000AF9729 line 2699 of ../packager/packagedefs.pas
  $0000000000AF8E30 line 2608 of ../packager/packagedefs.pas
  $0000000000434901 line 288 of ../inc/objpas.inc
  $0000000000BD9F60 line 1144 of ../packager/packagesystem.pas
  $0000000000BD9D20 line 1104 of ../packager/packagesystem.pas
  $0000000000BD9C0F line 1090 of ../packager/packagesystem.pas
  $0000000000434901 line 288 of ../inc/objpas.inc
  $00000000004A65D4 line 870 of lclproc.pas
  $0000000000C02BEB line 2990 of ../packager/pkgmanager.pas
  $0000000000434901 line 288 of ../inc/objpas.inc
  $00000000004A65D4 line 870 of lclproc.pas
TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil

Mattias Gaertner

2017-05-10 17:55

manager   ~0100211

The stacktrace of 8 is not long enough.
I increased it to 32. Please run again.

Michael Van Canneyt

2017-05-10 19:06

administrator   ~0100213

New stack trace:

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

  $00000000007363CE line 729 of lazloggerbase.pas
  $000000000075A830 line 127 of lclclasses.pp
  $0000000000603D99 line 4991 of include/control.inc
  $00000000005EA72B line 6601 of include/wincontrol.inc
  $000000000060745F line 54 of include/customcontrol.inc
  $00000000012A53DF line 143 of ../designer/menudesignerbase.pas
  $00000000005622D6 line 512 of ../objpas/classes/compon.inc
  $0000000000562206 line 490 of ../objpas/classes/compon.inc
  $000000000075A843 line 135 of lclclasses.pp
  $0000000000603D99 line 4991 of include/control.inc
  $00000000005EA72B line 6601 of include/wincontrol.inc
  $000000000060745F line 54 of include/customcontrol.inc
  $00000000012A583F line 193 of ../designer/menudesignerbase.pas
  $00000000005622D6 line 512 of ../objpas/classes/compon.inc
  $0000000000562206 line 490 of ../objpas/classes/compon.inc
  $000000000075A843 line 135 of lclclasses.pp
  $0000000000603D99 line 4991 of include/control.inc
  $00000000005EA72B line 6601 of include/wincontrol.inc
  $000000000060745F line 54 of include/customcontrol.inc
  $0000000000484C3F line 316 of include/scrollingwincontrol.inc
  $00000000012A5EBE line 247 of ../designer/menudesignerbase.pas
  $0000000000B7B129 line 1836 of ../designer/menueditor.pp
  $0000000000434901 line 288 of ../inc/objpas.inc
  $000000000049F258 line 2349 of include/application.inc
  $000000000049F128 line 2318 of include/application.inc
  $000000000049AAE1 line 1079 of include/application.inc
  $000000000049858F line 376 of include/application.inc
  $0000000000B7861E line 1339 of ../designer/menueditor.pp
  $0000000000B79D9B line 1645 of ../designer/menueditor.pp
  $0000000000B79ACE line 1598 of ../designer/menueditor.pp
  $0000000000B808E9 line 2558 of ../designer/menueditor.pp
  $00000000005F98B5 line 2242 of include/control.inc
  $00000000005FA006 line 2375 of include/control.inc
Runtime error 210 at $0000000000421596
  $0000000000421596 line 829 of ../inc/generic.inc
  $0000000000F20D69 line 1158 of editbtn.pas
  $0000000000A2B9DE line 4532 of objectinspector.pp
  $0000000000A46338 line 7054 of propedits.pp
  $0000000000A4655F line 7098 of propedits.pp
  $00000000005621AE line 481 of ../objpas/classes/compon.inc
  $000000000075A843 line 135 of lclclasses.pp
  $0000000000603D99 line 4991 of include/control.inc
  $00000000005EA72B line 6601 of include/wincontrol.inc
  $000000000060745F line 54 of include/customcontrol.inc
  $0000000000484C3F line 316 of include/scrollingwincontrol.inc
  $0000000000486AD9 line 212 of include/customform.inc
  $0000000000434901 line 288 of ../inc/objpas.inc
  $0000000000B276BB line 777 of ../designer/jitforms.pp
  $0000000000B272D2 line 728 of ../designer/jitforms.pp
  $0000000000434901 line 288 of ../inc/objpas.inc
  $0000000000475CFC line 160 of ../objpas/sysutils/sysutils.inc
  $0000000000B52157 line 488 of customformeditor.pp
  $0000000000434901 line 288 of ../inc/objpas.inc
  $0000000000B50A81 line 79 of formeditor.pp
  $00000000004BB6E4 line 1659 of main.pp
  $0000000000434901 line 288 of ../inc/objpas.inc
  $000000000049AB93 line 1093 of include/application.inc
  $0000000000480425 line 1904 of forms.pp
  $000000000043A0A3 line 972 of ../inc/system.inc
  $000000000043A269 line 1041 of ../inc/system.inc
  $000000000043A2B7 line 1062 of ../inc/system.inc
  $000000000043A5D0 line 1159 of ../inc/system.inc
  $0000000000421596 line 829 of ../inc/generic.inc
  $0000000000B74446 line 603 of ../designer/menueditor.pp
  $0000000000B7862E line 1340 of ../designer/menueditor.pp
  $0000000000B79D9B line 1645 of ../designer/menueditor.pp
  $0000000000B79ACE line 1598 of ../designer/menueditor.pp
  $0000000000B808E9 line 2558 of ../designer/menueditor.pp

[TJITComponentList.DestroyJITComponent] ERROR destroying component Error: Access violation
  Stack trace:
  $00000000004E7F75 line 9501 of main.pp
  $0000000000D6884A line 129 of transfermacros.pp
  $0000000000AA16E6 line 4030 of compileroptions.pp
  $0000000000A9EEB6 line 3761 of compileroptions.pp
  $0000000000B03358 line 4284 of ../packager/packagedefs.pas
  $0000000000A9F150 line 3779 of compileroptions.pp
  $0000000000AF9789 line 2699 of ../packager/packagedefs.pas
  $0000000000AF8E90 line 2608 of ../packager/packagedefs.pas
  $0000000000434901 line 288 of ../inc/objpas.inc
  $0000000000BD9FC0 line 1144 of ../packager/packagesystem.pas
  $0000000000BD9D80 line 1104 of ../packager/packagesystem.pas
  $0000000000BD9C6F line 1090 of ../packager/packagesystem.pas
  $0000000000434901 line 288 of ../inc/objpas.inc
  $00000000004A65D4 line 870 of lclproc.pas
  $0000000000C02C4B line 2990 of ../packager/pkgmanager.pas
  $0000000000434901 line 288 of ../inc/objpas.inc
  $00000000004A65D4 line 870 of lclproc.pas
TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil

Mattias Gaertner

2017-05-10 19:26

manager   ~0100215

I found a hack and removed it. Please test.

Michl

2017-05-10 19:40

developer   ~0100216

As I wrote here, http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Menu-editor-unstable-td4051580.html, I haven't this problem on the same environment: 64bit Linux Mint 18.1 Cinnamon, GTK2 version 2.24.30, Lazarus 1.9.0
r54844 FPC 3.0.2 x86_64-linux-gtk2

But if I debug the IDE, the console output is different:

For me it is called:
...
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem14:TMenuItem
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem13:TMenuItem
...

not as above:
...
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem14:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem13:TMenuItem
...

I don't know, if it is interesting?!

Michael Van Canneyt

2017-05-10 19:46

administrator   ~0100217

The problem is different now:

home: >./lazarus
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/michael/.lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TComponentTreeView.SetSelection: Updating component node values.
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
----------------
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/michael/source/bugmenueditor/frmmain.pp
TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TDesigner.InvokeComponentEditor A MainMenu1:TMainMenu
TDesigner.InvokeComponentEditor B TMainMenuComponentEditor
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem14:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem13:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem12:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A MenuItem11:TMenuItem
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with components
TWinControl.CreateWnd ShadowMenu:TShadowMenu Parent=nil ERROR WndParent=0
TApplication.HandleException Control 'ShadowMenu' has no parent window
  Stack trace:
  $00000000005ED0B9 line 7479 of include/wincontrol.inc
  $0000000000483393 line 23 of include/scrollingwincontrol.inc
  $00000000005EC7D1 line 7395 of include/wincontrol.inc
  $00000000005EE5BC line 7841 of include/wincontrol.inc
  $00000000005EE580 line 7835 of include/wincontrol.inc
  $00000000005EE580 line 7835 of include/wincontrol.inc
  $00000000005EA018 line 6488 of include/wincontrol.inc
  $00000000007222CF line 2141 of gtk2callback.inc
  $0000000000721745 line 1899 of gtk2callback.inc
  $00007F2625048AFC
lazarus.pp - unhandled exception

And then lazarus hangs.

Michael Van Canneyt

2017-05-10 19:49

administrator   ~0100218

Michl, maybe this helps explain the difference in output:

I don't use the component tree in the object inspector.
Only 2 items are checked when I right-click in the object inspector:

show information box
show status bar

The component tree is not visible.

Zeljan Rikalo

2017-05-10 20:00

developer   ~0100219

Last edited: 2017-05-10 20:02

View 2 revisions

Cannot reproduce (tried at least 20 times), Fedora 24 64bit r54684, but there's crash after closing unsaved project.
1.Use project from attachment.
2.Use Michaels steps to reproduce BUT using mouse only, so delete items with "-" and add new item with +.
3.Close lazarus (it'll ask about saving project changes - say NO).

FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $00000000008E1A6F line 7070 of propedits.pp
  $00000000008E183E line 7021 of propedits.pp
  $00000000009D3013 line 1836 of ../designer/menueditor.pp
  $00000000004321C0
  $000000000048A6D7 line 2318 of include/application.inc
  $000000000048709C line 1079 of include/application.inc
  $00000000004848EF line 145 of include/application.inc
  $00000000004321C0
  $0000000000470E19 line 38 of gtk2/interfaces.pas
  $000000000043669E
TApplication.HandleException Access violation
  Stack trace:
  $00000000008E1A6F line 7070 of propedits.pp
  $00000000008E183E line 7021 of propedits.pp
  $00000000009D3013 line 1836 of ../designer/menueditor.pp
  $00000000004321C0
  $000000000048A6D7 line 2318 of include/application.inc
  $000000000048709C line 1079 of include/application.inc
  $00000000004848EF line 145 of include/application.inc
  $00000000004321C0
  $0000000000470E19 line 38 of gtk2/interfaces.pas
  $000000000043669E
Exception at 00000000008E1A6F: EAccessViolation:

EDIT: Same problem with QtLCL

[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $00000000008D28EF line 7070 of propedits.pp
  $00000000008D26BE line 7021 of propedits.pp
  $00000000009C3E93 line 1836 of ../designer/menueditor.pp
  $0000000000436270
  $000000000048E787 line 2318 of include/application.inc
  $000000000048B14C line 1079 of include/application.inc
  $000000000048899F line 145 of include/application.inc
  $0000000000436270
  $0000000000474EC9 line 39 of qt/interfaces.pp
  $000000000043A74E
TApplication.HandleException Access violation
  Stack trace:
  $00000000008D28EF line 7070 of propedits.pp
  $00000000008D26BE line 7021 of propedits.pp
  $00000000009C3E93 line 1836 of ../designer/menueditor.pp
  $0000000000436270
  $000000000048E787 line 2318 of include/application.inc
  $000000000048B14C line 1079 of include/application.inc
  $000000000048899F line 145 of include/application.inc
  $0000000000436270
  $0000000000474EC9 line 39 of qt/interfaces.pp
  $000000000043A74E

Zeljan Rikalo

2017-05-10 20:03

developer   ~0100220

@Michael, what is your glib2 version ?

Michl

2017-05-10 20:47

developer   ~0100221

> I don't use the component tree in the object inspector.

Bingo! That was the missing point! Now I can reproduce the crash!

Zeljan Rikalo

2017-05-10 21:16

developer   ~0100223

With lazarus qt I cannot reproduce crash but after clicking on newly added item (step 6.) menu completelly dissappears from menu editor form

Michael Van Canneyt

2017-05-10 23:31

administrator   ~0100227

@zeljan

libgtk-x11-2.0.so.0.2400.30

@michl:
I am glad you can reproduce it, now there is hope it can be fixed :-)
Seems like the component combobox works different from the component tree...

Zeljan Rikalo

2017-05-11 09:28

developer   ~0100231

@Michael NOT gtk2 version, glib2 version :)

Michael Van Canneyt

2017-05-11 09:56

administrator   ~0100232

glib2 is 2.0.

I don't see how this is relevant.
The issue is clearly in Lazarus:
The problem is there with the way the combobox is filled.

Michl

2017-05-11 10:16

developer   ~0100233

I think, I found it. Will look, if there are sideeffects.

Michl

2017-05-11 10:38

developer   ~0100235

Last edited: 2017-05-11 10:39

View 2 revisions

There was a line commented in revision 52260 (MenuDesigner: Jump also to an existing OnClick handler. Fix crash when changing projects.):

Line 1963 in menueditor.pp:

...
  GlobalDesignHook.PersistentAdded(newMI, not isSeparator);
// GlobalDesignHook.Modified(newMI); // <----- this line
  FShadowMenu.FDesigner.FGui.AddingItem := False;
...

If i uncomment the line, everything seems to work, also when I change the project, but I'm not, if I miss something. So I assign this issue to Juha.

Juha Manninen

2017-05-11 11:07

developer   ~0100236

Thanks Michl.
Damn, I guess I just tested if the call is needed and then left it commented out because things worked for me.
Now fixed.

Zeljan Rikalo

2017-05-11 13:08

developer   ~0100237

@Michael, we are using g_main_context* for messages processing in gtk2, so it can be relevant.

Michael Van Canneyt

2017-05-11 14:12

administrator   ~0100238

I can confirm the bug is fixed!
Many thanks to all for fixing this...

Michael Van Canneyt

2017-05-11 14:13

administrator   ~0100239

Small addendum.
When closing the IDE, I do get
LAZARUS END - cleaning up ...
Hint: (lazarus) [TMainIDE.Destroy] B -> inherited Destroy... TMainIDE
Hint: (lazarus) [TMainIDE.Destroy] END
[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $0000000000A4641E line 7070 of propedits.pp
  $0000000000A4618D line 7021 of propedits.pp
  $0000000000B7B0D2 line 1836 of ../designer/menueditor.pp
  $0000000000434901 line 288 of ../inc/objpas.inc
  $000000000049F258 line 2349 of include/application.inc
  $000000000049F128 line 2318 of include/application.inc
  $000000000049AAE1 line 1079 of include/application.inc
  $00000000004976C3 line 145 of include/application.inc
  $0000000000434901 line 288 of ../inc/objpas.inc
  $00000000004814DF line 2193 of forms.pp
  $000000000047C1A8 line 38 of interfaces.pas
  $0000000000439E96 line 922 of ../inc/system.inc
  $000000000043A220 line 998 of ../inc/system.inc
  $000000000043A269 line 1041 of ../inc/system.inc
  $000000000041EC3F line 161 of lazarus.pp
TApplication.HandleException Access violation
  Stack trace:
  $0000000000A4641E line 7070 of propedits.pp
  $0000000000A4618D line 7021 of propedits.pp
  $0000000000B7B0D2 line 1836 of ../designer/menueditor.pp
  $0000000000434901 line 288 of ../inc/objpas.inc
  $000000000049F258 line 2349 of include/application.inc
  $000000000049F128 line 2318 of include/application.inc
  $000000000049AAE1 line 1079 of include/application.inc
  $00000000004976C3 line 145 of include/application.inc
  $0000000000434901 line 288 of ../inc/objpas.inc
  $00000000004814DF line 2193 of forms.pp
  $000000000047C1A8 line 38 of interfaces.pas
  $0000000000439E96 line 922 of ../inc/system.inc
  $000000000043A220 line 998 of ../inc/system.inc
  $000000000043A269 line 1041 of ../inc/system.inc
  $000000000041EC3F line 161 of lazarus.pp
Exception at 0000000000A4641E: EAccessViolation:
Access violation.

Michl

2017-05-17 23:04

developer   ~0100373

On Windows, I have a AV by closing the IDE with openend menu editor. I fixed this in revision 54957. I can't reproduce this bug nor your bug on Linux, but maybe it is fixed now too?!

Issue History

Date Modified Username Field Change
2017-05-10 14:23 Michael Van Canneyt New Issue
2017-05-10 14:23 Michael Van Canneyt File Added: bug.zip
2017-05-10 14:29 Michael Van Canneyt Note Added: 0100196
2017-05-10 14:30 Michael Van Canneyt Note Added: 0100197
2017-05-10 15:03 Mattias Gaertner Fixed in Revision => 54849
2017-05-10 15:03 Mattias Gaertner Note Added: 0100198
2017-05-10 15:03 Mattias Gaertner Status new => resolved
2017-05-10 15:03 Mattias Gaertner Resolution open => fixed
2017-05-10 15:03 Mattias Gaertner Assigned To => Mattias Gaertner
2017-05-10 15:24 Michael Van Canneyt Note Added: 0100199
2017-05-10 15:24 Michael Van Canneyt Status resolved => feedback
2017-05-10 15:25 Michael Van Canneyt Note Edited: 0100199 View Revisions
2017-05-10 15:34 Michael Van Canneyt Note Added: 0100200
2017-05-10 15:34 Michael Van Canneyt Status feedback => assigned
2017-05-10 16:14 Mattias Gaertner Note Added: 0100202
2017-05-10 16:14 Mattias Gaertner Status assigned => resolved
2017-05-10 16:26 Michael Van Canneyt Note Added: 0100203
2017-05-10 16:26 Michael Van Canneyt Status resolved => assigned
2017-05-10 16:26 Michael Van Canneyt Resolution fixed => reopened
2017-05-10 16:30 Michael Van Canneyt Note Added: 0100204
2017-05-10 16:44 Mattias Gaertner Note Added: 0100205
2017-05-10 16:54 Michael Van Canneyt Note Added: 0100207
2017-05-10 17:29 Mattias Gaertner Fixed in Revision 54849 => 54849, 54857
2017-05-10 17:29 Mattias Gaertner Note Added: 0100209
2017-05-10 17:29 Mattias Gaertner Status assigned => resolved
2017-05-10 17:29 Mattias Gaertner Resolution reopened => fixed
2017-05-10 17:37 Michael Van Canneyt Note Added: 0100210
2017-05-10 17:37 Michael Van Canneyt Status resolved => assigned
2017-05-10 17:37 Michael Van Canneyt Resolution fixed => reopened
2017-05-10 17:55 Mattias Gaertner Note Added: 0100211
2017-05-10 19:06 Michael Van Canneyt Note Added: 0100213
2017-05-10 19:26 Mattias Gaertner Fixed in Revision 54849, 54857 => 54849, 54857, 54863
2017-05-10 19:26 Mattias Gaertner Note Added: 0100215
2017-05-10 19:26 Mattias Gaertner Status assigned => resolved
2017-05-10 19:26 Mattias Gaertner Resolution reopened => fixed
2017-05-10 19:40 Michl Note Added: 0100216
2017-05-10 19:46 Michael Van Canneyt Note Added: 0100217
2017-05-10 19:49 Michael Van Canneyt Note Added: 0100218
2017-05-10 19:49 Michael Van Canneyt Status resolved => assigned
2017-05-10 19:49 Michael Van Canneyt Resolution fixed => reopened
2017-05-10 20:00 Zeljan Rikalo Note Added: 0100219
2017-05-10 20:02 Zeljan Rikalo Note Edited: 0100219 View Revisions
2017-05-10 20:03 Zeljan Rikalo Note Added: 0100220
2017-05-10 20:03 Zeljan Rikalo Status assigned => feedback
2017-05-10 20:47 Michl Note Added: 0100221
2017-05-10 21:16 Zeljan Rikalo Note Added: 0100223
2017-05-10 23:31 Michael Van Canneyt Note Added: 0100227
2017-05-10 23:31 Michael Van Canneyt Status feedback => assigned
2017-05-11 09:28 Zeljan Rikalo Note Added: 0100231
2017-05-11 09:56 Michael Van Canneyt Note Added: 0100232
2017-05-11 10:14 Michl Assigned To Mattias Gaertner => Michl
2017-05-11 10:16 Michl Note Added: 0100233
2017-05-11 10:38 Michl Note Added: 0100235
2017-05-11 10:39 Michl Assigned To Michl => Juha Manninen
2017-05-11 10:39 Michl Note Edited: 0100235 View Revisions
2017-05-11 11:07 Juha Manninen Fixed in Revision 54849, 54857, 54863 => 54849, 54857, 54863, r54874
2017-05-11 11:07 Juha Manninen Note Added: 0100236
2017-05-11 11:07 Juha Manninen Status assigned => resolved
2017-05-11 11:07 Juha Manninen Resolution reopened => fixed
2017-05-11 13:08 Zeljan Rikalo Note Added: 0100237
2017-05-11 14:12 Michael Van Canneyt Note Added: 0100238
2017-05-11 14:12 Michael Van Canneyt Status resolved => closed
2017-05-11 14:13 Michael Van Canneyt Note Added: 0100239
2017-05-17 20:45 Zeljan Rikalo Relationship added related to 0031816
2017-05-17 23:01 Michl Assigned To Juha Manninen => Michl
2017-05-17 23:01 Michl Status closed => assigned
2017-05-17 23:01 Michl Resolution fixed => reopened
2017-05-17 23:01 Michl Fixed in Revision 54849, 54857, 54863, r54874 => 54849, 54857, 54863, r54874, r54957
2017-05-17 23:01 Michl Status assigned => resolved
2017-05-17 23:01 Michl Resolution reopened => fixed
2017-05-17 23:04 Michl Note Added: 0100373