SIGSEGV on scrolling TDBGrid
Original Reporter info from Mantis: talinnell
-
Reporter name: Tristan Linnell
Original Reporter info from Mantis: talinnell
- Reporter name: Tristan Linnell
Description:
In our case, this bug can be reproduced 100% of the time, however we have been unable to reproduce it in a controlled test application.
The issue manifests itself as follows:
We have a TDBGrid with several columns and rows. There are more columns than can fit on the screen, so that horizontal scroll bars are visible.
To reproduce the bug, we open the application, Click on the right side of the horizontal scroll bar at the bottom, once.
If the mousewheel is then scrolled down, a SIGSEGV occurs on Line 1783 of DBGrids.pas. Upon debugging, the line
result := ColumnFromGridColumn(aCol).ButtonStyle;
is attempting to retrieve ButtonStyle from a nil pointer.
A patch is provided which checks for correct assignment of this TGridColumn in TCustomDBGrid.ColumnEditorStyle, leaving the result at the default if the pointer is nil.
This patch fixes the symptoms of the bug.
Additional information:
Have reproduced on Win32 and Carbon widgetsets, with identical results.
Patch fixes issue on both.
Mantis conversion info:
- Mantis ID: 22873
- Version: 1.0.0
- Fixed in version: 1.1 (SVN)
- Fixed in revision: 39118 (#ad7b61f0)
- Target version: 1.2.0
- LazTarget: 1.2