amplitude / amplitude/Amplitude-Android

SQLITE_CANTOPEN_EMFILE

Aperta
#159 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Java
Stelle
169
Fork
87
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi guys! I've got an app crash after multiple app switches from recents screen.
I initialize Amplitude once in onCreate method of Application class.
Here is the stacktrace:

> E/SQLiteLog: (28) failed to open "/data/data/hk.moneon.debug/databases/com.amplitude.api-journal" with flag (131072) and mode_t (1b0) due to error (24)
E/SQLiteLog: (14) cannot open file at line 32557 of [b3bb660af9]
E/SQLiteLog: (14) os_unix.c:32557: (24) open(/data/data/hk.moneon.debug/databases/com.amplitude.api-journal) -
E/SQLiteLog: (28) failed to open "/data/data/hk.moneon.debug/databases/com.amplitude.api-journal" with flag (131074) and mode_t (1b0) due to error (24)
E/SQLiteLog: (28) failed to open "/data/data/hk.moneon.debug/databases/com.amplitude.api-journal" with flag (131072) and mode_t (1b0) due to error (24)
E/SQLiteLog: (14) cannot open file at line 32557 of [b3bb660af9]
E/SQLiteLog: (14) os_unix.c:32557: (24) open(/data/data/hk.moneon.debug/databases/com.amplitude.api-journal) -
E/SQLiteLog: (2062) statement aborts at 1: [PRAGMA user_version;] unable to open database file
E/REALM: could not create WeakRealmNotifier ALooper message pipe: Too many open files.
E/REALM: uncaught exception in notifier thread: St12system_error: Bad file number
E/com.amplitude.api.DatabaseHelper: insertOrReplaceKeyValue in long_store failed
android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 2062)

>Error Code : 2062 (SQLITE_CANTOPEN_EMFILE) Caused By : Application has opened two many files. Maximum of available file descriptors in one process is 1024 in default. (unable to open database file (code 2062)) #################################################################
at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:768)
at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:825)
at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:813)
at android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:1002)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:241)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
at com.amplitude.api.DatabaseHelper.insertOrReplaceKeyValueToTable(DatabaseHelper.java:147)
at com.amplitude.api.DatabaseHelper.insertOrReplaceKeyLongValue(DatabaseHelper.java:141)
at com.amplitude.api.AmplitudeClient.getNextSequenceNumber(AmplitudeClient.java:1000)
at com.amplitude.api.AmplitudeClient.logEvent(AmplitudeClient.java:902)
at com.amplitude.api.AmplitudeClient$5.run(AmplitudeClient.java:841)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.