eewoz
February 19, 2018, 4:51pm
1
I entered the code for listing 6.3 which puts in the check for build version as part of adding the animation code. When I run the program I do not get any animation so I thought I would run the debugger to try to figure out what was going on.
If I put break points in CheatActivity.java the program crashes whenever I press the Cheat! button. If I put a break point in QuizActivity.java at startActivityForResult(intent, REQUEST_CODE_CHEAT); and then use step into, and then later add breakpoints in CheatActivity all is well. Shouldn’t I be able to directly set breakpoints in CheatActivity?
That is unusual. I’d love to see what the stacktrace says in LogCat when your app crashes. Can you share that here?
eewoz
February 21, 2018, 4:33pm
3
I would love to but the LogCat file has more characters than what I am allowed to post. Is there a way around this or are there some filter setting that I can use on the LogCat file to reduce its size?
Thank you for your help.
Try to find just the exception stacktrace in Logcat. It will be a large block of red text that starts with “FATAL EXCEPTION”. You can just copy and paste that part directly into the chat here.
eewoz
February 21, 2018, 9:39pm
5
Is this the right section? I searched for FATAL EXCEPTION but there was none to be found. This is the first part of the red…
02-21 16:28:40.394 5472-5472/com.bignerdranch.android.geoquiz W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
02-21 16:28:40.405 5472-5489/com.bignerdranch.android.geoquiz D/EGL_emulation: eglMakeCurrent: 0x947ab0c0: ver 2 0 (tinfo 0xa3ca0540)
02-21 16:28:43.682 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/jdwp/jdwp_event.cc:661] Check failed: Thread::Current() != GetDebugThread() (Thread::Current()=0xa3cc8600, GetDebugThread()=0xa3cc8600) Expected event thread
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] Runtime aborting…
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] Aborting thread:
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] “JDWP” prio=5 tid=4 WaitingForDebuggerSend
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x12c53b80 self=0xa3cc8600
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | sysTid=5479 nice=0 cgrp=default sched=0/0 handle=0xac8d2920
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | state=R schedstat=( 0 0 0 ) utm=1 stm=0 core=0 HZ=100
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | stack=0xac7d6000-0xac7d8000 stackSize=1014KB
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | held mutexes= “abort lock"
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #00 pc 00572f1e /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+238)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #01 pc 0053f30e /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+526)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #02 pc 0053c30b /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+75)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #03 pc 00527f13 /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+67)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #04 pc 00527ce7 /system/lib/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+615)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #05 pc 0051822b /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+155)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #06 pc 0011a5b3 /system/lib/libart.so (_ZN3art10LogMessageD1Ev+1747)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #07 pc 0039b74d /system/lib/libart.so (_ZN3art4JDWP9JdwpState24AcquireJdwpTokenForEventEy+733)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #08 pc 0039acf3 /system/lib/libart.so (_ZN3art4JDWP9JdwpState29SendRequestAndPossiblySuspendEPNS0_9ExpandBufENS0_17JdwpSuspendPolicyEy+211)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #09 pc 003a0ec9 /system/lib/libart.so (_ZN3art4JDWP9JdwpState16PostClassPrepareEPNS_6mirror5ClassE+1705)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #10 pc 001c2a85 /system/lib/libart.so (_ZN3art3Dbg16PostClassPrepareEPNS_6mirror5ClassE+53)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #11 pc 001689fc /system/lib/libart.so (_ZN3art11ClassLinker11DefineClassEPNS_6ThreadEPKcjNS_6HandleINS_6mirror11ClassLoaderEEERKNS_7DexFileERKNS9_8ClassDefE+1116)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #12 pc 001683e9 /system/lib/libart.so (_ZN3art11ClassLinker26FindClassInPathClassLoaderERNS_33ScopedObjectAccessAlreadyRunnableEPNS_6ThreadEPKcjNS_6HandleINS_6mirror11ClassLoaderEEEPPNS8_5ClassE+1865)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #13 pc 0016979b /system/lib/libart.so (_ZN3art11ClassLinker9FindClassEPNS_6ThreadEPKcNS_6HandleINS_6mirror11ClassLoaderEEE+1163)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #14 pc 005a7a7a /system/lib/libart.so (_ZN3art8verifier12RegTypeCache12ResolveClassEPKcPNS_6mirror11ClassLoaderE+186)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #15 pc 005a742d /system/lib/libart.so (_ZN3art8verifier12RegTypeCache4FromEPNS_6mirror11ClassLoaderEPKcb+701)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #16 pc 005a70fd /system/lib/libart.so (_ZN3art8verifier12RegTypeCache14FromDescriptorEPNS_6mirror11ClassLoaderEPKcb+77)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #17 pc 005862ed /system/lib/libart.so (_ZN3art8verifier14MethodVerifier26ResolveClassAndCheckAccessEj+173)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #18 pc 0058840f /system/lib/libart.so (_ZN3art8verifier14MethodVerifier25CodeFlowVerifyInstructionEPj+6463)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #19 pc 00585f96 /system/lib/libart.so (_ZN3art8verifier14MethodVerifier20CodeFlowVerifyMethodEv+358)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #20 pc 00581c9d /system/lib/libart.so (_ZN3art8verifier14MethodVerifier14VerifyCodeFlowEv+973)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #21 pc 0057da56 /system/lib/libart.so (_ZN3art8verifier14MethodVerifier6VerifyEv+854)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #22 pc 0057c742 /system/lib/libart.so (_ZN3art8verifier14MethodVerifier12VerifyMethodEPNS_6ThreadEjPKNS_7DexFileENS_6HandleINS_6mirror8DexCacheEEENS7_INS8_11ClassLoaderEEEPKNS4_8ClassDefEPKNS4_8CodeItemEPNS_9ArtMethodEjPNS_17CompilerCallbacksEbNS_11LogSeverityEbPNSt3__112basic_stringIcNSO_11char_traitsIcEENSO_9allocatorIcEEEE+226)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #23 pc 0057c1c7 /system/lib/libart.so (_ZN3art8verifier14MethodVerifier13VerifyMethodsILb0EEENS1_11FailureDataEPNS_6ThreadEPNS_11ClassLinkerEPKNS_7DexFileEPKNS8_8ClassDefEPNS_21ClassDataItemIteratorENS_6HandleINS_6mirror8DexCacheEEENSG_INSH_11ClassLoaderEEEPNS_17CompilerCallbacksEbNS_11LogSeverityEbPNSt3__112basic_stringIcNSP_11char_traitsIcEENSP_9allocatorIcEEEE+791)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #24 pc 0057b1f9 /system/lib/libart.so (_ZN3art8verifier14MethodVerifier11VerifyClassEPNS_6ThreadEPKNS_7DexFileENS_6HandleINS_6mirror8DexCacheEEENS7_INS8_11ClassLoaderEEEPKNS4_8ClassDefEPNS_17CompilerCallbacksEbNS_11LogSeverityEPNSt3__112basic_stringIcNSJ_11char_traitsIcEENSJ_9allocatorIcEEEE+921)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #25 pc 0057a4b9 /system/lib/libart.so (_ZN3art8verifier14MethodVerifier11VerifyClassEPNS_6ThreadEPNS_6mirror5ClassEPNS_17CompilerCallbacksEbNS_11LogSeverityEPNSt3__112basic_stringIcNSA_11char_traitsIcEENSA_9allocatorIcEEEE+841)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #26 pc 00174386 /system/lib/libart.so (_ZN3art11ClassLinker11VerifyClassEPNS_6ThreadENS_6HandleINS_6mirror5ClassEEENS_11LogSeverityE+2102)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #27 pc 0017a406 /system/lib/libart.so (_ZN3art11ClassLinker15InitializeClassEPNS_6ThreadENS_6HandleINS_6mirror5ClassEEEbb+326)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #28 pc 00158dde /system/lib/libart.so (_ZN3art11ClassLinker17EnsureInitializedEPNS_6ThreadENS_6HandleINS_6mirror5ClassEEEbb+222)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #29 pc 001b60da /system/lib/libart.so (_ZN3artL17GetFieldValueImplEyyyPNS_4JDWP9ExpandBufEb+1866)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #30 pc 001b667e /system/lib/libart.so (_ZN3art3Dbg19GetStaticFieldValueEyyPNS_4JDWP9ExpandBufE+78)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #31 pc 003a4c5d /system/lib/libart.so (_ZN3art4JDWPL12RT_GetValuesEPNS0_9JdwpStateEPNS0_7RequestEPNS0_9ExpandBufE+141)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #32 pc 003a2ea4 /system/lib/libart.so (_ZN3art4JDWP9JdwpState14ProcessRequestEPNS0_7RequestEPNS0_9ExpandBufEPb+1044)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #33 pc 003ab570 /system/lib/libart.so (_ZN3art4JDWP9JdwpState12HandlePacketEv+192)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #34 pc 00678df3 /system/lib/libart.so (_ZN3art4JDWP12JdwpAdbState15ProcessIncomingEv+1139)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #35 pc 003ab9d1 /system/lib/libart.so (_ZN3art4JDWP9JdwpState3RunEv+593)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #36 pc 003aae50 /system/lib/libart.so (_ZN3art4JDWPL15StartJdwpThreadEPv+48)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #37 pc 00074fe2 /system/lib/libc.so (_ZL15__pthread_startPv+210)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #38 pc 0002029e /system/lib/libc.so (__start_thread+30)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #39 pc 0001e076 /system/lib/libc.so (__bionic_clone+70)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] (no managed stack frames)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] Dumping all threads without appropriate locks held: thread list lock mutator lock
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] All threads:
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] DALVIK THREADS (14):
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] “JDWP” prio=5 tid=4 Runnable
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | group=”" sCount=0 dsCount=0 obj=0x12c53b80 self=0xa3cc8600
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | sysTid=5479 nice=0 cgrp=default sched=0/0 handle=0xac8d2920
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | state=R schedstat=( 0 0 0 ) utm=2 stm=0 core=0 HZ=100
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | stack=0xac7d6000-0xac7d8000 stackSize=1014KB
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] | held mutexes= “abort lock” “mutator lock”(shared held)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #00 pc 00572f1e /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+238)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #01 pc 0053f30e /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+526)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #02 pc 0053c30b /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+75)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #03 pc 0055befb /system/lib/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+1115)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #04 pc 005521be /system/lib/libart.so (_ZN3art10ThreadList13RunCheckpointEPNS_7ClosureE+590)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #05 pc 00551d32 /system/lib/libart.so (_ZN3art10ThreadList4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEb+962)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #06 pc 00528168 /system/lib/libart.so (_ZNK3art10AbortState14DumpAllThreadsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+424)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #07 pc 00527eb6 /system/lib/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+1078)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #08 pc 0051822b /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+155)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #09 pc 0011a5b3 /system/lib/libart.so (_ZN3art10LogMessageD1Ev+1747)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #10 pc 0039b74d /system/lib/libart.so (_ZN3art4JDWP9JdwpState24AcquireJdwpTokenForEventEy+733)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #11 pc 0039acf3 /system/lib/libart.so (_ZN3art4JDWP9JdwpState29SendRequestAndPossiblySuspendEPNS0_9ExpandBufENS0_17JdwpSuspendPolicyEy+211)
02-21 16:28:43.702 5472-5479/com.bignerdranch.android.geoquiz A/art: art/runtime/runtime.cc:422] native: #12 pc 003a0ec9 /system/lib/libart.so (_ZN3art4JDWP9JdwpState16PostClassPrepareEPNS_6mirror5ClassE+1705)
eewoz
February 21, 2018, 9:44pm
6
I see these errors over and over again in LogCat. I don’t know if it is related to my problem or not.
02-21 16:39:38.434 1336-1887/? E/AudioFlinger: not enough memory for AudioTrack size=131296
02-21 16:39:38.434 1336-1887/? D/MemoryDealer: AudioTrack (0xb5e9cea0, size=4194304)
0: 0xb5e9ceb0 | 0x00000000 | 0x000200E0 | A
1: 0xb5e9ced0 | 0x000200E0 | 0x000200E0 | A
2: 0xb5e9cf40 | 0x000401C0 | 0x000200E0 | A
3: 0xb54de090 | 0x000602A0 | 0x000200E0 | A
4: 0xb5e9cd10 | 0x00080380 | 0x000200E0 | A
5: 0xb54de590 | 0x000A0460 | 0x000200E0 | A
6: 0xb54de3b0 | 0x000C0540 | 0x000200E0 | A
7: 0xb5e9cca0 | 0x000E0620 | 0x000200E0 | A
8: 0xb54de6a0 | 0x00100700 | 0x000200E0 | A
9: 0xb54debc0 | 0x001207E0 | 0x000200E0 | A
10: 0xb54ded70 | 0x001408C0 | 0x000200E0 | A
11: 0xb54dee90 | 0x001609A0 | 0x000200E0 | A
12: 0xb5e9c920 | 0x00180A80 | 0x000200E0 | A
13: 0xb3371030 | 0x001A0B60 | 0x000200E0 | A
14: 0xb33712c0 | 0x001C0C40 | 0x000200E0 | A
15: 0xb3371500 | 0x001E0D20 | 0x000200E0 | A
16: 0xb3371620 | 0x00200E00 | 0x000200E0 | A
17: 0xb33717b0 | 0x00220EE0 | 0x000200E0 | A
18: 0xb33719b0 | 0x00240FC0 | 0x000200E0 | A
19: 0xb3371af0 | 0x002610A0 | 0x000200E0 | A
Looks like the actual crash isn’t in the logs you pasted in.
When you say the app crashes, what do you see? Do you get a dialog that says the app crashed?
Sometimes you do have to play around with LogCat to get it to show the info that you’re looking for. I recommend reproducing the crash and right after it happens, looking through logcat for “FATAL EXCEPTION”. Crashes will always start with that. You may have to adjust the log level filter or the other filter on the right side of LogCat to see this stacktrace.
eewoz
February 22, 2018, 3:57pm
8
I get a dialog in the emulator that says “Geo Quiz has stopped Open app again”. When I click open app again the program runs fine but it does not obey my breakpoints so I am guessing that it restarts in normal mode.
I finally found what I think we are looking for!
02-22 10:44:54.001 2032-2068/? E/AndroidRuntime: FATAL EXCEPTION: reflection-thread
Process: com.google.android.apps.nexuslauncher, PID: 2032
java.lang.IllegalArgumentException
at java.util.concurrent.ThreadPoolExecutor.(ThreadPoolExecutor.java:1298)
at java.util.concurrent.ThreadPoolExecutor.(ThreadPoolExecutor.java:1186)
at java.util.concurrent.Executors.newFixedThreadPool(Executors.java:66)
at com.google.research.reflection.layers.e.(SourceFile:26)
at com.google.research.reflection.layers.e.getInstance(SourceFile:37)
at com.google.research.reflection.layers.o.Uj(SourceFile:249)
at com.google.research.reflection.layers.a.Tm(SourceFile:72)
at com.google.research.reflection.predictor.g.Sf(SourceFile:162)
at com.google.research.reflection.predictor.c.RN(SourceFile:133)
at com.google.android.apps.nexuslauncher.reflection.e.aa(SourceFile:224)
at com.google.android.apps.nexuslauncher.reflection.e.ae(SourceFile:191)
at com.google.android.apps.nexuslauncher.reflection.j.aE(SourceFile:104)
at com.google.android.apps.nexuslauncher.reflection.l.handleMessage(SourceFile:99)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
02-22 10:44:54.002 1635-1692/? W/ActivityManager: Force finishing activity com.google.android.apps.nexuslauncher/.NexusLauncherActivity
That’s an error with the com.google.android.apps.nexuslauncher app, which is the launcher (home screen) on your device.
Very strange. You should see a similar stacktrace that has your own app’s name and package name. Maybe there is something strange going on with your emulator (or phone)?
Does this stacktrace pop up every time you reproduce the crash? It’s a good idea to make sure that any stacktrace that seems unreleated isn’t just an old crash log that’s been around for a while.
eewoz
February 22, 2018, 6:00pm
10
I think that was indeed a leftover crash log. It is acting very flakey. One time that I ran it it actually worked as it should as far as obeying breakpoints. But then I stepped over
anim.addListener(new AnimatorListenerAdapter()
(or a line near that) and it crashed. Other times it crashes right after I click the Cheat! button.
When this happens LogCat never generates a Fatal Exception. I seem to get the same behavior when I run Debug on my cell phone rather than the emulator. I double checked the code around the anim.addListener(new AnimatorListenerAdapter()
statement and it appears OK.
When you’re using the debugger and a crash occurs, you may need to release the debugger for the stack trace to be printed out in logcat. Reproduce the crash again with the debugger and then use the “Resume” button in the debugging pane (looks like a green play icon. Hover over it to make sure you’ve got the right one). Keep hitting the resume button until the app fully crashes and the stack trace is printed out.
After you do that, you should see the stacktrace. Paste it in here and hopefully we can figure out what’s going on.
eewoz
February 23, 2018, 11:31pm
12
When the crash occurs the Resume button is not active in the debugger pane. Both the debugger pane and LogCat did show this message however.
02-23 18:19:03.921 4861-4868/com.bignerdranch.android.geoquiz A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 4868 (JDWP)
[ 02-23 18:19:03.922 1242: 1242 W/ ]
debuggerd: handling request: pid=4861 uid=10084 gid=10084 tid=4868
No sign of FATAL EXCEPTION in log file.