-
-
Notifications
You must be signed in to change notification settings - Fork 696
-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
Crash RangeReplaceableCollection.append<A>(contentsOf:) #1626
Comments
Hello @bgoncal, Thank you for the report. The crash report mentions May I ask if this crash has started happening after some change in your app, or in the way the app is built or distributed? When you compare the version that crashes and the version that does not, was has changed? Also, please confirm that the app was built with Xcode 16 RC. And finally, please tell which is the target iOS version of your app. |
Unfortunately I just added GRDB to the App, so I don't have a previous version to compare :/ Minimum app version is iOS 15, crash happens (at least) on iOS 17.6 and 18 |
Ive never seen the issue happening in foreground, so.. perhaps it has some relation? (Even though it would be something different from what you shared above). |
Thank you for the feedback.
Welcome to the GRDB users :-)
OK, so that's not #1619.
Eventual background errors due to data protection should turn into a runtime error that you can catch, not a hard crash (unless you use
Why not: this could help narrowing the problem. Did you try to trigger the crash on your own device? As a temporary conclusion... Did you consider using Xcode 15.4, since Xcode 16 RC still has rough edges? |
I couldn't reproduce the issue while debugging, but I see it happening in the testflight version on my personal device, usually I see "Home Assistant crashed, do you want to report the issue?" popup after I unlock my device (but before trying to open the app, just on home screen) I cannot use 15.4 because my app has iOS 18 specific features :/ |
Of course!
It would be interesting to get a full crash log stored on the device, if possible. I would also run the app, from Xcode, in Release configuration. Attach the Xcode debugger to the TestFlight build could be interesting as well. I'm sorry if I'm throwing ideas in the air, but I'm just as clueless as you are 😅 |
No worries, ask for as much as you need haha, let me check the full log report and get back to you |
After I added the checked for foreground the crash stopped happening, maybe too soon to tell but definitely an improvement |
What did you do?
I have a logic that every time I receive updates from an API I check if I need to replace the information from my local database which uses GRDB, for that I do something like this:
But sometimes this makes the App crash in background (This logic also runs in background), in Xcode crashes I see crash "RangeReplaceableCollection.append(contentsOf:)".
What did you expect to happen?
No crash
What happened instead?
Crash
Environment
GRDB flavor(s): GRDB
GRDB version: v6.29.3
Installation method: CocoaPods
Xcode version: 16 RC
Swift version: 5.7
Platform(s) running GRDB: iOS, macOS and watchOS
macOS version running Xcode: 15.1 Beta 3
Demo Project
I don't have a demo project but the code fo my app is open source, the exact file I mentioned above is:
https://github.com/home-assistant/iOS/blob/master/Sources/App/AppEntitiesObserver.swift
Crash is pointed to be on line 52
The text was updated successfully, but these errors were encountered: