I ma getting a series of crashes on different targets on my app apprently not connected to any piece of code. As a matter of fact I am getting crahes on one target and a tester gets them on another target, but I do not know if the two things are connected. My crahes happen ever at different times and parts of my code and present themselves with:
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x3a216808 kevent64 + 24
1 libdispatch.dylib 0x3a162de8 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3a151f6e _dispatch_mgr_thread$VARIANT$up + 34
My code is not involved at all, but for catching the reporting the crash. The Xcode crash report also reports:
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
I am totally in the dark about what it might be and how to solve it. Any suggestion?
The crash seemed due to calling a new datatask on NSURLSession.sharedSession() before the previous one was terminated. I came to that by trial an error by trying and removing all code specific for the target.
Apple said crashes happened closer to the problem in Swift, than in Objective-c, but it seems to be returning to the time of the C dangling pointers! That is where 90's computer science and php programming experience come to the fore!
Please Apple take note Swift should be a 21 century language for the next 20 years and the runtime support should be consequent!