[Lazarus] Application crash when scrolling DB Grid

Petr Hlo┼żek petr at petrhlozek.cz
Tue Mar 20 10:44:01 CET 2018


Hi,

my application uses DB grid and when user hit and hold pgdown/pgup, or
hit CTRL+Home/End, applicaiton always crashes. Gdb gets this
information:

0x000000000091bd68 in
BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT
()
(gdb) bt
#0  0x000000000091bd68 in
BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT
()
#1  0x000000000092053c in
BUFDATASET$_$TCUSTOMBUFDATASET_$__$$_COMPAREBOOKMARKS$TBYTES$TBYTES$$LONGINT
()
#2  0x0000000003736588 in  ()
#3  0x0000000003410718 in  ()
#4  0x00007fffffffc9d8 in  ()
#5  0x00007fffffffcb20 in  ()
#6  0x0000000000000001 in  ()
#7  0x0000000001a9ac98 in  ()
#8  0x00007fffffffca50 in  ()
#9  0x000000000000000f in  ()
#10 0x000000000106f1b0 in .Ld263 ()
#11 0x0000000001ad6778 in  ()
#12 0x000000000066cef0 in WSREGISTERCLASS (self=0x7fffffffca90) at
include/customcontrol.inc:99
#13 0x00000000008ad882 in FIND (this=0x1add2d8, ITEM=0x3736588,
AINDEX=0) at dbgrids.pas:4619
#14 0x00000000008adb65 in INDEXOF (this=0x1add2d8, ITEM=0x3736588) at
dbgrids.pas:4627
#15 0x00000000008ace9d in GETCURRENTROWSELECTED (this=0x1add2d8) at
dbgrids.pas:4388
#16 0x00000000008a8a8a in DRAWROW (this=0x1ad6778, AROW=1) at dbgrids.pas:3084
#17 0x0000000000845cc0 in DRAWALLROWS (this=0x1ad6778) at grids.pas:4174
#18 0x00000000008a88d3 in DRAWALLROWS (this=0x1ad6778) at dbgrids.pas:3054
#19 0x0000000000844465 in PAINT (this=0x1ad6778) at grids.pas:3742
#20 0x000000000066d006 in PAINTWINDOW (this=0x1ad6778, DC=26725384) at
include/customcontrol.inc:132
#21 0x0000000000653c88 in PAINTHANDLER (this=0x1ad6778,
THEMESSAGE=...) at include/wincontrol.inc:4819
#22 0x00000000006581c9 in WMPAINT (this=0x1ad6778, MSG=...) at
include/wincontrol.inc:6772
#23 0x000000000066cf3c in WMPAINT (this=0x1ad6778, MESSAGE=...) at
include/customcontrol.inc:112
#24 0x0000000000431def in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal ()
#25 0x000000000106f1a8 in .Ld263 ()
#26 0x000000000106e8c0 in VMT_$CONTROLS_$$_TCUSTOMCONTROL ()
#27 0x0000000000000001 in  ()
#28 0x000000000000000f in  ()
#29 0x00007fffffffd278 in  ()
#30 0x0000000001ad6778 in  ()
#31 0x00007ffff6c8fb10 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#32 0x00000000031d4660 in  ()
#33 0x00007fffffffd550 in  ()
#34 0x00007fffffffd4f0 in  ()
#35 0x0000000000738500 in
GTK2PROC_$$_GTKEXPOSEEVENT$PGTKWIDGET$PGDKEVENTEXPOSE$POINTER$$BOOLEAN32
()
#36 0x0000000000662a17 in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at
include/control.inc:2234
#37 0x000000000065525d in WNDPROC (this=0x1ad6778, MESSAGE=...) at
include/wincontrol.inc:5396
#38 0x000000000084779a in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at
grids.pas:4701
#39 0x00000000008a3a7d in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at
dbgrids.pas:1444
#40 0x0000000000828792 in DELIVERMESSAGE (TARGET=0x1ad6778,
AMESSAGE=0) at lclmessageglue.pas:112
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) bt
#0  0x000000000091bd68 in
BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT
()
#1  0x000000000092053c in
BUFDATASET$_$TCUSTOMBUFDATASET_$__$$_COMPAREBOOKMARKS$TBYTES$TBYTES$$LONGINT
()
#2  0x0000000003736588 in  ()
#3  0x0000000003410718 in  ()
#4  0x00007fffffffc9d8 in  ()
#5  0x00007fffffffcb20 in  ()
#6  0x0000000000000001 in  ()
#7  0x0000000001a9ac98 in  ()
#8  0x00007fffffffca50 in  ()
#9  0x000000000000000f in  ()
#10 0x000000000106f1b0 in .Ld263 ()
#11 0x0000000001ad6778 in  ()
#12 0x000000000066cef0 in WSREGISTERCLASS (self=0x7fffffffca90) at
include/customcontrol.inc:99
#13 0x00000000008ad882 in FIND (this=0x1add2d8, ITEM=0x3736588,
AINDEX=0) at dbgrids.pas:4619
#14 0x00000000008adb65 in INDEXOF (this=0x1add2d8, ITEM=0x3736588) at
dbgrids.pas:4627
#15 0x00000000008ace9d in GETCURRENTROWSELECTED (this=0x1add2d8) at
dbgrids.pas:4388
#16 0x00000000008a8a8a in DRAWROW (this=0x1ad6778, AROW=1) at dbgrids.pas:3084
#17 0x0000000000845cc0 in DRAWALLROWS (this=0x1ad6778) at grids.pas:4174
#18 0x00000000008a88d3 in DRAWALLROWS (this=0x1ad6778) at dbgrids.pas:3054
#19 0x0000000000844465 in PAINT (this=0x1ad6778) at grids.pas:3742
#20 0x000000000066d006 in PAINTWINDOW (this=0x1ad6778, DC=26725384) at
include/customcontrol.inc:132
#21 0x0000000000653c88 in PAINTHANDLER (this=0x1ad6778,
THEMESSAGE=...) at include/wincontrol.inc:4819
#22 0x00000000006581c9 in WMPAINT (this=0x1ad6778, MSG=...) at
include/wincontrol.inc:6772
#23 0x000000000066cf3c in WMPAINT (this=0x1ad6778, MESSAGE=...) at
include/customcontrol.inc:112
#24 0x0000000000431def in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal ()
#25 0x000000000106f1a8 in .Ld263 ()
#26 0x000000000106e8c0 in VMT_$CONTROLS_$$_TCUSTOMCONTROL ()
#27 0x0000000000000001 in  ()
#28 0x000000000000000f in  ()
#29 0x00007fffffffd278 in  ()
#30 0x0000000001ad6778 in  ()
#31 0x00007ffff6c8fb10 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#32 0x00000000031d4660 in  ()
#33 0x00007fffffffd550 in  ()
#34 0x00007fffffffd4f0 in  ()
#35 0x0000000000738500 in
GTK2PROC_$$_GTKEXPOSEEVENT$PGTKWIDGET$PGDKEVENTEXPOSE$POINTER$$BOOLEAN32
()
#36 0x0000000000662a17 in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at
include/control.inc:2234
#37 0x000000000065525d in WNDPROC (this=0x1ad6778, MESSAGE=...) at
include/wincontrol.inc:5396
#38 0x000000000084779a in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at
grids.pas:4701
#39 0x00000000008a3a7d in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at
dbgrids.pas:1444
#40 0x0000000000828792 in DELIVERMESSAGE (TARGET=0x1ad6778,
AMESSAGE=0) at lclmessageglue.pas:112
---Type <return> to continue, or q <return> to quit---bt
#41 0x000000000072b665 in DELIVERMESSAGE (TARGET=0x1ad6778,
AMESSAGE=0) at gtk2proc.inc:3702
#42 0x0000000000736f92 in DODELIVERPAINTMESSAGE (TARGET=0x1ad6778,
PAINTMSG=...) at gtk2callback.inc:27
#43 0x000000000073706a in DELIVERPAINTMESSAGE (TARGET=0x1ad6778,
THEMESSAGE=0) at gtk2callback.inc:45
#44 0x0000000000737254 in DELIVERGTKPAINTMESSAGE (TARGET=0x1ad6778,
WIDGET=0x31d4660, AREA=0x7fffffffd8c4, REPAINTALL=false,
ISAFTERGTK=false) at gtk2callback.inc:103
#45 0x0000000000738576 in GTKEXPOSEEVENT (WIDGET=0x31d4660,
EVENT=0x7fffffffd8b0, DATA=0x1ad6778) at gtk2callback.inc:694
#46 0x00007ffff6c8fb7b in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#47 0x00007ffff6919f9d in g_closure_invoke () at
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#48 0x00007ffff692ccde in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#49 0x00007ffff6934e4f in g_signal_emit_valist () at
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#50 0x00007ffff6935ecf in g_signal_emit () at
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#51 0x00007ffff6da5f9c in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#52 0x00007ffff6c8e958 in gtk_main_do_event () at
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#53 0x00007ffff773eb9f in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#54 0x00007ffff773eb45 in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#55 0x00007ffff773eb45 in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#56 0x00007ffff773eb45 in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#57 0x00007ffff773b623 in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#58 0x00007ffff773bfb0 in gdk_window_process_all_updates () at
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#59 0x00007ffff773bff9 in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#60 0x00007ffff771ac1c in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#61 0x00007ffff6640e25 in g_main_context_dispatch () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#62 0x00007ffff66411f0 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#63 0x00007ffff664127c in g_main_context_iteration () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#64 0x00000000005f90e8 in APPPROCESSMESSAGES (this=0x1549918) at
gtk2widgetset.inc:2338
#65 0x000000000045b4bd in HANDLEMESSAGE (this=0x1547348) at
include/application.inc:1276
#66 0x000000000045ba3d in RUNLOOP (this=0x1547348) at
include/application.inc:1413
#67 0x0000000000717208 in APPRUN (this=0x1549918, ALOOP=...) at
include/interfacebase.inc:54
#68 0x000000000045b9e4 in RUN (this=0x1547348) at include/application.inc:1401
#69 0x000000000041f715 in main () at cqrlog.lpr:81
(gdb)

Do you have any idea what could be wrong, please? Thanks!

Lazarus 1.8.0, fpc 3.0.4 Ubuntu 16.04, Ubuntu 17.10, the same problem
with Lazarus 1.6.x in Fedora/Ubuntu/Debian etc.

Petr

-- 
web:   https://petrhlozek.cz
email: petr at petrhlozek.cz


More information about the Lazarus mailing list