background_locator icon indicating copy to clipboard operation
background_locator copied to clipboard

IOS: App crashing when coming back to the app while background_locator is active

Open shantaly opened this issue 3 years ago • 5 comments

background_locator: 1.6.0+1-beta

Hardware Model: iPhone11,2 Process: Runner [3253] AppVariant: 1:iPhone11,2:14 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1]

OS Version: iPhone OS 14.5.1 (18E212) Release Type: User

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0

Last Exception Backtrace: 0 CoreFoundation 0x1983565b4 __exceptionPreprocess + 220 (NSException.m:199) 1 libobjc.A.dylib 0x1acdd57a8 objc_exception_throw + 60 (objc-exception.mm:565) 2 CoreFoundation 0x198258258 +[NSException raise:format:arguments:] + 100 (NSException.m:146) 3 Foundation 0x19961f6e4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132 (NSException.m:231) 4 Flutter 0x1034bc320 0x1034ac000 + 66336 5 background_locator 0x1033903d8 -[BackgroundLocatorPlugin sendLocationEvent:] + 268 (BackgroundLocatorPlugin.m:114) 6 background_locator 0x1033901b8 -[BackgroundLocatorPlugin prepareLocationMap:] + 104 (BackgroundLocatorPlugin.m:83) 7 background_locator 0x103390238 -[BackgroundLocatorPlugin locationManager:didUpdateLocations:] + 100 (BackgroundLocatorPlugin.m:91) 8 CoreLocation 0x19e1f2f34 -[CLLocationManager onClientEventLocation:forceMapMatching:type:] + 1544 (CLLocationManager.m:2497) 9 CoreLocation 0x19e1f2248 -[CLLocationManager onClientEvent:supportInfo:] + 1416 (CLLocationManager.m:2250) 10 CoreLocation 0x19e1d84e4 invocation function for block in CLClientInvokeCallback(__CLClient*, CLClientEvent, objc_object*) + 180 (CLClient.mm:711) 11 CoreFoundation 0x1982d0578 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 28 (CFRunLoop.c:1815) 12 CoreFoundation 0x1982cf7cc __CFRunLoopDoBlocks + 408 (CFRunLoop.c:1857) 13 CoreFoundation 0x1982c9db4 __CFRunLoopRun + 1728 (CFRunLoop.c:3172) 14 CoreFoundation 0x1982c91c0 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 15 GraphicsServices 0x1af8b1734 GSEventRunModal + 164 (GSEvent.c:2259) 16 UIKitCore 0x19ad377e4 -[UIApplication _run] + 1072 (UIApplication.m:3269) 17 UIKitCore 0x19ad3d054 UIApplicationMain + 168 (UIApplication.m:4740) 18 Runner 0x10279723c main + 64 (AppDelegate.swift:8) 19 libdyld.dylib 0x197f85cf8 start + 4

Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001c634f334 __pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001e3d71aa0 pthread_kill + 272 (pthread.c:1392) 2 libsystem_c.dylib 0x00000001a16d6b90 abort + 104 (abort.c:110) 3 libc++abi.dylib 0x00000001aceb6bb8 abort_message + 132 (abort_message.cpp:78) 4 libc++abi.dylib 0x00000001acea7ec8 demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:67) 5 libobjc.A.dylib 0x00000001acdb405c _objc_terminate() + 144 (objc-exception.mm:701) 6 libc++abi.dylib 0x00000001aceb5fa0 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59) 7 libc++abi.dylib 0x00000001aceb8eac __cxa_rethrow + 148 (cxa_exception.cpp:616) 8 libobjc.A.dylib 0x00000001acdd5904 objc_exception_rethrow + 44 (objc-exception.mm:604) 9 CoreFoundation 0x00000001982c92ac CFRunLoopRunSpecific + 836 (CFRunLoop.c:3257) 10 GraphicsServices 0x00000001af8b1734 GSEventRunModal + 164 (GSEvent.c:2259) 11 UIKitCore 0x000000019ad377e4 -[UIApplication _run] + 1072 (UIApplication.m:3269) 12 UIKitCore 0x000000019ad3d054 UIApplicationMain + 168 (UIApplication.m:4740) 13 Runner 0x000000010279723c main + 64 (AppDelegate.swift:8) 14 libdyld.dylib 0x0000000197f85cf8 start + 4

shantaly avatar May 28 '21 19:05 shantaly

This is happening to my app as well.

alymoursy avatar May 28 '21 20:05 alymoursy

Hi @shantaly Thank you for opening an issue;

Please give the whole scenario (step by step) to reproduce the bug. If it is possible a video would help a lot;

mehdok avatar Jun 03 '21 06:06 mehdok

I can confirm this issue as well

stenlee avatar Jun 22 '21 06:06 stenlee

@stenlee If you can share more info please do that.

mehdok avatar Jun 22 '21 14:06 mehdok

@mehdok ... steps to reproduce

  1. run background locator on iOS14
  2. stop it
  3. close the app and try to start the app again
  4. app is crashing before splash screen inside the AppDelegate.swift method

if I remember right - XCode is showing message "Trying to send message before Flutter engine is running" Flutter 2.2.2

stenlee avatar Jun 22 '21 14:06 stenlee