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 inside library (with SQLiteReadOnlyDatabaseException) #638

Open
taras1vovchenko opened this issue Dec 22, 2023 · 1 comment
Open

Comments

@taras1vovchenko
Copy link

Hello! I'm using bitcoin-kit in production and for some users application crashing because of

Exception android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 1032 SQLITE_READONLY_DBMOVED)
at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount
at android.database.sqlite.SQLiteConnection.executeForChangedRowCount (SQLiteConnection.java:913)
at android.database.sqlite.SQLiteSession.executeForChangedRowCount (SQLiteSession.java:756)
at android.database.sqlite.SQLiteStatement.executeUpdateDelete (SQLiteStatement.java:67)
at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeUpdateDelete (FrameworkSQLiteStatement.kt)
at io.horizontalsystems.bitcoincore.storage.BlockHashDao_Impl.delete (BlockHashDao_Impl.java:129)
at io.horizontalsystems.bitcoincore.storage.Storage.deleteBlockchainBlockHashes (Storage.kt)
at io.horizontalsystems.bitcoincore.blocks.BlockSyncer.clearBlockHashes (BlockSyncer.kt)
at io.horizontalsystems.bitcoincore.blocks.BlockSyncer.prepareForDownload (BlockSyncer.kt)
at io.horizontalsystems.bitcoincore.blocks.BlockSyncer.downloadFailed (BlockSyncer.kt)
at io.horizontalsystems.bitcoincore.blocks.InitialBlockDownload.onPeerDisconnect (InitialBlockDownload.kt)
at io.horizontalsystems.bitcoincore.network.peer.PeerGroup.onDisconnect (PeerGroup.kt)
at io.horizontalsystems.bitcoincore.network.peer.Peer.disconnected (Peer.kt)
at io.horizontalsystems.bitcoincore.network.peer.PeerConnection.run (PeerConnection.kt)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:644)
at java.lang.Thread.run (Thread.java:1012)

This was reproducing with 1.2.0, I updated to master-SNAPSHOT version, but I still have this issue. Could you, please, take a look?

@taras1vovchenko
Copy link
Author

Exception android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 1032 SQLITE_READONLY_DBMOVED)
at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount
at android.database.sqlite.SQLiteConnection.executeForChangedRowCount (SQLiteConnection.java:890)
at android.database.sqlite.SQLiteSession.executeForChangedRowCount (SQLiteSession.java:756)
at android.database.sqlite.SQLiteStatement.executeUpdateDelete (SQLiteStatement.java:66)
at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeUpdateDelete (FrameworkSQLiteStatement.kt)
at androidx.room.EntityDeletionOrUpdateAdapter.handle (EntityDeletionOrUpdateAdapter.kt)
at io.horizontalsystems.bitcoincore.storage.PeerAddressDao_Impl.delete (PeerAddressDao_Impl.java)
at io.horizontalsystems.bitcoincore.storage.Storage.deletePeerAddress (Storage.kt)
at io.horizontalsystems.bitcoincore.network.peer.PeerAddressManager.markFailed (PeerAddressManager.kt)
at io.horizontalsystems.bitcoincore.network.peer.PeerGroup.onDisconnect (PeerGroup.kt)
at io.horizontalsystems.bitcoincore.network.peer.Peer.disconnected (Peer.kt)
at io.horizontalsystems.bitcoincore.network.peer.PeerConnection.run (PeerConnection.kt)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:923)

Also have another crash

@taras1vovchenko taras1vovchenko changed the title Crash inside library SQLiteReadOnlyDatabaseException Crash inside library (with SQLiteReadOnlyDatabaseException) Dec 22, 2023
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