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

Crash: Closing database followed by Error: Leak detected! #1718

Open
17Amir17 opened this issue Dec 5, 2023 · 1 comment
Open

Crash: Closing database followed by Error: Leak detected! #1718

17Amir17 opened this issue Dec 5, 2023 · 1 comment

Comments

@17Amir17
Copy link

17Amir17 commented Dec 5, 2023

Hey, on my project whenever hot reloading or sometimes randomly when interacting with the app, the app crashes with the following error in flipper

Closing database...
Error: Leak detected! Finalized a statement when closing database - this means that there were dangling statements not held by cachedStatements, or handling of cachedStatements is broken. Please collect as much information as possible and file an issue with WatermelonDB repository!

Screenshot 2023-12-05 at 15 02 16

Also this is what I see from the xcode breakpoint

sqlite 3 hades (18): EXC_BAD_ACCESS (code=1, address=0x80000000116775ab)

Screenshot 2023-12-05 at 15 43 57

I'm not really sure why it's closing the db either
Any idea how I can debug this further?

@17Amir17 17Amir17 changed the title Closing database followed by Error: Leak detected! Crash: Closing database followed by Error: Leak detected! Dec 5, 2023
@17Amir17
Copy link
Author

This mainly happens when developing and hot reloading, but from playstore crash logs I have seen this happen in production, @radex is there any direction you can give me to investigate this? I tried looking around and it looks like the DB is being closed before this happens (I do not call this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant