View Issue Details

IDProjectCategoryView StatusLast Update
0015627LazarusWidgetsetpublic2010-02-12 07:16
ReporterFlávio Etrusco Assigned ToPaul Ishenin  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.28.3 (SVN) 
Fixed in Version0.9.29 (SVN) 
Summary0015627: "Add" in Project Inspector raises AV (in TGtk2WSCustomListBox.SetItemIndex)
DescriptionSteps to reproduce:
1) Open Project Inspector.
2) Click "Add" button in the toolbar (Plus sign).
3) AV dialog is displayed.

OS is Ubuntu 10.04 alfa2+, libgtk2.0-0 package is 2.19.4-1ubuntu1.

I'd say some initialization changed order - hopefully no field changed :-/
Additional InformationStack trace:

#0 SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER at :0
0000001 ?? at :0
0000002 TGTK2WSCUSTOMLISTBOX__SETITEMINDEX(0xb57e3e60, -1, 0xb6cccf40) at gtk2wsstdctrls.pp:515
0000003 TCUSTOMLISTBOX__SENDITEMINDEX(<error reading variable>) at ./include/customlistbox.inc:483
0000004 TCUSTOMLISTBOX__INITIALIZEWND(<error reading variable>) at ./include/customlistbox.inc:113
0000005 TWINCONTROL__CREATEWND(<error reading variable>) at ./include/wincontrol.inc:7009
0000006 TWINCONTROL__CREATEHANDLE(<error reading variable>) at ./include/wincontrol.inc:6906
0000007 TWINCONTROL__HANDLENEEDED(<error reading variable>) at ./include/wincontrol.inc:7357
0000008 TWINCONTROL__CREATEWND(<error reading variable>) at ./include/wincontrol.inc:7025
0000009 TWINCONTROL__CREATEHANDLE(<error reading variable>) at ./include/wincontrol.inc:6906
0000010 TWINCONTROL__HANDLENEEDED(<error reading variable>) at ./include/wincontrol.inc:7357
0000011 TWINCONTROL__CREATEWND(<error reading variable>) at ./include/wincontrol.inc:7025
0000012 TCUSTOMNOTEBOOK__CREATEWND(<error reading variable>) at ./include/customnotebook.inc:237
0000013 TWINCONTROL__CREATEHANDLE(<error reading variable>) at ./include/wincontrol.inc:6906
0000014 TWINCONTROL__HANDLENEEDED(<error reading variable>) at ./include/wincontrol.inc:7357
0000015 TWINCONTROL__CREATEWND(<error reading variable>) at ./include/wincontrol.inc:7025
0000016 TSCROLLINGWINCONTROL__CREATEWND(<error reading variable>) at ./include/scrollingwincontrol.inc:32
0000017 TCUSTOMFORM__CREATEWND(<error reading variable>) at ./include/customform.inc:2093
0000018 TFORM__CREATEWND(<error reading variable>) at ./include/customform.inc:2493
0000019 TWINCONTROL__CREATEHANDLE(<error reading variable>) at ./include/wincontrol.inc:6906
0000020 TWINCONTROL__UPDATESHOWING(<error reading variable>) at ./include/wincontrol.inc:4193
0000021 TCUSTOMFORM__UPDATESHOWING(<error reading variable>) at ./include/customform.inc:2306
0000022 TWINCONTROL__UPDATECONTROLSTATE(<error reading variable>) at ./include/wincontrol.inc:5957
0000023 TWINCONTROL__CMVISIBLECHANGED({MSG = 45067, WPARAM = 1, LPARAM = 0, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}, <error reading variable>) at ./include/wincontrol.inc:7791
0000024 SYSTEM_TOBJECT_$__DISPATCH$formal at :0
0000025 TWINCONTROL__GETDEVICECONTEXT(45067, <error reading variable>) at ./include/wincontrol.inc:7774
0000026 TWINCONTROL__WNDPROC({MSG = 45067, WPARAM = 1, LPARAM = 0, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}, <error reading variable>) at ./include/wincontrol.inc:5102
0000027 TCUSTOMFORM__WNDPROC({MSG = 45067, WPARAM = 1, LPARAM = 0, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}, <error reading variable>) at ./include/customform.inc:1097
0000028 TCONTROL__PERFORM(45067, 1, 0, <error reading variable>) at ./include/control.inc:1046
0000029 TCONTROL__SETVISIBLE(true, <error reading variable>) at ./include/control.inc:3697
0000030 TCUSTOMFORM__SETVISIBLE(true, <error reading variable>) at ./include/customform.inc:354
0000031 TCUSTOMFORM__SHOW(<error reading variable>) at ./include/customform.inc:1795
0000032 TCUSTOMFORM__SHOWMODAL(<error reading variable>) at ./include/customform.inc:2366
0000033 SHOWADDTOPROJECTDLG(0xb6e32180, 0x8) at addtoprojectdlg.pas:130
0000034 TPROJECTINSPECTORFORM__ADDBITBTNCLICK(0xb6995440, <error reading variable>) at projectinspector.pas:253
0000035 TCONTROL__CLICK(<error reading variable>) at ./include/control.inc:2294
0000036 TCUSTOMSPEEDBUTTON__CLICK(<error reading variable>) at ./include/speedbutton.inc:114
0000037 TCUSTOMSPEEDBUTTON__WMLBUTTONUP({MSG = 514, KEYS = 1, XPOS = 54, YPOS = 2, POS = {X = 54, Y = 2}, DUMMY = 131126, RESULT = 0}, <error reading variable>) at ./include/speedbutton.inc:796
0000038 SYSTEM_TOBJECT_$__DISPATCH$formal at :0
0000039 TCUSTOMSPEEDBUTTON__WSREGISTERCLASS(0xbfffeb6c) at ./include/speedbutton.inc:747
0000040 TCONTROL__PERFORM(514, 1, 131126, <error reading variable>) at ./include/control.inc:1046
0000041 TWINCONTROL__ISCONTROLMOUSEMSG({MSG = 514, KEYS = 1, XPOS = 114, YPOS = 2, POS = {X = 114, Y = 2}, DUMMY = 131186, RESULT = 0}, <error reading variable>) at ./include/wincontrol.inc:4524
0000042 TWINCONTROL__WNDPROC({MSG = 514, WPARAM = 1, LPARAM = 131186, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 114, LPARAMHI = 2, RESULTLO = 0, RESULTHI = 0}, <error reading variable>) at ./include/wincontrol.inc:5067
0000043 TCUSTOMFORM__WNDPROC({MSG = 514, WPARAM = 1, LPARAM = 131186, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 114, LPARAMHI = 2, RESULTLO = 0, RESULTHI = 0}, <error reading variable>) at ./include/customform.inc:1097
0000044 DELIVERMESSAGE(0xb6ab5bb0, void) at lclmessageglue.pas:111
0000045 DELIVERMESSAGE(0xb6ab5bb0, void) at /home/etrusco/projetos/lazarus/lcl/interfaces/gtk/gtkproc.inc:3711
0000046 DELIVERMOUSEUPMESSAGE(0x8c7c1e0, 0x8ce00c0, 0xb6ab5bb0) at /home/etrusco/projetos/lazarus/lcl/interfaces/gtk/gtkcallback.inc:1729
0000047 GTKMOUSEBTNRELEASE(0x8c7c1e0, 0x8ce00c0, 0xb6ab5bb0) at /home/etrusco/projetos/lazarus/lcl/interfaces/gtk/gtkcallback.inc:1788
0000048 _gtk_marshal_BOOLEAN__BOXED(0x8de08b8, 0xb6cccf40, 2, 0x8cbc318, 0xbfffee7c, 0x8231d60) at /build/buildd/gtk+2.0-2.19.4/gtk/gtkmarshalers.c:84
0000049 IA__g_closure_invoke(0x8de08b8, 0xbfffee90, 2, 0x8cbc318, 0xbfffee7c) at /build/buildd/glib2.0-2.23.2/gobject/gclosure.c:767
0000050 signal_emit_unlocked_R(<value optimized out>, <value optimized out>, 0x8c7c1e0, 0xbfffefd8, 0x8cbc318) at /build/buildd/glib2.0-2.23.2/gobject/gsignal.c:3243
0000051 IA__g_signal_emit_valist(0x8c7c1e0, 34, 0, 0xbffff03c 'h'0000240#255#191#160#133#192#8#148#240#255#191#244#15#233#183#224#193#199#8#192) at /build/buildd/glib2.0-2.23.2/gobject/gsignal.c:2986
0000052 IA__g_signal_emit(0x8c7c1e0, 34, 0) at /build/buildd/glib2.0-2.23.2/gobject/gsignal.c:3033
#53 gtk_widget_event_internal(<value optimized out>, 0x8ce00c0) at /build/buildd/gtk+2.0-2.19.4/gtk/gtkwidget.c:4941
#54 IA__gtk_propagate_event(0x8c7c1e0, 0x8ce00c0) at /build/buildd/gtk+2.0-2.19.4/gtk/gtkmain.c:2447
0000055 IA__gtk_main_do_event(0x8ce00c0) at /build/buildd/gtk+2.0-2.19.4/gtk/gtkmain.c:1647
0000056 gdk_event_dispatch(0x8c0a620, 0, 0x0) at /build/buildd/gtk+2.0-2.19.4/gdk/x11/gdkevents-x11.c:2372
0000057 g_main_dispatch at /build/buildd/glib2.0-2.23.2/glib/gmain.c:1960
0000058 IA__g_main_context_dispatch(0x8c0a668) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:2513
0000059 g_main_context_iterate(0x8c0a668, <value optimized out>, 1, 0x8becdf8) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:2591
0000060 IA__g_main_context_iteration(0x8c0a668, -1) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:2654
0000061 IA__gtk_main_iteration_do(-1) at /build/buildd/gtk+2.0-2.19.4/gtk/gtkmain.c:1320
0000062 TGTKWIDGETSET__APPWAITMESSAGE(<error reading variable>) at /home/etrusco/projetos/lazarus/lcl/interfaces/gtk/gtkwidgetset.inc:1286
0000063 TAPPLICATION__IDLE(true, <error reading variable>) at ./include/application.inc:363
0000064 TAPPLICATION__HANDLEMESSAGE(<error reading variable>) at ./include/application.inc:1200
0000065 TAPPLICATION__RUNLOOP(<error reading variable>) at ./include/application.inc:1333
0000066 TWIDGETSET__APPRUN(0x8087b40 <TAPPLICATION__RUNLOOP>, <error reading variable>) at ./include/interfacebase.inc:49
0000067 TAPPLICATION__RUN(<error reading variable>) at ./include/application.inc:1321
0000068 main at lazarus.pp:112
TagsNo tags attached.
Fixed in Revision23695
LazTarget-
WidgetsetGTK 2
Attached Files

Activities

Flávio Etrusco

2010-01-29 19:15

developer   ~0034031

Forgot to mention that the AV occurs in the inlined function ClearCursor (which of course doesn't show in the trace).

  procedure ClearCursor; inline;
  begin
    if gtk_tree_row_reference_valid(PGtkTreeView(Widget)^.priv^.cursor) then
    begin
      gtk_tree_row_reference_free(PGtkTreeView(Widget)^.priv^.cursor);
      PGtkTreeView(Widget)^.priv^.cursor := nil;
    end;
  end;

PGtkTreeView(Widget)^.priv^.cursor = $FFFFD8F0.
Calls to either gtk_tree_row_reference_valid or gtk_tree_row_reference_free will result in AV.

Flávio Etrusco

2010-02-09 04:48

developer   ~0034308

Just for reference, with assistance from Paul, the original code was introduced in svn r13884, which fixed issue http://bugs.freepascal.org/view.php?id=10682.

Paul Ishenin

2010-02-12 04:16

manager   ~0034401

Please test and close if ok.

Flávio Etrusco

2010-02-12 07:16

developer   ~0034403

Thanks, the problem is fixed.

Issue History

Date Modified Username Field Change
2010-01-29 18:56 Flávio Etrusco New Issue
2010-01-29 18:56 Flávio Etrusco Widgetset => GTK 2
2010-01-29 19:15 Flávio Etrusco Note Added: 0034031
2010-02-09 04:39 Paul Ishenin Status new => assigned
2010-02-09 04:39 Paul Ishenin Assigned To => Paul Ishenin
2010-02-09 04:48 Flávio Etrusco Note Added: 0034308
2010-02-12 03:27 Paul Ishenin Fixed in Revision => 23695
2010-02-12 03:27 Paul Ishenin LazTarget => -
2010-02-12 04:16 Paul Ishenin Status assigned => resolved
2010-02-12 04:16 Paul Ishenin Fixed in Version => 0.9.29 (SVN)
2010-02-12 04:16 Paul Ishenin Resolution open => fixed
2010-02-12 04:16 Paul Ishenin Note Added: 0034401
2010-02-12 07:16 Flávio Etrusco Status resolved => closed
2010-02-12 07:16 Flávio Etrusco Note Added: 0034403