Object released unexpected in IOS13

HI
My application works well in IOS 12.
In IOS 13 beta it crashed due to message send to deallocate object.
The deallocate object type is Static NSString
check the Zombie of Instruments find the object is released by "FrontBoardServices"
Responsible Caller is "FBSWorkspace_calloutQueu_executeCalloutFromSource:withBlock"
Can anybody give me some suggestion


Below is the stack trace of the released step.


0 libobjc.A.dylib -[NSObject release]

1 libobjc.A.dylib AutoreleasePoolPage::releaseUntil(objc_object**)

2 libobjc.A.dylib objc_autoreleasePoolPop

3 libobjc.A.dylib objc_autoreleasePoolPop

4 FrontBoardServices -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]

5 FrontBoardServices __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke

6 libdispatch.dylib _dispatch_client_callout

7 libdispatch.dylib _dispatch_block_invoke_direct

8 FrontBoardServices __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__

9 FrontBoardServices -[FBSSerialQueue _performNext]

10 FrontBoardServices -[FBSSerialQueue _performNextFromRunLoopSource]

11 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__

12 CoreFoundation __CFRunLoopDoSource0

13 CoreFoundation __CFRunLoopDoSources0

14 CoreFoundation __CFRunLoopRun

15 CoreFoundation CFRunLoopRunSpecific

16 GraphicsServices GSEventRunModal

17 UIKitCore UIApplicationMain

18 FioriClient main /Users/i062899/SAP/MobileSDK3/KapselSDKnew/apps/fiori_client/FioriClient/platforms/ios/FioriClient/main.m:32

19 libdyld.dylib start

Post not yet marked as solved Up vote post of xinhuadian Down vote post of xinhuadian
1.6k views

Replies

my guess is:
from stack trace autoreleasepool is the issue, your custom queue probably created with "autoreleaseFrequency: .workItem". this create an autoreleasepool { around submitted block }. autoreleasepool capture a pointers of objects inside, create a pages and delay execution of "release" call to get deinit an objects.
But seams your NSString has beam already dealocated early, so when autoreleasepool starting goin over pages and captured pointers AutoreleasePoolPage::releaseUntil(objc_object**) -> [NSObject release] -> you get crash since no NSString already there by that pointer.