-
Notifications
You must be signed in to change notification settings - Fork 30
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
App Crashes while ObjectBox Database sharing between main app and its extension #61
Comments
Could you try the following (pseudo code) to open the store:
If the app goes into background, it also may help to close the store. |
Hi @greenrobot,
We are still getting crashes while going into the background. |
Hi Guys |
Any update on it? |
Any update? |
Any update on this? This is the major blocker now. |
@nisha-rana16 Is this still an issue with the latest version (1.9.2)? I'm not familiar with app extensions, but upon reading extensions like widgets seem to run in a different process? If the app goes to the background, this might probably cause the database to close? Then it can not longer be accessed from the extension process? So maybe handling that case might avoid crashes? (Though, it's generally a bad idea to access the same database files from different processes.) As for a workaround: is it possible to just pass data to the extension from the app and the extension does not touch the database itself at all? |
(https://stackoverflow.com/posts/71414769/timeline)
I was trying to share the Objectbox created database between the app and its extension. I used the below code to share the database between the app and its extension.
The app is working fine when the app is running in foreground. When the app goes to the background then the app is crashing. When I remove the above code and used the below code
The app does not crash and started working fine without Database sharing.
Note: If we ignore this crash, I was able to use the database from the app and its extension. We can not ignore it because it happens every-time.
Basic Infor
Object Box : 1.5.0
iOS: iOS 15 and above
Device: Any iPhone not simulator
Step to Reproduce
Crashlog.pdf
Log
The text was updated successfully, but these errors were encountered: