Skip to content
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

Some crashes with firebase sdk #1317

Closed
Lingyj opened this issue May 23, 2018 · 20 comments
Closed

Some crashes with firebase sdk #1317

Lingyj opened this issue May 23, 2018 · 20 comments

Comments

@Lingyj
Copy link

Lingyj commented May 23, 2018

I got some crashes with firebase sdk recently, here are some infomations. How to fix that?

the crashes list:
375e26ad-55cf-4bc7-924d-bf84b974e386
b6532a3f-c3f0-4643-8993-8f67c2b0a067
73b26326-9447-47c5-ac4e-651adb400a2d
65281ed9-416f-4f50-b3f7-2d7019390e74

the details:
aec1a151-8a23-4c74-867c-f9c996099d34
4d1509d7-127c-4fe2-82c7-b41b33bb9c96
a0820ed7-e32e-4391-a06f-1beccc31e436
5cbdea4b-043c-468a-a11d-217f75ee5f12
6ae7b460-d686-4c0e-887e-fd8b12aa0ca8

the sdk & version:
9ebc0b27-51f4-4dec-89a6-b84903a1ba8a

@morganchen12
Copy link
Contributor

For each stack trace posted, can you expand the full stack trace to show the hidden symbols (click on the triangle icons on the left side of the stack trace)?

@baolocdo
Copy link

Do you know which iOS versions caused the crashes?

@Lingyj
Copy link
Author

Lingyj commented May 24, 2018

ios 11.2.5 (15D60) iPhone 7 Plus
ios 11.3.1 (15E302) iPhone 7

d9fb5508-4754-46e2-9754-b730e0f91bf7
2b265245-6212-44c6-bd8d-0a7730a91c05

@Lingyj
Copy link
Author

Lingyj commented May 24, 2018

11.3.1 (15E302) iPhone 7
11.2.5 (15D60) iPhone 7 Plus
11.3.1 (15E302) 7 Plus

f8426044-a10f-4eec-adf4-af98aa8692ce
7c80cdeb-d89a-43ac-9157-07f14c0dae87

@Lingyj
Copy link
Author

Lingyj commented May 24, 2018

11.2.1 (15C153) iPhone 7
11.3.1 (15E302) iPhone X
11.3.1 (15E302) iPhone 6

c4f25d40-bf20-4e01-960a-cd124408c4f5
eabb4e5c-df9f-4f58-b7a5-6be5414cf575

@Lingyj
Copy link
Author

Lingyj commented May 24, 2018

11.2.5 (15D60) iPhone 7 Plus
11.3.0 (15E216) iPhone 7

d2905d18-2092-434b-8800-5c88068afd8b

@Lingyj
Copy link
Author

Lingyj commented May 24, 2018

11.2.5 (15D60) iPhone 7 Plus

d336d3d5-d576-4d06-9255-e4de952a36e3
8a8d43f0-bc40-4f25-a7ed-8a56e063b4d0

@Lingyj
Copy link
Author

Lingyj commented May 24, 2018

11.2.5 (15D60) iPhone 7 Plus

53ebd5ff-81bc-44c2-a8bc-8d85a679ae9e
c4e9ad44-fc90-4a8b-afa4-9ca90e80ff70

@morganchen12
Copy link
Contributor

The crashes here are all in methods that shouldn't crash (like +[NSDate date]) or in retain/release. They may not be issues related to Firebase, and we likely won't be able to debug them without repro.

@morganchen12
Copy link
Contributor

@Lingyj can you try updating to Firebase 5 and seeing if these are still present?

@Lingyj
Copy link
Author

Lingyj commented Jun 15, 2018

I catght it just now but only once. I opened the Zombie Objects and run the project, the crash occured.

4896eca1-02b3-423b-ab8d-95582e7ea8d8
771746a0-8279-4374-ae21-5ab4f5eeb96d
89beb7ef-b6ac-4e0d-9201-b1f543dbbde1

@Lingyj
Copy link
Author

Lingyj commented Jun 16, 2018

I guess the crash [FIRASearchAdReporter scheduleSearchAdReport] because of nonatomic. nonatomic is not thread-safe. In the other thread, the method is executing and coursed the crash. You can read this link.

973a0c55-ebaf-4dbf-bf31-500f5a4bd377
2ca99081-0eda-4ead-983f-bd6135b1a95b
361c4a58-76de-4f7e-be3e-c7f5db92248b

@baolocdo
Copy link

I think the self in the async block might have been deallocated. We should check whether self has been nil in the async call block. Can someone fix the FIRMutableDictionary and FIRNetwork? @morganchen12 @ryanwilson

Regarding the screenshot of FIRAMonitor, please upgrade to the latest version and use the flag UseCFPreferencesLibrary=YES in the Info.plist? Please let us know whether you see the crash again. Thanks

@paulb777 paulb777 self-assigned this Jun 19, 2018
@paulb777 paulb777 added this to the M29 milestone Jun 19, 2018
@morganchen12
Copy link
Contributor

@Lingyj are you able to capture the same zombie crash with an exception breakpoint enabled (or are you able to share the exception message with the backtrace)? The stack traces provided end in __dealloc_zombie, which IIRC is not indicative of a bad access when zombies are enabled.

@Lingyj
Copy link
Author

Lingyj commented Jun 20, 2018

FIRMutableDictionary seem only happened with Zombie Objects. I closed Zombie Objects and
cannot reappearance.
What about [FIRASearchAdReporter scheduleSearchAdReport], I got 18 crashes in the last 7 days. Any suggestion? We will have a new release in a few days. I did update to the latest sdk and add UseCFPreferencesLibrary .

@baolocdo
Copy link

I'll try to fix FIRASearchAdReporter but the scheduled release won't be out until next month. Sorry for keeping you waiting.

@paulb777 paulb777 removed this from the M29 milestone Jun 21, 2018
@Lingyj
Copy link
Author

Lingyj commented Jun 27, 2018

Hello, I got a serious problem with the lastest sdk. [FIRAMeasurement monitor] crash 140 times in two days, most on iOS11.4.0, seems a deadlock with FIRAnalytics . Old crashes seems have been fixed in the lastest sdk.

the crash stack
image
image

device & system
image
image

other thread
image
image

image

image
image
image
image
image
image

Here the sdk version:

Using Firebase (5.3.0)
Using FirebaseAnalytics (5.0.1)
Using FirebaseCore (5.0.4)
Using FirebaseInstanceID (3.1.1)
Using FirebaseMessaging (3.0.2)
Using FirebasePerformance (2.0.1)
Using FirebaseSwizzlingUtilities (2.0.0)

@Lingyj
Copy link
Author

Lingyj commented Jun 27, 2018

Seems there have a singleton with FIRAMeasurement. When the signleton init, it calls [FIRAUserDefaults synchronize], and FIRAUserDefaults recall the singleton before the singleton finish.

@baolocdo
Copy link

@Lingyj : I have filed internal bug at b/110876085. The fix should be in the next release of Firebase Analytics. Thanks for reporting

@ryanwilson
Copy link
Member

The fix was shipped in Firebase 5.5.0 last week.

@firebase firebase locked and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.