Skip to content

Crash via -[FRepo deferredInit] #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
plu opened this issue Sep 16, 2017 · 15 comments
Closed

Crash via -[FRepo deferredInit] #281

plu opened this issue Sep 16, 2017 · 15 comments

Comments

@plu
Copy link

plu commented Sep 16, 2017

Environment

  • Xcode version: 8.3.3

  • Firebase SDK version (from Podfile.lock):

    • Firebase/Auth (4.1.1):
      • Firebase/Core
      • FirebaseAuth (= 4.1.1)
    • Firebase/Core (4.1.1):
      • FirebaseAnalytics (= 4.0.3)
      • FirebaseCore (= 4.0.6)
    • Firebase/Database (4.1.1):
      • Firebase/Core
      • FirebaseDatabase (= 4.0.2)
  • Library version: ?

  • Firebase Product: database

Problem

I see crashes via Crashlytics with following stack trace:

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x18d65afe0 __exceptionPreprocess
1  libobjc.A.dylib                0x18c0bc538 objc_exception_throw
2  CoreFoundation                 0x18d661ef4 __methodDescriptionForSelector
3  CoreFoundation                 0x18d65ef54 ___forwarding___
4  CoreFoundation                 0x18d55ad4c _CF_forwarding_prep_0
5  Poloniex                       0x1003cd8dc -[FSnapshotHolder updateSnapshot:withNewSnapshot:]
6  Poloniex                       0x1003c5b70 -[FRepo updateInfo:withValue:]
7  Poloniex                       0x1003c2e48 -[FRepo deferredInit]
8  libdispatch.dylib              0x18c5129e0 _dispatch_call_block_and_release
9  libdispatch.dylib              0x18c5129a0 _dispatch_client_callout
10 libdispatch.dylib              0x18c520ad4 _dispatch_queue_serial_drain
11 libdispatch.dylib              0x18c5162cc _dispatch_queue_invoke
12 libdispatch.dylib              0x18c520fa8 _dispatch_queue_override_invoke
13 libdispatch.dylib              0x18c522a50 _dispatch_root_queue_drain
14 libdispatch.dylib              0x18c5227d0 _dispatch_worker_thread3
15 libsystem_pthread.dylib        0x18c71b100 _pthread_wqthread
16 libsystem_pthread.dylib        0x18c71acac start_wqthread

The origin is always at [FRepo deferredInit]. I do have some bread crumbs (CLS_LOG) in Crashlytics that tell me that the crash happens immediately after app start. It's a relatively rare crash, however it's my number one crash in my application.

Steps to reproduce:

I don't know how to reproduce it, I can only see the crash reports in Crashlytics.

@paulb777
Copy link
Member

Seen by others at https://stackoverflow.com/questions/45791649/firebase-random-crash

@plu
Copy link
Author

plu commented Sep 17, 2017

If it helps I can add one of the developers here to my Crashlytics account or even give access to the App's full source code. Though I don't think I'm doing anything special there.

@frunny
Copy link

frunny commented Sep 17, 2017

I'm having the same issue and many more firebase crashes - around 10 different ones - reported by Crashlytics. Mostly with [FSnapshotHolder init] or [FLeafNode initWithValue:withPriority]. The last pod update did bring in even more crashes.

@plu
Copy link
Author

plu commented Sep 18, 2017

Same here...

screen shot 2017-09-18 at 18 55 41

I can provide stack traces for all of them, if that would help.

@schmidt-sebastian
Copy link
Contributor

I'm having the same issue and many more firebase crashes - around 10 different ones - reported by Crashlytics. Mostly with [FSnapshotHolder init] or [FLeafNode initWithValue:withPriority]. The last pod update did bring in even more crashes.

Are you using FIRApp delete? There was a potential crash in the 4.0.2 release that was fixed in 4.0.3.

@schmidt-sebastian
Copy link
Contributor

I can provide stack traces for all of them, if that would help.

Yes, that would be helpful. It might help us trace common patterns.

@plu
Copy link
Author

plu commented Sep 21, 2017

Are you using FIRApp delete? There was a potential crash in the 4.0.2 release that was fixed in 4.0.3.

Nope, not using that.

@plu
Copy link
Author

plu commented Sep 21, 2017

Yes, that would be helpful. It might help us trace common patterns.

Here are all Firebase related stack traces that I could find in Crashlytics:

https://gist.github.com/plu/8eae8472fa458b8fc52ed032139b4ce8

@frunny
Copy link

frunny commented Sep 21, 2017

@schmidt-sebastian No, don't use FIRApp delete.

@schmidt-sebastian
Copy link
Contributor

I have look at these stacktraces and have unfortunately not been able to figure out why these crashes are happening. A lot of these errors seem to indicate that there were error during object initialization time. Do you have any idea if these crashes might be more frequent in low memory situations?

@plu
Copy link
Author

