react-native-background-geolocation: Getting a crash on release builds in iOS only

Your Environment

  • Plugin version: 2.13.3

  • Platform: iOS or Android iOS

  • OS version: 11.4.1

  • Device manufacturer / model: iPhone 8 Plus

  • React Native version (react-native -v): 0.57.0

  • Plugin config Configured via react-native link.

Expected Behavior

The app shouldn’t crash.

Actual Behavior

The app crashes on startup.

Steps to Reproduce

Our app crashes right after launch, but only in release builds.

Context

This crash only happens in release builds and only started happening after we upgraded to the most recent version of react native. We’ve been using it with older versions of RN without issues. The stack trace isn’t very useful here unfortunately. It looks to me like it might be some kind of memory corruption issue.

Debug logs

Platform: ios Version: 2.3 (440) Issue #: 3 Issue ID: 5ba0f2c8f8b88c2963544e8c Session ID: 06ca955927cf40f08e925a430a920230_DNE_0_v2 Date: 2018-09-18T14:01:00Z OS Version: 11.4.1 (15G77) Device: iPhone 8 Plus RAM Free: 27.7% Disk Free: 83.2%

#8. Crashed: com.transistorsoft.TSLocationManager 0 libobjc.A.dylib 0x182d897f4 objc_object::release() + 16 1 libobjc.A.dylib 0x182d8a13c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844 2 libdispatch.dylib 0x1834d3060 _dispatch_last_resort_autorelease_pool_pop + 36 3 libdispatch.dylib 0x1834e3b24 _dispatch_queue_invoke$VARIANT$armv81 + 372 4 libdispatch.dylib 0x1834e449c _dispatch_root_queue_drain_deferred_wlh$VARIANT$armv81 + 332 5 libdispatch.dylib 0x1834ec46c _dispatch_workloop_worker_thread$VARIANT$armv81 + 612 6 libsystem_pthread.dylib 0x1837d7e70 _pthread_wqthread + 860 7 libsystem_pthread.dylib 0x1837d7b08 start_wqthread + 4

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 57 (26 by maintainers)

Most upvoted comments

Sorry for the late reply, but this now works perfectly for us! You got yourself a fully satisfied paying customer, thank you!

@Peeeep Ok, I think I’ve got it solved. That was tricky. Your test-case was perfect, good work.

Standby for fix.

@Peeeep Could you please make a new app with $ react-native init FooHttp (never use the word Test in an app name, it breaks the plugin’s link script).

Make a simple test-case that hits your endpoint and reproduces the error then send your app to me so I can try it myself.

@willcosgrove I need a stacktrace.

I would also build and install the Demo App to rule-out your application-code.

Posting on behalf of @Peeeep :

Your Environment

  • Plugin version: 2.13.3
  • Platform: iOS or Android iOS
  • OS version: 11.2.2. / 11.4.1 / 12.0.0
  • Device manufacturer / model: iPhone X / 8 Plus / 7 Plus / 6 / 6s / 5s
  • React Native version (react-native -v): 0.56.0
  • Plugin config Manual config

Crashed: com.transistorsoft.TSLocationManager EXC_BAD_ACCESS KERN_INVALID_ADDRESS

Crashed: com.transistorsoft.TSLocationManager 0 libobjc.A.dylib objc_object::release() + 16 1 libobjc.A.dylib (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 676 2 libdispatch.dylib dispatch_last_resort_autorelease_pool_pop + 40 3 libdispatch.dylib _dispatch_lane_invoke$VARIANT$mp + 528 4 libdispatch.dylib _dispatch_workloop_worker_thread + 600 5 libsystem_pthread.dylib _pthread_wqthread + 312 6 libsystem_pthread.dylib start_wqthread + 4

Firebase also added this: "The stack trace indicates that heap corruption may have caused your app to crash. "

In our experience the app does not crash every time you start the app and we have not been able to identify a consistent pattern.

@Peeeep Also provide the same Environment Info as OP.