View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033273 | Lazarus | LCL | public | 2018-02-28 11:14 | 2018-03-01 16:12 |
Reporter | Michl | Assigned To | Juha Manninen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | 64bit | OS | Windows | ||
Product Version | 1.9 (SVN) | ||||
Summary | 0033273: After revision 56235 a exception is called when a app with a DBGrid is closed | ||||
Description | After revision 56235 in some cases a exception is called when a app with a DBGrid is closed. I created a minimal example to show the bug. | ||||
Steps To Reproduce | Try added project with a DBGrid and a BufDataset. - select a entry <> first entry in DBGrid - press Button1 to set DataSource1.DataSet := nil; -> a exception is called | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
LazTarget | - | ||||
Widgetset | |||||
Attached Files |
|
related to | 0032623 | resolved | Juha Manninen | Patches | IDE crash on opening Tools, Options, User Defined Markup |
|
|
|
grids.pas.patch (503 bytes)
Index: lcl/grids.pas =================================================================== --- lcl/grids.pas (revision 57377) +++ lcl/grids.pas (working copy) @@ -3434,8 +3434,6 @@ { Returns a reactagle corresponding to a physical cell[aCol,aRow] } function TCustomGrid.CellRect(ACol, ARow: Integer): TRect; begin - Assert( (ACol<ColCount) and (ARow<RowCount), - Format('TCustomGrid.CellRect: ACol (%d) or ARow (%d) out of range.',[ACol,ARow]) ); CellRectValid(ACol, ARow, Result); end; |
|
The patch works here, but it's just a workaround. |
|
Please test with r57416. The solution is not ideal. I think TCustomGrid.CellRect should never be called with invalid Row and Col. Their validity should be checked beforehand. Now TCustomGrid.CellRect returns Rect(0,0,0,0) as a fallback value. Please feel free to improve. |
|
Yes, it works as before. Not the best solution I know, but it is a very limited case. So IMHO here a new update counter isn't needed. Thank you. |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-02-28 11:14 | Michl | New Issue | |
2018-02-28 11:14 | Michl | Status | new => assigned |
2018-02-28 11:14 | Michl | Assigned To | => Michl |
2018-02-28 11:15 | Michl | File Added: BufdatasetTest.zip | |
2018-02-28 11:15 | Michl | Relationship added | related to 0032623 |
2018-02-28 11:16 | Michl | Assigned To | Michl => Juha Manninen |
2018-02-28 11:19 | Michl | File Added: grids.pas.patch | |
2018-02-28 11:24 | Michl | Note Added: 0106737 | |
2018-02-28 14:24 | Juha Manninen | Note Added: 0106751 | |
2018-02-28 14:24 | Juha Manninen | Status | assigned => feedback |
2018-03-01 16:12 | Michl | Note Added: 0106802 | |
2018-03-01 16:12 | Michl | Status | feedback => assigned |
2018-03-01 16:12 | Michl | Status | assigned => closed |
2018-03-01 16:12 | Michl | Resolution | open => fixed |