View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0031138||Lazarus||LCL||public||2016-12-19 08:18||2017-06-05 00:08|
|Reporter||Wolfgang Siebeck||Assigned To||Juha Manninen|
|Summary||0031138: TMainMenu Seperator causes exception|
|Description||When opening a menu containing a seperator it will cause a exception "/usr/share/themes/Breeze/gtk-2.0/../assets/line-h.png,|
borders don't fit within the image". Running this program under the IDE and gdb, the machine will stop completely. A "killall lazarus" from another console via ssh will recover the machine.
|Steps To Reproduce||- Create a simple Form|
- Add a MainMenu
- Add one or more entries to the MainMenu
- Give one of the entries a caption '-' to create a separator
- Save all for your peace of mind
- Run the project and open the menu with the separator.
|Tags||No tags attached.|
|Fixed in Revision||r54765|
Crashtest.src (3,976 bytes)
Setting the Attribute 'Visible' of the Separator to False in the FormCreate of the form will avoid the crash. My current Workaround is
MenuItem1.Visible := False;
||The same error shows up, if you right-click on a TEdit or TMemo to call up the standard context-menu (which also has separators). No such problem exists with applications compiled using Lazarus 1.6.0, using the same version of fpc.|
||Look at changes in gtk2 between 1.6.0 and 1.6.2, also for TMenu** changes in LCL which are merged into fixes.|
This error obviously is not a problem of Lazarus, as I found out by research on the net. So I decided to do a workaround curing the symptom, not the reason. In get2widgetset.inc I inserted before line 1296
raise Ex.Create(Flag + Domain + AMessage);
if Ex <> EInterfaceWarning then
avoiding the exeption. It helps but it should not be done.
The file is exactly the same in Lazarus 1.6.0, so I am somehow flabbergasted by this error. Thanks to Zeljan for pointing me in the right direction.
> The file is exactly the same in Lazarus 1.6.0, so I am somehow flabbergasted
> by this error. Thanks to Zeljan for pointing me in the right direction.
Wolfgang, what is the revision that caused this error?
||Maybe related to 0024476?|
||In r48843 the handling of separator in GTK2 was changed, this may or may not be of relevance to this issue, someone should check r48842 vs r48843.|
I noticed this error first after I updated my Kubuntu to 16.04. I compared the Lazarus files (gtk2widgetset.inc mainly) to versions before 1.6.2 and found no difference so far. So my guess is that the problem is based on the gtk libs of Kubuntu.
I still have a notebook running an older distribution and I will try to verify the problem on Kubuntu 14.04.
My apologies for the late reply, I have been down with dengue for a while :-(.
I must detach myself from this issue because I don't have time nor energy now to study it.
Please somebody find the quilty revision. This is a serious bug after all.
The bug freezes all keyboard and mouse. One option is to kill the Lazarus process from another computer through SSH while bisecting. Another option is to insert some kind of workaround and set a breakpoint for each bisect iteration.
Wolfgang Siebeck found workarounds I understood.
BTW, dengue sounds bad. Are you in tropics? Looking at the symptoms I now realize I maybe had it in India at late 1980's. Huh, I was dying then! Even my front teeth started to waggle at some point but fortunately they rooted back after the diarrea ceased.
Sorry about the delay. I just got my notebook up running Kubuntu 14.04.5 and Lazarus 1.0.10. The questionable line is 1272 in the file gtk2widgetset.inc, but trying to reproduce the crash there was NOT possible. It works without problems.
@Juha Manninen: Yes, I am in the tropics. Phuket, Thailand to be precise.
> ... and Lazarus 1.0.10.
Please use Lazarus trunk when bisecting the quilty revision.
Actually Ctrl-Alt-F1 and so on work after the freeze. Somehow I failed to use it earlier.
I got a backtrace with
$ gdb -batch -ex "run" -ex "bt" MenuShortcut
Attached in MenuBacktrace.txt although it is not very useful.
r48843 by Zeljko solved issue:
but it is not related. After reverting it the system still freezes.
I prevented the freeze by preventing the exception propagating. Somebody please fix it better if you can.
This is yet another GTK2 version related bug. It is not triggered by any certain Lazarus revision.
MenuBacktrace.txt (7,513 bytes)
$ gdb -batch -ex "run" -ex "bt" MenuShortcut [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe82c9700 (LWP 2334)] TApplication.HandleException Invalid borders specified for theme pixmap: /usr/share/themes/Breeze/gtk-2.0/../assets/line-h.png, borders don't fit within the image Stack trace: $0000000000473F66 line 1288 of gtk2/gtk2widgetset.inc $00007FFFF6649374 [New Thread 0x7fffe75a6700 (LWP 2335)] [New Thread 0x7fffe6da5700 (LWP 2336)] Thread 1 "MenuShortcut" received signal SIGSEGV, Segmentation fault. 0x00007ffff692c678 in ?? () from /usr/lib/libgobject-2.0.so.0 #0 0x00007ffff692c678 in () at /usr/lib/libgobject-2.0.so.0 #1 0x00007ffff6935bcc in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0 #2 0x00007ffff6935faf in g_signal_emit () at /usr/lib/libgobject-2.0.so.0 #3 0x00007ffff691f3a4 in () at /usr/lib/libgobject-2.0.so.0 #4 0x00007ffff6921861 in g_object_notify () at /usr/lib/libgobject-2.0.so.0 #5 0x00007ffff6dbc206 in gtk_window_set_mnemonics_visible () at /usr/lib/libgtk-x11-2.0.so.0 #6 0x00007ffff6dbc472 in () at /usr/lib/libgtk-x11-2.0.so.0 #7 0x00007ffff6c14e5a in () at /usr/lib/libgtk-x11-2.0.so.0 #8 0x00007ffff691af75 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0 #9 0x00007ffff692c95c in () at /usr/lib/libgobject-2.0.so.0 #10 0x00007ffff6935bcc in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0 #11 0x00007ffff6935faf in g_signal_emit () at /usr/lib/libgobject-2.0.so.0 #12 0x00007ffff6dabd6e in gtk_widget_map () at /usr/lib/libgtk-x11-2.0.so.0 #13 0x00007ffff6db613e in () at /usr/lib/libgtk-x11-2.0.so.0 #14 0x00007ffff691af75 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0 #15 0x00007ffff692c95c in () at /usr/lib/libgobject-2.0.so.0 #16 0x00007ffff6935bcc in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0 #17 0x00007ffff6935faf in g_signal_emit () at /usr/lib/libgobject-2.0.so.0 #18 0x00007ffff6dab2f6 in gtk_widget_show () at /usr/lib/libgtk-x11-2.0.so.0 #19 0x00007ffff6c15e80 in gtk_dialog_run () at /usr/lib/libgtk-x11-2.0.so.0 #20 0x000000000049f25a in PROMPTUSER (this=0x7ffff7fb93d0, DIALOGCAPTION=0x7ffff7f6d6d8 'MenuShortcut', DIALOGMESSAGE=0x7ffff7efc758 'Invalid borders specified for theme pixmap:'#10' /usr/share/themes/Breeze/gtk-2.0/../assets/line-h.png,'#10'borders don''t fit within the image.'#10#10'Press OK to ignore and risk data corruption.'#10'Press Abort'..., DIALOGTYPE=257, BUTTONS=0x7ffff7f72480, BUTTONCOUNT=2, DEFAULTINDEX=0, ESCAPERESULT=2) at gtk2/gtk2lclintf.inc:1285 #21 0x0000000000597051 in PROMPTUSER (DIALOGCAPTION=0x7ffff7f6d6d8 'MenuShortcut', DIALOGMESSAGE=0x7ffff7efc758 'Invalid borders specified for theme pixmap:'#10' /usr/share/themes/Breeze/gtk-2.0/../assets/line-h.png,'#10'borders don''t fit within the image.'#10#10'Press OK to ignore and risk data corruption.'#10'Press Abort'..., DIALOGTYPE=257, BUTTONS=0x7ffff7f72480, BUTTONCOUNT=2, DEFAULTINDEX=0, ESCAPERESULT=2) at include/lclintf.inc:371 #22 0x0000000000598022 in PROMPTUSER (DIALOGCAPTION=0x7ffff7f6d6d8 'MenuShortcut', DIALOGMESSAGE=0x7ffff7efc758 'Invalid borders specified for theme pixmap:'#10' /usr/share/themes/Breeze/gtk-2.0/../assets/line-h.png,'#10'borders don''t fit within the image.'#10#10'Press OK to ignore and risk data corruption.'#10'Press Abort'..., DIALOGTYPE=257, BUTTONS=..., highBUTTONS=1, DEFAULTINDEX=0, ESCAPERESULT=2) at include/lclintf.inc:530 #23 0x0000000000461ffc in SHOWEXCEPTION (this=0x7ffff7fb8c90, E=0x7ffff7f6d540) at include/application.inc:1585 #24 0x0000000000460b83 in HANDLEEXCEPTION (this=0x7ffff7fb8c90, SENDER=0x7ffff7dffb00) at include/application.inc:1257 #25 0x00000000008414b8 in POPUP (self=0x7fffee4172b0, APOPUPMENU=0x7ffff7dffb00, X=604, Y=339) at gtk2/gtk2wsmenus.pp:670 #26 0x00000000005d6ff6 in POPUP (this=0x7ffff7dffb00, X=604, Y=339) at include/popupmenu.inc:81 #27 0x00000000005d6e60 in POPUP (this=0x7ffff7dffb00) at include/popupmenu.inc:66 #28 0x0000000000468b20 in BUTTON1CLICK (this=0x7ffff7fec370, SENDER=0x7ffff7fedfb0) at Unit_MenuShortcut.pas:44 #29 0x000000000056b908 in CLICK (this=0x7ffff7fedfb0) at include/control.inc:2809 #30 0x00000000005f3609 in CLICK (this=0x7ffff7fedfb0) at include/buttoncontrol.inc:55 #31 0x00000000005f407d in CLICK (this=0x7ffff7fedfb0) at include/buttons.inc:169 #32 0x00000000005f34a4 in WMDEFAULTCLICKED (this=0x7ffff7fedfb0, MESSAGE=...) at include/buttoncontrol.inc:21 #33 0x0000000000430bbf in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal () #34 0x0000000000b47b88 in .Ld56 () #35 0x0000000000b47290 in VMT_$STDCTRLS_$$_TBUTTONCONTROL () #36 0x0000000000000001 in () #37 0x0000000000010407 in () #38 0x00007fffffffd3f8 in () #39 0x00007ffff7fedfb0 in () #40 0x00007fffffffd570 in () #41 0x00007fffffffd5f0 in () #42 0x00007ffff7fedfb0 in () #43 0x0000000000b486b0 in VMT_$STDCTRLS_$$_TBUTTON () #44 0x00007fffffffd3f8 in () #45 0x000000000056a4af in WNDPROC (this=0x7ffff7fedfb0, THEMESSAGE=...) at include/control.inc:2202 #46 0x0000000000558397 in WNDPROC (this=0x7ffff7fedfb0, MESSAGE=...) at include/wincontrol.inc:5396 #47 0x00000000007a7540 in DELIVERMESSAGE (TARGET=0x7ffff7fedfb0, AMESSAGE=0) at lclmessageglue.pas:112 #48 0x00000000007bd04d in GTK2WSBUTTON_CLICKED (AWIDGET=0xd718f0, AINFO=0x7ffff7fb1080) at gtk2/gtk2wsstdctrls.pp:2415 #49 0x00007ffff691af75 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0 #50 0x00007ffff692cf82 in () at /usr/lib/libgobject-2.0.so.0 #51 0x00007ffff6935bcc in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0 #52 0x00007ffff6935faf in g_signal_emit () at /usr/lib/libgobject-2.0.so.0 #53 0x00007ffff6be9025 in () at /usr/lib/libgtk-x11-2.0.so.0 #54 0x00007ffff691af75 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0 #55 0x00007ffff692c95c in () at /usr/lib/libgobject-2.0.so.0 #56 0x00007ffff6935bcc in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0 #57 0x00007ffff6935faf in g_signal_emit () at /usr/lib/libgobject-2.0.so.0 #58 0x00007ffff6be7f89 in () at /usr/lib/libgtk-x11-2.0.so.0 #59 0x00007ffff6c8d7ac in () at /usr/lib/libgtk-x11-2.0.so.0 #60 0x00007ffff691af75 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0 #61 0x00007ffff692d37d in () at /usr/lib/libgobject-2.0.so.0 #62 0x00007ffff693566f in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0 #63 0x00007ffff6935faf in g_signal_emit () at /usr/lib/libgobject-2.0.so.0 #64 0x00007ffff6da58cc in () at /usr/lib/libgtk-x11-2.0.so.0 #65 0x00007ffff6c8bf74 in gtk_propagate_event () at /usr/lib/libgtk-x11-2.0.so.0 #66 0x00007ffff6c8c32b in gtk_main_do_event () at /usr/lib/libgtk-x11-2.0.so.0 #67 0x00007ffff775e46c in () at /usr/lib/libgdk-x11-2.0.so.0 #68 0x00007ffff66425a7 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #69 0x00007ffff6642810 in () at /usr/lib/libglib-2.0.so.0 #70 0x00007ffff66428bc in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0 #71 0x0000000000476dd1 in APPWAITMESSAGE (this=0x7ffff7fb93d0) at gtk2/gtk2widgetset.inc:2412 #72 0x000000000045dde4 in IDLE (this=0x7ffff7fb8c90, WAIT=true) at include/application.inc:407 #73 0x0000000000460c67 in HANDLEMESSAGE (this=0x7ffff7fb8c90) at include/application.inc:1277 #74 0x0000000000461464 in RUNLOOP (this=0x7ffff7fb8c90) at include/application.inc:1413 #75 0x0000000000665f36 in APPRUN (this=0x7ffff7fb93d0, ALOOP=...) at include/interfacebase.inc:54 #76 0x00000000004613e2 in RUN (this=0x7ffff7fb8c90) at include/application.inc:1401
MenuBacktrace.txt (7,513 bytes)
Was the problem still there when changing the GTK2 theme from Breeze to Raleigh or Adwaita ?
After encountering the same issue i've the feeling that it's the Breeze theme that is the real culprit.
I am on Oxygen with Lazarus 1.6.2 now. I applied my workaround from 2016-12-21 and the problem is gone. It is maybe ugly, but it works.
||on Lazarus 1.8 RC1 there's still the same issue and worst. Previously i could fix it by changing the GTK2 theme but now even with another GTK2 theme the target freezes when trying to open a main menu entry.|
||r54765 was backported to fixes_1_8 in r54775. They should behave identically.|
||r54765 is pretty ugly, and it does not fix anything.|
||Zeljko, exactly. It is a workaround. The issue should be fixed properly by somebody who knows GTK2 better.|
||I'm faced to other problems in 1.8RC1 so let's put this on hold until i have more information (unless of course someone also verifies what i said earlier).|
Fedora 24 64bit & Fedora 25 64bit gtk2 ide and gtk2 app I cannot reproduce any freeze. Yes, there's warning (but not exception) about line_h.png with Breeze theme but nothing else. Tested with trunk lazarus, but also without workaround from r54765 and result is same, warning in console but everything works fine.
Looks like (k)ubuntu only related issue.
> Looks like (k)ubuntu only related issue.
No, I have Manjaro + KDE and the whole system froze which made it a nasty bug.
Manjaro has recent versions of everything. I guess GTK2 has changed a warning into an exception in some version.
The workaround has not caused any side-effects in my tests, thus it is good to have until a proper fix is found.
|2016-12-19 08:18||Wolfgang Siebeck||New Issue|
|2016-12-19 08:18||Wolfgang Siebeck||File Added: Crashtest.src|
|2016-12-19 08:37||Wolfgang Siebeck||Note Added: 0096928|
|2016-12-19 09:23||Wolfgang Siebeck||Note Added: 0096930|
|2016-12-19 11:17||Zeljan Rikalo||Note Added: 0096934|
|2016-12-21 03:46||Wolfgang Siebeck||Note Added: 0096976|
|2016-12-23 13:03||Juha Manninen||Relationship added||related to 0031152|
|2016-12-31 14:21||Juha Manninen||Note Added: 0097189|
|2016-12-31 14:22||Juha Manninen||LazTarget||=> -|
|2016-12-31 14:22||Juha Manninen||Assigned To||=> Juha Manninen|
|2016-12-31 14:22||Juha Manninen||Status||new => feedback|
|2017-01-12 14:42||Juha Manninen||Note Edited: 0097189||View Revisions|
|2017-01-12 14:43||Juha Manninen||Note Added: 0097435|
|2017-02-11 23:20||Bart Broersma||Note Added: 0098110|
|2017-02-11 23:23||Bart Broersma||Note Added: 0098111|
|2017-02-11 23:49||Juha Manninen||Relationship added||related to 0024476|
|2017-02-12 03:36||Wolfgang Siebeck||Note Added: 0098113|
|2017-02-12 03:36||Wolfgang Siebeck||Status||feedback => assigned|
|2017-02-13 11:22||Juha Manninen||Note Added: 0098143|
|2017-02-13 11:22||Juha Manninen||Assigned To||Juha Manninen =>|
|2017-02-13 11:22||Juha Manninen||Status||assigned => new|
|2017-02-22 01:02||Juha Manninen||LazTarget||- => 1.8|
|2017-02-22 01:02||Juha Manninen||Target Version||=> 1.8|
|2017-02-26 09:56||Wolfgang Siebeck||Note Added: 0098467|
|2017-02-26 10:28||Juha Manninen||Note Added: 0098468|
|2017-04-28 12:05||Juha Manninen||Note Added: 0099976|
|2017-04-28 12:06||Juha Manninen||File Added: MenuBacktrace.txt|
|2017-04-28 12:30||Juha Manninen||Note Edited: 0099976||View Revisions|
|2017-04-28 12:42||Juha Manninen||Fixed in Revision||=> r54765|
|2017-04-28 12:42||Juha Manninen||Status||new => resolved|
|2017-04-28 12:42||Juha Manninen||Resolution||open => fixed|
|2017-04-28 12:42||Juha Manninen||Assigned To||=> Juha Manninen|
|2017-04-28 12:52||Juha Manninen||Note Edited: 0099976||View Revisions|
|2017-05-02 23:00||BBaz||Note Added: 0100071|
|2017-05-15 13:23||Wolfgang Siebeck||Note Added: 0100317|
|2017-05-19 01:41||BBaz||Note Added: 0100477|
|2017-05-19 08:07||Juha Manninen||Note Added: 0100478|
|2017-05-19 09:08||Zeljan Rikalo||Note Added: 0100480|
|2017-05-19 10:59||Juha Manninen||Note Added: 0100485|
|2017-05-19 11:08||BBaz||Note Added: 0100488|
|2017-05-19 19:43||Zeljan Rikalo||Note Added: 0100503|
|2017-05-19 20:10||Juha Manninen||Note Added: 0100506|