View Issue Details

IDProjectCategoryView StatusLast Update
0023478LazarusLCLpublic2013-01-17 00:59
ReportermmxnggAssigned ToJesus Reyes 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0.0Product Build 
Target Version1.0.6Fixed in Version1.1 (SVN) 
Summary0023478: SIGSEGV on TStringGrid.Free when focused
DescriptionThe summary says it all
Additional InformationLazarus 1.0.4
FPC 2.6.0
TagsNo tags attached.
Fixed in Revisionr39544, r39867
LazTarget1.0.6
WidgetsetWin32/Win64
Attached Files

Activities

2012-12-12 18:19

 

project1.rar (64,667 bytes)

Juha Manninen

2012-12-12 21:58

developer   ~0064262

The StringGrid is owned and memory-managed by the form. You must not free it explicitly.
Please ask about basic usage issues in forum or mailing list instead of creating a bug report.

Juha Manninen

2012-12-15 01:15

developer   ~0064307

Based on forum discussion I moved the following block in TCustomGrid.Destroy to after inherited Destroy;

  FreeThenNil(FColumns);
  FreeThenNil(FGCache.AccumWidth);
  FreeThenNil(FGCache.AccumHeight);
  FreeThenNil(FCols);
  FreeThenNil(FRows);

Now even a focused grid can be freed without problems.
Thanks, and please test.

Jesus Reyes

2012-12-15 02:36

developer   ~0064308

freeing some part before and some part after even if it works, doesn't looks very well, I fixed the problem in another way, please test r39545

mmxngg

2012-12-17 18:04

reporter   ~0064359

Fixed the first problem but still crash if there is a cell in edit mode. A line seems a quite strange :

procedure TCustomGrid.DestroyHandle;
begin
  inherited DestroyHandle;
  editorGetValue; -> ?
end;

A wrong cut & paste ?

Jesus Reyes

2012-12-28 22:45

developer   ~0064516

Last edited: 2012-12-28 22:47

I'm sorry, I cannot reproduce this problem, in order to reproduce it I set option goEditing to true. When the program is running, the first test I did was double clicking a cell to make it show up the editor, I pressed the button "button1" to free the grid, no problem. For the second test, after editor shows up, I typed some chars, pressed the button and no problem again.

Please write down the instructions to reproduce the problem.

mmxngg

2013-01-09 21:01

reporter   ~0064765

Last edited: 2013-01-09 21:01

Try with goEditing and goTabs to true, double click on a cell and then free the grid (ofc without lose or change the focus).

Jesus Reyes

2013-01-11 20:54

developer   ~0064833

"(ofc without lose or change the focus)." and how do you that in your test?

mmxngg

2013-01-11 22:43

reporter   ~0064835

SpeedButton ;)

Jesus Reyes

2013-01-17 00:59

developer   ~0064931

Aja, so please next time please explain explicitly what changes the project needs, after all, if the project do not reproduce the problem anymore it's of no help

Issue History

Date Modified Username Field Change
2012-12-12 18:19 mmxngg New Issue
2012-12-12 18:19 mmxngg File Added: project1.rar
2012-12-12 18:19 mmxngg Widgetset => Win32/Win64
2012-12-12 21:54 Juha Manninen Status new => assigned
2012-12-12 21:54 Juha Manninen Assigned To => Juha Manninen
2012-12-12 21:58 Juha Manninen LazTarget => -
2012-12-12 21:58 Juha Manninen Status assigned => resolved
2012-12-12 21:58 Juha Manninen Resolution open => no change required
2012-12-12 21:58 Juha Manninen Note Added: 0064262
2012-12-15 01:15 Juha Manninen Fixed in Revision => r39544
2012-12-15 01:15 Juha Manninen Note Added: 0064307
2012-12-15 01:15 Juha Manninen Resolution no change required => fixed
2012-12-15 02:36 Jesus Reyes Note Added: 0064308
2012-12-17 18:04 mmxngg Status resolved => assigned
2012-12-17 18:04 mmxngg Resolution fixed => reopened
2012-12-17 18:04 mmxngg Note Added: 0064359
2012-12-24 18:40 Juha Manninen Assigned To Juha Manninen => Jesus Reyes
2012-12-28 22:45 Jesus Reyes Note Added: 0064516
2012-12-28 22:45 Jesus Reyes Status assigned => feedback
2012-12-28 22:47 Jesus Reyes Note Edited: 0064516
2013-01-09 21:01 mmxngg Note Added: 0064765
2013-01-09 21:01 mmxngg Note Edited: 0064765
2013-01-11 20:54 Jesus Reyes Note Added: 0064833
2013-01-11 22:43 mmxngg Note Added: 0064835
2013-01-17 00:59 Jesus Reyes Fixed in Revision r39544 => r39544, r39867
2013-01-17 00:59 Jesus Reyes LazTarget - => 1.0.6
2013-01-17 00:59 Jesus Reyes Status feedback => resolved
2013-01-17 00:59 Jesus Reyes Fixed in Version => 1.1 (SVN)
2013-01-17 00:59 Jesus Reyes Resolution reopened => fixed
2013-01-17 00:59 Jesus Reyes Note Added: 0064931
2013-01-17 00:59 Jesus Reyes Target Version => 1.0.6