View Issue Details

IDProjectCategoryView StatusLast Update
0028494LazarusLCLpublic2017-04-12 11:29
ReporterMaaartinAssigned ToFelipe Monteiro de Carvalho 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionunable to reproduce 
PlatformOSXOSOS Version14.3.0
Product Version1.4Product Build 
Target VersionFixed in Version 
Summary0028494: Crash on OSX because of postponed double click processing
DescriptionClosing a custom component on a double click can crash the application in CarbonWindow_MouseProc, because of the following:

1. CallNextEventHandler calls our handler which hides an ancestor of the component.
2. This frees the corresponding widget.
3. The event processing in CarbonWindow_MouseProc goes on and accesses the Widget.LCLObject in the now freed memory.
Additional InformationI posted this first on http://comments.gmane.org/gmane.comp.ide.lazarus.general/82195 as I supposed a problem in our application. However, I could find no fix, so I guess, it's bug.

As a workaround, I compare Widget.LCLObject before and after calling CallNextEventHandler and exit on mismatch. Working but very hacky.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetCarbon
Attached Files

Activities

Felipe Monteiro de Carvalho

2015-08-09 10:48

developer   ~0085269

Hi, could you create a patch using the instructions from here:

http://wiki.freepascal.org/Creating_A_Patch

?

Alexey Tor.

2016-12-17 20:43

reporter   ~0096856

Last edited: 2016-12-17 20:43

View 2 revisions

Attach test project, pls
I cannot confirm:

- made new proj
- placed on form TATListbox
- set its OnDblClick
- wrote there "caption:= 'dd'; close;"

App closes OK on dblclick. OSX 10.8.

Alexey Tor.

2017-04-08 16:13

reporter   ~0099506

Pls, close.

Juha Manninen

2017-04-12 11:29

developer   ~0099575

No feedback. Resolving.

Issue History

Date Modified Username Field Change
2015-08-08 16:00 Maaartin New Issue
2015-08-09 10:42 Felipe Monteiro de Carvalho Assigned To => Felipe Monteiro de Carvalho
2015-08-09 10:42 Felipe Monteiro de Carvalho Status new => assigned
2015-08-09 10:48 Felipe Monteiro de Carvalho Note Added: 0085269
2015-08-09 10:48 Felipe Monteiro de Carvalho LazTarget => -
2015-08-09 10:48 Felipe Monteiro de Carvalho Status assigned => feedback
2016-12-17 20:43 Alexey Tor. Note Added: 0096856
2016-12-17 20:43 Alexey Tor. Note Edited: 0096856 View Revisions
2017-04-08 16:13 Alexey Tor. Note Added: 0099506
2017-04-12 11:29 Juha Manninen Note Added: 0099575
2017-04-12 11:29 Juha Manninen Status feedback => resolved
2017-04-12 11:29 Juha Manninen Resolution open => unable to reproduce