1

I have added firebase into my unity project. Everything works when I opened the app. It sends data succesfully to firebase dashboard. However, sometimes I'm passing to another scene. And app crashes. When I debug with Xcode, it gives lldb error with this stacktrace:

* thread #4, queue = 'APMAnalyticsQueue', stop reason = EXC_BAD_ACCESS (code=1, address=0x7e19bbec8)

* frame #0: 0x000000018159c1a0 libobjc.A.dylibobjc_retain + 16 frame #1: 0x0000000104cedfe8 basicmath2__CLSFIRAEventParametersAsPrimitiveDictionary_block_invoke + 32 frame #2: 0x00000001822953a0 CoreFoundation-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 232 frame #3: 0x0000000104cedfa0 basicmath2CLSFIRAEventParametersAsPrimitiveDictionary + 152 frame #4: 0x0000000104cee0cc basicmath2CLSFIRAEventToDictionary + 132 frame #5: 0x0000000104cf1284 basicmath2__61-[CLSCrashReportingController registerAnalyticsEventListener]_block_invoke + 28 frame #6: 0x0000000104d7de84 basicmath2+[APMAnalytics notifyEventListenersOnSerialQueue:] + 196 frame #7: 0x0000000104d7aeac basicmath2+[APMAnalytics logEventsOnWorkerQueue:notifyEventListeners:] + 252 frame #8: 0x0000000104d7bb28 basicmath2+[APMAnalytics logEventOnSerialQueueWithOrigin:isPublicEvent:name:parameters:timestamp:ignoreEnabled:ignoreInterceptor:addedScreenParameters:] + 1104 frame #9: 0x0000000104d7b408 basicmath2__65+[APMAnalytics logEventWithOrigin:isPublicEvent:name:parameters:]_block_invoke_3 + 60 frame #10: 0x0000000181cb8aa0 libdispatch.dylib_dispatch_call_block_and_release + 24 frame #11: 0x0000000181cb8a60 libdispatch.dylib_dispatch_client_callout + 16 frame #12: 0x0000000181cc29b4 libdispatch.dylib_dispatch_queue_serial_drain$VARIANT$mp + 608 frame #13: 0x0000000181cc32fc libdispatch.dylib_dispatch_queue_invoke$VARIANT$mp + 336 frame #14: 0x0000000181cc3cc8 libdispatch.dylib_dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 340 frame #15: 0x0000000181ccc098 libdispatch.dylib_dispatch_workloop_worker_thread$VARIANT$mp + 668 frame #16: 0x0000000181febe70 libsystem_pthread.dylib_pthread_wqthread + 860 frame #17: 0x0000000181febb08 libsystem_pthread.dylibstart_wqthread + 4

Screenshot of error :

LLDB error

KENdi
  • 7,576
  • 2
  • 16
  • 31
Ali Avcı
  • 1,281
  • 1
  • 11
  • 24
  • That's not an lldb error. That is lldb telling you that your program crashed. In particular, objc_retain tried to increase the reference count of a pointer that was pointing at unreadable memory. Probably the object had already been released. – Jim Ingham Dec 19 '18 at 19:31
  • Actually I'm using firebase and I think it's not on my code side. I think it's related to firebase core. Right? – Ali Avcı Dec 20 '18 at 12:50
  • I'm also getting this error which I believe is from the FirebaseAnalytics pod I'm using (5.4.0). Occasionally, after calling Analytics.logEvent I get an EXC_BAD_ACCESS crash. In the trace it looks like it's trying to notify listeners of the event on a background thread using a block to iterate through a dictionary of parameters. They probably have an unowned reference to something in that block which is deallocated resulting in bad memory access. Don't think theres anything we can do to resolve this other than wait for a bug fix from the Firebase team? – Mike Atkins-Spelling Jan 09 '19 at 13:52

0 Answers0