View Issue Details

IDProjectCategoryView StatusLast Update
0015840LazarusWidgetsetpublic2010-03-30 10:15
ReporterFlávio Etrusco (notifications not working)Assigned ToMattias Gaertner 
PrioritynormalSeveritycrashReproducibilityrandom
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target VersionFixed in Version 
Summary0015840: Random crash in IDE with gtk2 (Ubuntu Lucid) :TApplication.HandleException Invalid floating point operation
DescriptionLazarus is latest SVN r23772.
Platform is Ubuntu Lucid up-to-date as of today (2010-02-24 if Mantis doesn't save this info).
I randomly get this error, usually when starting Lazarus or when starting the project (debugging).

Seems like a bug in the gtk theme, but doesn't happen in any other application and seems to occur with any (several, at least) theme.
Maybe the something regarding the form size?
Additional InformationLast output:
[Thread debugging using libthread_db enabled]
[WARNING] Out of OEM specific VK codes, changing to unassigned
[WARNING] Out of unassigned VK codes, assigning $FF
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/etrusco/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
[TMainIDE.DoRunProject] A
TMainIDE.DoInitProjectRun A True 0
TMainIDE.DoInitProjectRun B


Stack trace:

Program received signal SIGFPE, Arithmetic exception.
0x028cf0f6 in rsvg_handle_get_dimensions_sub () from /usr/lib/librsvg-2.so.2
(gdb) bt
#0 0x028cf0f6 in rsvg_handle_get_dimensions_sub ()
   from /usr/lib/librsvg-2.so.2
0000001 0x028cf243 in rsvg_handle_get_dimensions () from /usr/lib/librsvg-2.so.2
0000002 0x028d5777 in rsvg_handle_get_pixbuf_sub () from /usr/lib/librsvg-2.so.2
0000003 0x028d58a5 in rsvg_handle_get_pixbuf () from /usr/lib/librsvg-2.so.2
0000004 0x0280db44 in ?? () from /usr/lib/gtk-2.0/2.10.0/loaders/svg_loader.so
0000005 0x0026b741 in IA__gdk_pixbuf_loader_close (loader=0x914e150,
    error=0x8ea258c)
    at /build/buildd/gtk+2.0-2.19.5/gdk-pixbuf/gdk-pixbuf-loader.c:719
0000006 0x00268f8f in load_from_stream (loader=<value optimized out>,
    stream=<value optimized out>, cancellable=0x0, error=0x8ea258c)
    at /build/buildd/gtk+2.0-2.19.5/gdk-pixbuf/gdk-pixbuf-io.c:1543
0000007 0x002690cd in IA__gdk_pixbuf_new_from_stream_at_scale (stream=0x9147600,
    width=20, height=20, preserve_aspect_ratio=1, cancellable=0x0,
    error=0x8ea258c)
    at /build/buildd/gtk+2.0-2.19.5/gdk-pixbuf/gdk-pixbuf-io.c:1613
0000008 0x00393564 in icon_info_ensure_scale_and_pixbuf (
    icon_info=<value optimized out>, scale_only=<value optimized out>)
    at /build/buildd/gtk+2.0-2.19.5/gtk/gtkicontheme.c:2925
0000009 0x00393e11 in IA__gtk_icon_info_load_icon (icon_info=0x8ea2560,
    error=0xbfffe1d8) at /build/buildd/gtk+2.0-2.19.5/gtk/gtkicontheme.c:3066
0000010 0x003960b4 in IA__gtk_icon_theme_load_icon (icon_theme=0x8ed70a0,
    icon_name=0x5cf861 'gtk-no', size=20, flags=0, error=0xbfffe1d8)
---Type <return> to continue, or q <return> to quit---
    at /build/buildd/gtk+2.0-2.19.5/gtk/gtkicontheme.c:1547
0000011 0x0038fe8a in render_icon_name_pixbuf (icon_set=0x8f54498,
    style=0x8e5eb08, direction=GTK_TEXT_DIR_NONE, state=GTK_STATE_NORMAL,
    size=<value optimized out>, widget=0x8e62018, detail=0x0)
    at /build/buildd/gtk+2.0-2.19.5/gtk/gtkiconfactory.c:1492
0000012 find_and_render_icon_source (icon_set=0x8f54498, style=0x8e5eb08,
    direction=GTK_TEXT_DIR_NONE, state=GTK_STATE_NORMAL,
    size=<value optimized out>, widget=0x8e62018, detail=0x0)
    at /build/buildd/gtk+2.0-2.19.5/gtk/gtkiconfactory.c:1569
0000013 IA__gtk_icon_set_render_icon (icon_set=0x8f54498, style=0x8e5eb08,
    direction=GTK_TEXT_DIR_NONE, state=GTK_STATE_NORMAL,
    size=<value optimized out>, widget=0x8e62018, detail=0x0)
    at /build/buildd/gtk+2.0-2.19.5/gtk/gtkiconfactory.c:1676
0000014 0x082d0333 in GETSTOCKIMAGE (this=0xe7bd80, STOCKID=12, IMAGE=@0xbfffe294,
    MASK=@0xbfffe290) at gtk2themes.pas:194
0000015 0x08270cda in REALIZEKIND (this=0x12d02d0) at include/bitbtn.inc:205
0000016 0x08270a23 in SETKIND (this=0x12d02d0, AVALUE=BKNOTOALL)
    at include/bitbtn.inc:137
0000017 0x0838f383 in FORMCREATE (this=0x2bd1ea0, SENDER=0x2bd1ea0)
    at infobuild.pp:137
0000018 0x0807f2d3 in DOCREATE (this=0x2bd1ea0) at include/customform.inc:753
0000019 0x08081188 in CREATE (this=0x2bd1ea0, AOWNER=0x1397f0, vmt=0x0)
    at include/customform.inc:1628
---Type <return> to continue, or q <return> to quit---
0000020 0x08083309 in CREATE (this=0x2bd1ea0, THEOWNER=0x1397f0, vmt=0x8ad520c)
    at include/customform.inc:2540
0000021 0x0838f9dd in CREATEDIALOG (this=0x8ad5678, AOWNER=0x1397f0,
    APROJECT=0x165b7e8 '/home/etrusco/projetos/multi-monitor/project1.lpr',
    ASTATUS=0x8a33508 'Compiling...') at infobuild.pp:243
0000022 0x080b7cc3 in DOBUILDPROJECT (this=0xfd85a0, AREASON=CRRUN, FLAGS=16)
    at main.pp:10236
0000023 0x080b8b14 in DOINITPROJECTRUN (this=0xfd85a0) at main.pp:10485
0000024 0x080b8c71 in DORUNPROJECT (this=0xfd85a0) at main.pp:10510
0000025 0x080a2dbc in MNURUNPROJECTCLICKED (this=0xfd85a0, SENDER=0x160c720)
    at main.pp:3853
0000026 0x08453d88 in MENUITEMCLICK (this=0x160c720, SENDER=0x10370a0)
    at menuintf.pas:538
0000027 0x08456b4a in MENUITEMCLICK (this=0x160c720, SENDER=0x10370a0)
    at menuintf.pas:1545
0000028 0x081c6d11 in CLICK (this=0x10370a0) at include/menuitem.inc:75
0000029 0x081c687d in HANDLEITEM (ITEM=0x10370a0, parentfp=0xbfffe664)
    at include/menu.inc:258
0000030 0x081c681b in ISSHORTCUT (this=0x1609420, MESSAGE=...)
    at include/menu.inc:277
0000031 0x08081cff in ISSHORTCUT (this=0x13527e0, MESSAGE=...)
    at include/customform.inc:2015
0000032 0x081b2b10 in DOREMAININGKEYDOWN (this=0x12e08a0, MESSAGE=...)
---Type <return> to continue, or q <return> to quit---
    at include/wincontrol.inc:5529
0000033 0x081b49e7 in WMKEYDOWN (this=0x12e08a0, MESSAGE=...)
    at include/wincontrol.inc:6853
0000034 0x0806ba1a in SYSTEM_TOBJECT_$__DISPATCH$formal ()
0000035 0x081b49d0 in ?? ()
0000036 0x081b1de2 in WNDPROC (this=0x12e08a0, MESSAGE=...)
    at include/wincontrol.inc:5104
0000037 0x08236e37 in DELIVERMESSAGE (TARGET=0x12e08a0, AMESSAGE=@0xbfffe87c)
    at lclmessageglue.pas:111
0000038 0x082288eb in DELIVERMESSAGE (TARGET=0x12e08a0, AMESSAGE=@0xbfffe87c)
    at ../gtk/gtkproc.inc:3711
0000039 0x0822681a in DELIVERKEYMESSAGE (TARGET=0x12e08a0, AMESSAGE=@0xbfffe87c,
    parentfp=0xbfffe89c) at ../gtk/gtkproc.inc:1967
0000040 0x08225d2d in HANDLEGTKKEYUPDOWN (AWIDGET=0x8f0b900, AEVENT=0x907e9f8,
    ADATA=0x12e08a0, ABEFOREEVENT=false, AHANDLEDOWN=true,
    AEVENTNAME=0x89770dc 'key-press-event') at ../gtk/gtkproc.inc:2343
Dwarf Error: Cannot find DIE at 0x124e4d referenced from DIE at 0x1145e9 [in module /home/etrusco/projetos/lazarus/lazarus.dbg]
TagsNo tags attached.
Fixed in Revision23804
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

related to 0015114 closedJuha Manninen Lazarus IDE dies when trying to select FPC source directory 
related to 0016877 closedJonas Maebe FPC "gtk_tree_view_append_column" function raised exception on execution (EDivByZero) on 64 bit Linux while ok on 32 Bit 

Activities

Mattias Gaertner

2010-02-24 18:53

manager   ~0034732

I can confirm. I tried to debug it, but the error happens inside the gtk. Probably some dangling pointer/buffer overflow.
I've even installed gtk sources (even though I'm not sure it'll help much), but I'm having some difficulty in reproducing it and never get to reproduce the bug while I'm debugging Lazarus inside Lazarus :-/
(I'm not very experienced in plain gdb yet, and seeing the source code would be way better)
Mattias, Paul suggested that changing the exception mask for the library (and said this would be a fix, not a hack, and that fpc needs this in some situations). This seems to work:

diff --git a/lcl/interfaces/gtk2/gtk2widgetset.inc b/lcl/interfaces/gtk2/gtk2widgetset.inc
--- a/lcl/interfaces/gtk2/gtk2widgetset.inc
+++ b/lcl/interfaces/gtk2/gtk2widgetset.inc
@@ -592,7 +592,7 @@ begin
     {$IFDEF windows}
       Set8087CW($133F);
     {$ELSE}
- SetExceptionMask(GetExceptionMask + [exZeroDivide]);
+ SetExceptionMask(GetExceptionMask + [exZeroDivide, exInvalidOp]);
     {$ENDIF}
   {$ENDIF}
   {$ifend}

Paul Gevers

2010-02-28 16:04

reporter   ~0034850

This later fix solves it for me too.

I tested my upload for Ubuntu with and without this patch and when I want to open a project, lazarus-ide was hanging without the patch, but proceeds as expected with the patch. (The issue for me is related to a buggy qtcurve library, but it helps if lazarus-ide doesn't hangs.)

Mattias Gaertner

2010-02-28 22:38

manager   ~0034858

Many thanks.

Issue History

Date Modified Username Field Change
2010-02-24 05:06 Flávio Etrusco (notifications not working) New Issue
2010-02-24 05:06 Flávio Etrusco (notifications not working) Widgetset => GTK 2
2010-02-24 18:53 Mattias Gaertner LazTarget => -
2010-02-24 18:53 Mattias Gaertner Note Added: 0034732
2010-02-24 18:53 Mattias Gaertner Status new => confirmed
2010-02-26 18:48 Zeljan Rikalo Relationship added related to 0015114
2010-02-26 19:07 Flávio Etrusco (notifications not working) Note Added: 0034814
2010-02-27 12:42 Flávio Etrusco (notifications not working) Note Added: 0034825
2010-02-28 16:04 Paul Gevers Note Added: 0034850
2010-02-28 22:38 Mattias Gaertner Fixed in Revision => 23804
2010-02-28 22:38 Mattias Gaertner Note Added: 0034858
2010-02-28 22:38 Mattias Gaertner Assigned To => Mattias Gaertner
2010-02-28 22:38 Mattias Gaertner Status confirmed => resolved
2010-02-28 22:38 Mattias Gaertner Resolution open => fixed
2010-03-30 10:15 Flávio Etrusco (notifications not working) Status resolved => closed
2010-07-09 10:42 Jonas Maebe Relationship added related to 0016877