对这个含糊的问题表示道歉。我的应用程序因SQLite异常而崩溃 - SQLiteConstraintException。我在项目中使用Realm但不使用SQLite。通过查看日志,我无法理解可能导致这种情况的原因。
如果能够阐明它可能是什么,那将是非常有帮助的。
更新:此问题仅发生在我的三星Galaxy S6上。我在其他Android设备上运行我的应用程序,包括一个不同的三星Galaxy S6,它工作正常。 虽然没有找到原因。(此更新只是为了帮助其他人面临类似的问题)
这是我的日志
04-03 11:35:29.425 5343-5411/? E/ContactsProvider_EventLog: Flush buffer to file cnt : 1 size : 1Kb duration : 2ms lastUpdatedAfter : 60140 ms mFlush_time_threasold : 2000 mCurrentSize : 795
04-03 11:35:40.980 3643-4317/? E/Watchdog: !@Sync 1309 [2018-04-03 11:35:40.980]
04-03 11:35:53.033 3643-4392/? E/ActivityManager: applyOptionsLocked: pendingOptions.getStartX()=39pendingOptions.getStartY()=748
04-03 11:35:53.193 3643-15410/? E/SensorService: getSensorList a sensor (MAX86900) without holding its required permission: com.samsung.permission.SSENSOR
04-03 11:35:53.193 3643-15410/? E/SensorService: getSensorList a sensor (HRM Ambient Light Canceling) without holding its required permission: com.samsung.permission.HRM_EXT
04-03 11:35:53.193 3643-15410/? E/SensorService: getSensorList a sensor (HRMLED IR) without holding its required permission: android.permission.BODY_SENSORS
04-03 11:35:53.193 3643-15410/? E/SensorService: getSensorList a sensor (HRMLED RED) without holding its required permission: android.permission.BODY_SENSORS
04-03 11:35:53.193 3643-15410/? E/SensorService: getSensorList a sensor (HRM Proximity detecting) without holding its required permission: com.samsung.permission.HRM_EXT
04-03 11:35:53.193 3643-15410/? E/SensorService: getSensorList a sensor (HRM Sensor) without holding its required permission: com.samsung.permission.SSENSOR
04-03 11:35:53.193 3643-15410/? E/SensorService: getSensorList a sensor (HeartRate Sensor) without holding its required permission: android.permission.BODY_SENSORS
04-03 11:35:53.193 3643-15410/? E/SensorService: getSensorList a sensor (Sensor Diagnostic Monitor) without holding its required permission: com.samsung.permission.SSENSOR
04-03 11:35:54.392 3132-3132/? E/OMXNodeInstance: getConfig(c3c0240:Exynos.AVC.Encoder, ConfigAndroidIntraRefresh(0x6f60000a)) ERROR: UnsupportedIndex(0x8000101a)
04-03 11:35:55.011 3643-15413/? E/InputMethodManagerService: Perflock object null
04-03 11:35:55.031 20342-20342/? E/KeyboardInfoUtils: getInstance start
04-03 11:35:55.031 20342-20342/? E/KeyboardInfoUtils: sendSIPInformation state:6 isAbstractKeyboardView : true
04-03 11:35:55.032 20342-3743/? E/KeyboardInfoUtils: sending null keyboardInfo as SIP is closed
04-03 11:35:57.154 3325-3325/com.XXXX.onboarding.t3st.dev E/BoostFramework: BoostFramework() : Exception_1 = java.lang.ClassNotFoundException: Didn't find class "com.qualcomm.qti.Performance" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]]
04-03 11:35:57.229 20342-3760/? E/SKBD: updateShiftState() : 2
04-03 11:36:04.048 5061-3847/? E/SQLiteCastStore: Skip saving CastDeviceInfo: "Nearby device" (__cast_nearby___V_6178185b-e5e2-4698-9522-a98bfe27e0b3)
04-03 11:36:04.054 5061-3847/? E/SQLiteDatabase: Error inserting is_responding_to_probe=1 last_probed_timestamp_millis=1522750899426 device_id=e895d0b9e85682899f45a2bdb0d8457a probing_error_code=0 number_of_probed_times=0 network_id=null
android.database.sqlite.SQLiteConstraintException: NOT NULL constraint failed: ProbedNetwork.network_id (code 1299)
#################################################################
Error Code : 1299 (SQLITE_CONSTRAINT_NOTNULL)
Caused By : Abort due to constraint violation.
(NOT NULL constraint failed: ProbedNetwork.network_id (code 1299))
#################################################################
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:865)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1862)
at android.database.sqlite.SQLiteDatabase.replace(SQLiteDatabase.java:1778)
at lda.b(com.google.android.gms@12221440@12.2.21 (440-188803320):30)
at lcw.b(com.google.android.gms@12221440@12.2.21 (440-188803320):31)
at lbv.run(Unknown Source)
at njd.call(com.google.android.gms@12221440@12.2.21 (440-188803320):2)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at nil.run(com.google.android.gms@12221440@12.2.21 (440-188803320):1)
at njk.run(com.google.android.gms@12221440@12.2.21 (440-188803320):26)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at npg.run(com.google.android.gms@12221440@12.2.21 (440-188803320))
at java.lang.Thread.run(Thread.java:762)
04-03 11:36:04.054 5061-3847/? E/SQLiteCastStore: Unable to insert probedNetwork: CastProbedNetwork. Network ID: null, isDeviceRespondingToProbe: true, lastProbedTimestampMillis: 1522750899426, probingErrorCode: 0, numberOfProbedTimes: 0.
04-03 11:36:04.057 5061-3847/? E/SQLiteDatabase: Error inserting is_responding_to_probe=1 last_probed_timestamp_millis=1522751620475 device_id=69c4a49c55feb8e888d4fa20bb53d4a3 probing_error_code=0 number_of_probed_times=0 network_id=null
android.database.sqlite.SQLiteConstraintException: NOT NULL constraint failed: ProbedNetwork.network_id (code 1299)
#################################################################
Error Code : 1299 (SQLITE_CONSTRAINT_NOTNULL)
Caused By : Abort due to constraint violation.
(NOT NULL constraint failed: ProbedNetwork.network_id (code 1299))
#################################################################
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:865)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1862)
at android.database.sqlite.SQLiteDatabase.replace(SQLiteDatabase.java:1778)
at lda.b(com.google.android.gms@12221440@12.2.21 (440-188803320):30)
at lcw.b(com.google.android.gms@12221440@12.2.21 (440-188803320):31)
at lbv.run(Unknown Source)
at njd.call(com.google.android.gms@12221440@12.2.21 (440-188803320):2)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at nil.run(com.google.android.gms@12221440@12.2.21 (440-188803320):1)
at njk.run(com.google.android.gms@12221440@12.2.21 (440-188803320):26)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at npg.run(com.google.android.gms@12221440@12.2.21 (440-188803320))
at java.lang.Thread.run(Thread.java:762)
04-03 11:36:04.058 5061-3847/? E/SQLiteCastStore: Unable to insert probedNetwork: CastProbedNetwork. Network ID: null, isDeviceRespondingToProbe: true, lastProbedTimestampMillis: 1522751620475, probingErrorCode: 0, numberOfProbedTimes: 0.
04-03 11:36:04.058 5061-3847/? E/SQLiteCastStore: Skip saving CastDeviceInfo: "Nearby device" (__cast_nearby___V_0d078fcb-70a1-48bf-9f36-3c936aafdab9)
04-03 11:36:04.061 5061-3847/? E/SQLiteDatabase: Error inserting is_responding_to_probe=0 last_probed_timestamp_millis=1522737046620 device_id=65db08770005e75584d7a699e13bbda1 probing_error_code=2 number_of_probed_times=1 network_id=null
android.database.sqlite.SQLiteConstraintException: NOT NULL constraint failed: ProbedNetwork.network_id (code 1299)
#################################################################
Error Code : 1299 (SQLITE_CONSTRAINT_NOTNULL)
Caused By : Abort due to constraint violation.
(NOT NULL constraint failed: ProbedNetwork.network_id (code 1299))
#################################################################
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:865)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1862)
at android.database.sqlite.SQLiteDatabase.replace(SQLiteDatabase.java:1778)
at lda.b(com.google.android.gms@12221440@12.2.21 (440-188803320):30)
at lcw.b(com.google.android.gms@12221440@12.2.21 (440-188803320):31)
at lbv.run(Unknown Source)
at njd.call(com.google.android.gms@12221440@12.2.21 (440-188803320):2)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at nil.run(com.google.android.gms@12221440@12.2.21 (440-188803320):1)
at njk.run(com.google.android.gms@12221440@12.2.21 (440-188803320):26)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at npg.run(com.google.android.gms@12221440@12.2.21 (440-188803320))
at java.lang.Thread.run(Thread.java:762)
04-03 11:36:04.061 5061-3847/? E/SQLiteCastStore: Unable to insert probedNetwork: CastProbedNetwork. Network ID: null, isDeviceRespondingToProbe: false, lastProbedTimestampMillis: 1522737046620, probingErrorCode: 2, numberOfProbedTimes: 1.
04-03 11:36:08.582 3643-3656/? E/InputMethodManagerService: Perflock object null
04-03 11:36:08.669 20342-20342/? E/KeyboardInfoUtils: getInstance start
04-03 11:36:08.669 20342-20342/? E/KeyboardInfoUtils: sendSIPInformation state:6 isAbstractKeyboardView : true
04-03 11:36:08.669 20342-3839/? E/KeyboardInfoUtils: sending null keyboardInfo as SIP is closed
04-03 11:36:10.046 20342-3853/? E/SKBD: updateShiftState() : 2
04-03 11:36:10.988 3643-4317/? E/Watchdog: !@Sync 1310 [2018-04-03 11:36:10.988]
04-03 11:36:11.486 3643-7478/? E/InputMethodManagerService: Perflock object null
04-03 11:36:11.585 20342-20342/? E/KeyboardInfoUtils: getInstance start
04-03 11:36:11.585 20342-20342/? E/KeyboardInfoUtils: sendSIPInformation state:6 isAbstractKeyboardView : true
04-03 11:36:11.585 20342-3868/? E/KeyboardInfoUtils: sending null keyboardInfo as SIP is closed
04-03 11:36:25.404 3132-3725/? E/Exynos_OSAL_Android: [Exynos_OSAL_LockMetaData]: Failed to Exynos_OSAL_GetInfoFromMetaData (err:0x80001005)
04-03 11:36:25.405 3132-3719/? E/Exynos_OSAL_Android: [Exynos_OSAL_UnlockMetaData]: Failed to Exynos_OSAL_GetInfoFromMetaData (err:0x80001005)
04-03 11:36:25.411 3132-3132/? E/BufferQueueProducer: [GraphicBufferSource] dequeueBuffer: BufferQueue has been abandoned
[ 04-03 11:36:25.412 3325: 3615 D/ ]
NULL == surf->write_back_color_buffer
04-03 11:36:25.412 3325-3615/com.XXXX.onboarding.t3st.dev E/OpenGLRenderer: GL error: Out of memory!
04-03 11:36:25.412 3325-3615/com.XXXX.onboarding.t3st.dev A/OpenGLRenderer: GL errors! frameworks/base/libs/hwui/renderthread/CanvasContext.cpp:544
04-03 11:36:25.613 3325-3615/com.XXXX.onboarding.t3st.dev A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 3615 (RenderThread)
[ 04-03 11:36:25.613 3014: 3014 W/ ]
debuggerd: handling request: pid=3325 uid=10892 gid=10892 tid=3615
04-03 11:36:25.622 3021-3021/? E/audit: type=1400 audit(1522751785.616:4482): avc: denied { search } for pid=3966 comm="debuggerd64" name="com.XXXX.onboarding.t3st.dev" dev="sda18" ino=592097 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0 SEPF_SECMOBILE_7.0_0009
04-03 11:36:25.690 3966-3966/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-03 11:36:25.690 3966-3966/? A/DEBUG: Build fingerprint: 'samsung/zerofltexx/zeroflte:7.0/NRD90M/G920FXXS5ERB6:user/release-keys'
04-03 11:36:25.690 3966-3966/? A/DEBUG: Revision: '11'
04-03 11:36:25.690 3966-3966/? A/DEBUG: ABI: 'arm64'
04-03 11:36:25.690 3966-3966/? A/DEBUG: pid: 3325, tid: 3615, name: RenderThread >>> com.XXXX.onboarding.t3st.dev <<<
04-03 11:36:25.690 3966-3966/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
04-03 11:36:25.693 3966-3966/? A/DEBUG: Abort message: 'GL errors! frameworks/base/libs/hwui/renderthread/CanvasContext.cpp:544'
04-03 11:36:25.693 3966-3966/? A/DEBUG: x0 0000000000000000 x1 0000000000000e1f x2 0000000000000006 x3 0000000000000008
04-03 11:36:25.693 3966-3966/? A/DEBUG: x4 0000000000000021 x5 0000000000000000 x6 0000007157f08000 x7 0000000000000000
04-03 11:36:25.693 3966-3966/? A/DEBUG: x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001
04-03 11:36:25.693 3966-3966/? A/DEBUG: x12 ffffffffffffffff x13 0000000000000000 x14 0000000000000000 x15 0018937837e3eceb
04-03 11:36:25.693 3966-3966/? A/DEBUG: x16 00000071554c9ee0 x17 00000071554735ac x18 000000000000f000 x19 00000071329d74f8
04-03 11:36:25.693 3966-3966/? A/DEBUG: x20 0000000000000006 x21 00000071329d7450 x22 000000000000000b x23 00000071552d8030
04-03 11:36:25.693 3966-3966/? A/DEBUG: x24 00000071332126e0 x25 00000071537d2b20 x26 000000712d956e10 x27 00000071537d2b38
04-03 11:36:25.693 3966-3966/? A/DEBUG: x28 7fffffffffffffff x29 00000071329d66a0 x30 0000007155470a54
04-03 11:36:25.693 3966-3966/? A/DEBUG: sp 00000071329d6680 pc 00000071554735b4 pstate 0000000060000000
04-03 11:36:25.697 3966-3966/? A/DEBUG: backtrace:
04-03 11:36:25.697 3966-3966/? A/DEBUG: #00 pc 000000000006b5b4 /system/lib64/libc.so (tgkill+8)
04-03 11:36:25.697 3966-3966/? A/DEBUG: #01 pc 0000000000068a50 /system/lib64/libc.so (pthread_kill+64)
04-03 11:36:25.697 3966-3966/? A/DEBUG: #02 pc 0000000000023f68 /system/lib64/libc.so (raise+24)
04-03 11:36:25.697 3966-3966/? A/DEBUG: #03 pc 000000000001c9ec /system/lib64/libc.so (abort+52)
04-03 11:36:25.697 3966-3966/? A/DEBUG: #04 pc 00000000000112ec /system/lib64/libcutils.so (__android_log_assert+232)
04-03 11:36:25.697 3966-3966/? A/DEBUG: #05 pc 0000000000033e18 /system/lib64/libhwui.so
04-03 11:36:25.697 3966-3966/? A/DEBUG: #06 pc 000000000003454c /system/lib64/libhwui.so
04-03 11:36:25.697 3966-3966/? A/DEBUG: #07 pc 000000000003b980 /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread22dispatchFrameCallbacksEv+212)
04-03 11:36:25.697 3966-3966/? A/DEBUG: #08 pc 000000000003bb5c /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+148)
04-03 11:36:25.697 3966-3966/? A/DEBUG: #09 pc 0000000000012488 /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+272)
04-03 11:36:25.698 3966-3966/? A/DEBUG: #10 pc 00000000000a4d40 /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+116)
04-03 11:36:25.698 3966-3966/? A/DEBUG: #11 pc 0000000000068258 /system/lib64/libc.so (_ZL15__pthread_startPv+196)
04-03 11:36:25.698 3966-3966/? A/DEBUG: #12 pc 000000000001dc00 /system/lib64/libc.so (__start_thread+16)
04-03 11:36:28.774 3993-3993/? E/Zygote: v2
04-03 11:36:28.778 3993-3993/? E/Zygote: accessInfo : 0
04-03 11:36:29.563 5343-5411/? E/ContactsProvider_EventLog: Flush buffer to file cnt : 1 size : 1Kb duration : 3ms lastUpdatedAfter : 60138 ms mFlush_time_threasold : 2000 mCurrentSize : 795
04-03 11:36:41.000 3643-4317/? E/Watchdog: !@Sync 1311 [2018-04-03 11:36:41.000]
答案 0 :(得分:0)
您的真正问题是E/OpenGLRenderer: GL error: Out of memory!
,然后会导致FATAL
错误,即崩溃。
sqlite stacktrace来自Google Play服务,并非致命的崩溃,只是记录了错误日志级别的异常。