View Issue Details

IDProjectCategoryView StatusLast Update
0036260LazarusLCLpublic2020-02-09 16:59
Reportersembit Assigned ToJuha Manninen  
Status closedResolutionfixed 
Summary0036260: AV when deleting grid column in design.
DescriptionI attach a video with a problem.
TagsNo tags attached.
Fixed in Revisionr62405
Attached Files


has duplicate 0036262 closedBart Broersma AV when deleting grid column in design. 



2019-11-04 18:17



2019-11-04 23:10

developer   ~0119061

Last edited: 2019-11-05 16:46

View 2 revisions

Steps to reproduce:
- Create new project
- Add TDBGrid to form
- Open columns editor, click "Add" to add a column
- IMMEDIATELY after adding the column, click "Delete" in the column editor --> Access violation

The error does NOT happen, when I
- add the column
- click into the form
- go back to the column editor
- click "delete.

The error also does not happen with a TStringGrid instead of the TDBGrid.

Juha Manninen

2019-11-05 13:48

developer   ~0119073

Thread 1 "lazarus" received signal SIGSEGV, Segmentation fault.
0x00000000008ae8a0 in GETALIGNMENT (this=0x7fffd7b4a440) at grids.pas:12311
12311 Result := FAlignment^;
(gdb) bt
#0 0x00000000008ae8a0 in GETALIGNMENT (this=0x7fffd7b4a440) at grids.pas:12311
0000001 0x00000000005b6337 in GETORDPROP (INSTANCE=0x7fffd7b4a440, PROPINFO=0x1b5b6e7) at ../objpas/typinfo.pp:1814
0000002 0x0000000000a810da in GETORDVALUEAT (this=0x7fffd7480360, INDEX=0) at propedits.pp:2862
0000003 0x0000000000a81092 in GETORDVALUE (this=0x7fffd7480360) at propedits.pp:2857
0000004 0x0000000000a83829 in GETVALUE (this=0x7fffd7480360) at propedits.pp:3555
0000005 0x0000000000a81d0a in GETVISUALVALUE (this=0x7fffd7480360) at propedits.pp:3057
0000006 0x0000000000a841fd in GETVISUALVALUE (this=0x7fffd7480360) at propedits.pp:3680
0000007 0x0000000000a831db in PROPDRAWVALUE (this=0x7fffd7480360, ACANVAS=0x7fffd9c53fc0, ARECT=..., ASTATE=...) at propedits.pp:3433
0000008 0x0000000000a6cce1 in DRAWVALUE (parentfp=0x7fffffffb280, DRAWSTATE=...) at objectinspector.pp:3043
0000009 0x0000000000a6bfcb in PAINTROW (this=0x7fffd8ca8470, AROW=0) at objectinspector.pp:3121
0000010 0x0000000000a6dad8 in DOPAINT (this=0x7fffd8ca8470, PAINTONLYCHANGEDVALUES=false) at objectinspector.pp:3200
0000011 0x0000000000a6dfde in PAINT (this=0x7fffd8ca8470) at objectinspector.pp:3244
0000012 0x00000000007251be in PAINTWINDOW (this=0x7fffd8ca8470, DC=140736805677824) at include/
0000013 0x0000000000703cac in PAINTHANDLER (this=0x7fffd8ca8470, THEMESSAGE=...) at include/
0000014 0x0000000000709efd in WMPAINT (this=0x7fffd8ca8470, MSG=...) at include/
0000015 0x0000000000725096 in WMPAINT (this=0x7fffd8ca8470, MESSAGE=...) at include/
0000016 0x000000000043d558 in DISPATCH (this=0x7fffd8ca8470, MESSAGE=) at ../inc/
0000017 0x0000000000717b00 in WNDPROC (this=0x7fffd8ca8470, THEMESSAGE=...) at include/
0000018 0x0000000000705b6d in WNDPROC (this=0x7fffd8ca8470, MESSAGE=...) at include/
0000019 0x00000000007e2f35 in SLOTPAINT (this=0x7fffdaaec7d0, SENDER=0x2d97c20, EVENT=0x7fffffffbf60) at qt5/qtwidgets.pas:4202
0000020 0x00000000007df134 in EVENTFILTER (this=0x7fffdaaec7d0, SENDER=0x2d97c20, EVENT=0x7fffffffbf60) at qt5/qtwidgets.pas:2699

All calls below were inside QT5 widgetset and not relevant here.
The relevant calls are in ObjectInspector and PropEdits, and the last one in function TGridColumn.GetAlignment.
Apparently the column count is then 0. Why is the method called for DBGrid but not for StringGrid? Requires some pondering and head scratching.


2019-11-05 16:52

developer   ~0119076

Another observation:
Add two columns. Then click the "Delete" button --> nothing happens, no problem


2019-11-06 21:11

developer   ~0119111

This problem comes with revision 57050.

Juha Manninen

2019-12-16 00:08

developer   ~0119869

Fixed, please test.

Issue History

Date Modified Username Field Change
2019-11-04 18:17 sembit New Issue
2019-11-04 18:17 sembit File Added: bandicam 2019-11-04 20-09-37-707.mp4
2019-11-04 21:22 Bart Broersma Relationship added has duplicate 0036262
2019-11-04 23:10 wp Status new => confirmed
2019-11-04 23:10 wp LazTarget => -
2019-11-04 23:10 wp Note Added: 0119061
2019-11-05 13:48 Juha Manninen Note Added: 0119073
2019-11-05 16:46 wp Note Edited: 0119061 View Revisions
2019-11-05 16:52 wp Note Added: 0119076
2019-11-06 21:11 Michl Note Added: 0119111
2019-11-06 21:11 Michl Assigned To => Juha Manninen
2019-11-06 21:11 Michl Status confirmed => assigned
2019-12-16 00:08 Juha Manninen Status assigned => resolved
2019-12-16 00:08 Juha Manninen Resolution open => fixed
2019-12-16 00:08 Juha Manninen Fixed in Revision => r62405
2019-12-16 00:08 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2019-12-16 00:08 Juha Manninen Note Added: 0119869
2020-02-09 16:59 sembit Status resolved => closed