View Issue Details

IDProjectCategoryView StatusLast Update
0036260LazarusLCLpublic2019-11-06 21:11
ReportersembitAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product VersionProduct Build62094 
Target VersionFixed in Version 
Summary0036260: AV when deleting grid column in design.
DescriptionI attach a video with a problem.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

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

Activities

sembit

2019-11-04 18:17

reporter  

bandicam 2019-11-04 20-09-37-707.mp4 (1,778,252 bytes)

wp

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/customcontrol.inc:118
0000013 0x0000000000703cac in PAINTHANDLER (this=0x7fffd8ca8470, THEMESSAGE=...) at include/wincontrol.inc:4840
0000014 0x0000000000709efd in WMPAINT (this=0x7fffd8ca8470, MSG=...) at include/wincontrol.inc:6828
0000015 0x0000000000725096 in WMPAINT (this=0x7fffd8ca8470, MESSAGE=...) at include/customcontrol.inc:98
0000016 0x000000000043d558 in DISPATCH (this=0x7fffd8ca8470, MESSAGE=) at ../inc/objpas.inc:684
0000017 0x0000000000717b00 in WNDPROC (this=0x7fffd8ca8470, THEMESSAGE=...) at include/control.inc:2237
0000018 0x0000000000705b6d in WNDPROC (this=0x7fffd8ca8470, MESSAGE=...) at include/wincontrol.inc:5412
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.

wp

2019-11-05 16:52

developer   ~0119076

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

Michl

2019-11-06 21:11

developer   ~0119111

This problem comes with revision 57050.

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