Closed
Description
[REQUIRED] Step 1: Describe your environment
- Xcode version: 13.0
- Firebase SDK version:8.9.1
- Installation method:
Swift Package Manager
- Firebase Component: Database
- Target platform(s):
iOS
[REQUIRED] Step 2: Describe the problem
- It appeared when we started using the SDK as dependency of one of our SPM package, before, we were using cocoapods and it was fine.
- FirebaseDatabase entities get mapped when app is launched and it intermittently crashes in
FUtilities.intForString
Steps to reproduce:
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
- Happens when we launch the app since we starting mapping entities immediately
- Attached (crashlog.txt) is the crash report
If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
Relevant Code:
// TODO(you): code here to reproduce the problem
+ (NSNumber *)intForString:(NSString *)string {
static NSCharacterSet *notDigits = nil;
if (!notDigits) {
notDigits = [[NSCharacterSet decimalDigitCharacterSet] invertedSet];
}
if ([string rangeOfCharacterFromSet:notDigits].length == 0) {
NSInteger num;
NSScanner *scanner = [NSScanner scannerWithString:string];
if ([scanner scanInteger:&num]) {
return [NSNumber numberWithInteger:num];
}
}
return nil;
}
Activity
google-oss-bot commentedon Dec 14, 2021
I found a few problems with this issue:
rizafran commentedon Dec 14, 2021
Thanks for reporting, @softwaresaiyajin. Could you try updating your SDK to the latest version and see if you'll still encounter the issue? If so, could you share an MCVE reproducing the issue?
softwaresaiyajin commentedon Dec 15, 2021
Will try that
paulb777 commentedon Dec 15, 2021
The crash might be related to some particular data in the database. Are you able to catch the crash in the debugger and explore what is triggering the crash.
As mentioned above, a reproducible example would be helpful for diagnosis.
softwaresaiyajin commentedon Dec 20, 2021
Crash still happening in 8.10.0. I cannot provide a reproducible example as it's happening intermittently. Seems to be the same as this one: firebase/quickstart-unity#809.
12 remaining items