View Issue Details

IDProjectCategoryView StatusLast Update
0037202PackagesLCLpublic2020-07-16 11:31
Reportergreenfil Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSdebian 
Product Version2.0.8 
Summary0037202: TTidGrid crached on destroy
DescriptionTTidGrid.Editor destroy problem
Steps To ReproduceRun example ExampleGrid1. Change any. Close.
Additional Informationprocedure TTICustomGrid.ClearProperties;
var
  i: Integer;
begin
  if FProperties=nil then exit;
  for i:=0 to FProperties.Count-1 do begin
    TObject(FProperties[i]).Free;
    FProperties[i]:=nil;
  end;
  FProperties.Clear;
  Editor := nil;
  FExtraBtnEditor := nil;
end;
 ->
procedure TTICustomGrid.ClearProperties;
var
  i: Integer;
begin
  if FProperties=nil then exit;
  Editor := nil;
  for i:=0 to FProperties.Count-1 do begin
    TObject(FProperties[i]).Free;
    FProperties[i]:=nil;
  end;
  FProperties.Clear;
  FExtraBtnEditor := nil;
end;
TagsNo tags attached.
Fixed in Revisionr63541, r63571
LazTarget-
Widgetset
Attached Files

Relationships

related to 0035583 resolvedJuha Manninen Lazarus TTIGRID crashes on boolean properties 
related to 0037366 closedJuha Manninen Lazarus TSTringGrid - cannot change the cell being edited 

Activities

Juha Manninen

2020-06-12 11:48

developer   ~0123405

Last edited: 2020-07-06 11:54

View 3 revisions

> Run example ExampleGrid1. Change any. Close.

The example project is in the related issue, right? Data in the grid cannot be changed before adding goEditing into its Options. I did that and changed some values, then closed the application. No crash.

A second try: I left the in-place cell editor active and then closed. Yes, I got a crash in procedure TCustomGrid.EditorHide. Is this the way you tested?
Then I tried your proposed change and got a different crash in FPC libraries. I am testing with FPC trunk from ~ 1 month ago.

In future you must learn to create patches:
 https://wiki.freepascal.org/Creating_A_Patch
Getting Lazarus trunk sources and building them is very easy once you have FPC installed. No worries.

Juha Manninen

2020-07-11 11:09

developer   ~0123879

Fixed, please test.

Lagunov Aleksey

2020-07-15 08:28

reporter   ~0124028

after rev.63541 don't work inplace editor for StringGrid, DBGrid
for test:
1. show editor for StringGrid in IDE (dbl.click on StringGrid)
2. edit any cell
3. click mouse on other cell
4. try to edit other cell - editor showing in cell from step 1

Juha Manninen

2020-07-16 11:31

developer   ~0124082

Yes. I should have tested for Editor.Parent instead of Editor.Owner. Fixed now.

Issue History

Date Modified Username Field Change
2020-06-11 10:44 greenfil New Issue
2020-06-12 11:30 Juha Manninen Relationship added related to 0035583
2020-06-12 11:30 Juha Manninen Assigned To => Juha Manninen
2020-06-12 11:30 Juha Manninen Status new => assigned
2020-06-12 11:48 Juha Manninen Note Added: 0123405
2020-06-12 11:49 Juha Manninen Note Edited: 0123405 View Revisions
2020-06-12 11:53 Juha Manninen Status assigned => feedback
2020-06-12 11:53 Juha Manninen LazTarget => -
2020-07-06 11:54 Juha Manninen Note Edited: 0123405 View Revisions
2020-07-11 11:09 Juha Manninen Status feedback => resolved
2020-07-11 11:09 Juha Manninen Resolution open => fixed
2020-07-11 11:09 Juha Manninen Fixed in Revision => r63541
2020-07-11 11:09 Juha Manninen Note Added: 0123879
2020-07-15 08:28 Lagunov Aleksey Note Added: 0124028
2020-07-15 09:19 Juha Manninen Status resolved => assigned
2020-07-15 09:19 Juha Manninen Resolution fixed => open
2020-07-16 10:53 Juha Manninen Relationship added related to 0037366
2020-07-16 11:31 Juha Manninen Status assigned => resolved
2020-07-16 11:31 Juha Manninen Resolution open => fixed
2020-07-16 11:31 Juha Manninen Fixed in Revision r63541 => r63541, r63571
2020-07-16 11:31 Juha Manninen Note Added: 0124082