View Issue Details

IDProjectCategoryView StatusLast Update
0036360LazarusWidgetsetpublic2020-01-22 20:03
ReporterTK Assigned ToDmitry Boyarintsev  
Status closedResolutionfixed 
Product Version2.1 (SVN) 
Summary0036360: Cocoa interface added to dylib causes runtime error on app exit
DescriptionWhen Interfaces unit is added to any dylib and Cocoa widgetset is selected (any bitness) the app loads, unloads and uses the dylib correctly.
But then on app exit there is always 216 runtime error.

Steps To ReproduceCompile the attached demo (main app + dylib) and test.
Additional InformationFPC version I use is 3.2.
I have no idea what is the cause.
The error comes after final 'end.' and even after all unit finalizations.
When looking deeper into Assembler window it occurs in fpc_do_exit on this line:
00000001000162F2 e889a90000 callq 0x100020c80 <SYSTEM_$$_SYSTEM_EXIT>

Error output from debugger shell:
objc[8701]: autorelease pool page 0x7fddf4088000 corrupted
  magic 0x00000000 0x30000000 0x00000000 0x30000000
  should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
  pthread 0x7fff7a2bc000
  should be 0x7fff7a2bc000

An unhandled exception occurred at $00007FFF91C6702F:
TagsNo tags attached.
Fixed in Revision62352
Attached Files



2019-11-25 22:06

reporter (138,255 bytes)


2019-11-28 21:28

reporter   ~0119541

This bug is similar to this issue with Carbon interface:
But here I could not locate the source of the problem...

The only solution is to remove any LCL dependency from all libraries.
We have configuration dialogs in the libs, the libs are plugins.
And due to this bug they must be configured in the main app, a lot more work, sigh...

Dmitry Boyarintsev

2019-12-08 05:03

developer   ~0119689

please test and close if ok

Issue History

Date Modified Username Field Change
2019-11-25 22:06 TK New Issue
2019-11-25 22:06 TK File Added:
2019-11-28 21:28 TK Note Added: 0119541
2019-12-08 05:03 Dmitry Boyarintsev Assigned To => Dmitry Boyarintsev
2019-12-08 05:03 Dmitry Boyarintsev Status new => resolved
2019-12-08 05:03 Dmitry Boyarintsev Resolution open => fixed
2019-12-08 05:03 Dmitry Boyarintsev Fixed in Revision => 62352
2019-12-08 05:03 Dmitry Boyarintsev LazTarget => -
2019-12-08 05:03 Dmitry Boyarintsev Widgetset Cocoa => Cocoa
2019-12-08 05:03 Dmitry Boyarintsev Note Added: 0119689
2020-01-22 20:03 TK Status resolved => closed