View Issue Details

IDProjectCategoryView StatusLast Update
0031152LazarusIDEpublic2016-12-31 14:15
ReporterCudaText man Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformUbuntu 14.4 x64 
Product Version1.6.3 (SVN) 
Summary0031152: IDE Menu designer crash
DescriptionCrash on adding separator menuitem.
Steps To Reproduceget ATSynEdit https://github.com/alexey-t/atSynedit
open ATSynEdit demo: apps/demo_editor.
open main form.
open it's MainMenu in designer dialog.
focus menu item "tests / show pane" (last item in 'tests').

press buttons on left toolbar of dlg-
1- add/above
2- add/above
3- separator ==> this is crash
TagsNo tags attached.
Fixed in Revisionr53817
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

related to 0031138 resolvedJuha Manninen TMainMenu Seperator causes exception 
related to 0030674 new Carbon: PopupMenu designer crashes on opening it 

Activities

CudaText man

2016-12-21 22:15

reporter  

bug-menu.png (79,841 bytes)   
bug-menu.png (79,841 bytes)   

Zeljan Rikalo

2016-12-22 09:19

developer   ~0097011

I've spotted crash with QtLCL too (on linux, mac and win32), but not sure if that was because of adding separator.

CudaText man

2016-12-31 11:46

reporter  

menufix.diff (855 bytes)   
Index: designer/menueditorform.pas
===================================================================
--- designer/menueditorform.pas	(revision 53812)
+++ designer/menueditorform.pas	(working copy)
@@ -33,6 +33,7 @@
   // IdeIntf
   FormEditingIntf, PropEdits,
   // IDE
+  ObjectInspector,
   LazarusIDEStrConsts, MenuDesignerBase, MenuShortcuts;
 
 type
@@ -587,12 +588,18 @@
 end;
 
 procedure TMenuDesignerForm.EndUpdate;
+var
+  Dlg: TObjectInspectorDlg;
 begin
   if FUpdateCount<=0 then
     RaiseGDBException('');
   Dec(FUpdateCount);
   if FUpdateCount = 0 then
-    OnDesignerSetSelection(FormEditingHook.GetCurrentObjectInspector.Selection);
+  begin
+    Dlg := FormEditingHook.GetCurrentObjectInspector;
+    if Assigned(Dlg) then
+      OnDesignerSetSelection(Dlg.Selection);
+  end;
 end;
 
 function TMenuDesignerForm.IsUpdate: Boolean;
menufix.diff (855 bytes)   

CudaText man

2016-12-31 11:47

reporter   ~0097186

Fix added
Reason of bug== ObjInsp dialog was closed here. Menu editor must check that OI form <>nil.

Juha Manninen

2016-12-31 14:15

developer   ~0097188

Thanks for the patch. I applied it after cosmetic changes.
BTW, ObjectInspector is part of IDEIntf.

Issue History

Date Modified Username Field Change
2016-12-21 22:15 CudaText man New Issue
2016-12-21 22:15 CudaText man File Added: bug-menu.png
2016-12-22 09:19 Zeljan Rikalo Note Added: 0097011
2016-12-23 13:03 Juha Manninen Relationship added related to 0031138
2016-12-31 10:39 Juha Manninen Relationship added related to 0030674
2016-12-31 11:46 CudaText man File Added: menufix.diff
2016-12-31 11:47 CudaText man Note Added: 0097186
2016-12-31 13:37 Juha Manninen Assigned To => Juha Manninen
2016-12-31 13:37 Juha Manninen Status new => assigned
2016-12-31 14:15 Juha Manninen Fixed in Revision => r53817
2016-12-31 14:15 Juha Manninen LazTarget => -
2016-12-31 14:15 Juha Manninen Note Added: 0097188
2016-12-31 14:15 Juha Manninen Status assigned => resolved
2016-12-31 14:15 Juha Manninen Resolution open => fixed