plu commented Oct 5, 2017

I checked a few crashes on Crashlytics, it does not seem to be related to low memory.

screen shot 2017-10-05 at 03 19 21

@frunny
Copy link

frunny commented Oct 5, 2017

Same here, not memory related. What I saw is that I get crashes in waves. Sometimes I only see a few per day, now since two days the crashes are getting a lot more - but the number of app users are nearly the same.

@HowardCsie
Copy link

+1 I encountered the same issue.
Crashlytics showed the crash on this line of code.
-[FSnapshotHolder updateSnapshot:withNewSnapshot:]

@plu
Copy link
Author

plu commented Jan 4, 2018

I cannot tell in which version it was fixed, but the issue completely disappeared from Crashlytics for me for two different apps using the Firebase SDK.

Thank you! ❤️

@paulb777
Copy link
Member

paulb777 commented Jan 4, 2018

@plu Thanks for letting us know. Please reopen if this reoccurs.

@paulb777 paulb777 closed this as completed Jan 4, 2018
christibbs added a commit that referenced this issue Jan 25, 2019
* compile and run

* unit tests pass and swift target compiles

* dump build version in activity log

* standardize cross sdk imports in firebase iam code (#211)

standardize cross sdk imports & polish with style script

* using new sample app for testing non-development fiam sdk (#213)

* in-app messaging public interface cleanup (#216)

* slim down public header files

* move testing source files to their correct folders

* compiles

* style script fine-tune

* adding root object creation methods to follow the firebse iOS convension

* IAM url following refactor (#218)

* @available not supported by blaze build yet (#220)

* Clearcut integration for in-app messaging (#222)

* Update iam-master to catch up with latest master (#223)

* Support multiple triggers defined for the same iam message (#224)

* FIAM Clearcut Client Implmentation Improvement (#226)

* fixing action url bug and set auto dismiss to be 12 seconds (#227)

* use official public api dns name (#233)

* Logging firebase analytics events for fiam (#232)

* Fine tuning of fiam's code for loading data from caches (#234)

* fiam ui fine tuning before EAP (#235)

* allow fiam SDK functions to be disabled/enabled dynamically (#247)

* analytics event parameter name tuning (#253)

* migrate off @import for fiam code (#261)

* different modes for fiam sdk at runtime (#262)

* realtime clearcut when in running in simulator (#265)

* Update interface based on the Firebase API review feedback  (#267)

* check existence of fiam SDK resource bundle (#268)

* handling api keys with application restrictions (#269)

* fixing typo and refoctor for unit testing (#270)

* fix color method name clash and layout adjust (#271)

* Yongmao/layout issue and class rename (#273)

* fix long text height calc error

* rename class

* fiam modal view layout tuning (#274)

* test on device for ios client (#275)

* dynamic testing mode handling (#277)

* main header file comment update and run style.sh (#281)

* honor global firebase auto data collection flag in fiam (#283)

* honor global firebase auto data collection flag in fiam

* address comments

* tuning

* address review comments

* tuning for comments

* Rename Core global data collection switch (#287)

* Support displaying a messages defined as recurring (#286)

* continue

* Adjust some inapp messaging dependeces due to the firebase core changes from the upcoming release

* bump up version for in-app messaging

* Fix impression log clearing race condition bug. (#289)

* fix impression handling race condition bug

* podspec and interacting interfaces for new firebaseinappmessagingdisplay pod (#290)

* create inapp messaging display podspec

* Default fiam display UI implementation (#292)

* Default fiam display UI implementation. Created the new pod for FirebaseInAppMessagingDisplay

* Make FirebaseInAppMessaging headless (#293)

* import path tuning

* log test message events (#296)

* respect fetch wait time from server (#297)

* add changelog.md for fiam headless sdk (#300)

* port the fetch wait time change back into github (#304)

* remove resource bundle check for headless sdk

* fix a bug in which the test-on-device message does not follow action url

* Add category on NSString to interlace two strings, use it to obfuscate clearcut host name

* Use FIR prefix to avoid collisions

* Change method name for getting server hostname

* Delete Swift example project, its coverage is already duplicated in the FIRInAppMessagingDisplay UITests

* Miscellaneous open sourcing cleanup tasks

* Convert FIAM to use the Analytics connector (#336)

* Convert FIAM to use Analytics connector along with converting to the FIRLibrary component registration model.
* Update interop headers for missing methods
* Convert existing unit tests

* Fix style for fiam sources (#342)

* Clean up non-idiomatic ObjC method names

* Clean up Swift test target from Podfile

* Use dummy GoogleService-Info.plist and don't expose api keys (#343)

* Update plist to include fake API keys

* Remove changes in non fiam code from iam-master branch (#350)

* Fix a few method and parameter naming nits

* Fix comment typos in several files

* Delete remaining Swift project files
@firebase firebase locked and limited conversation to collaborators Nov 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants