当一个统一游戏ion android没有聚焦并尝试调用android API播放声音时,该游戏将崩溃。 (2)

时间:2019-03-09 14:45:34

标签: android unity3d

问题是关于游戏不集中时的统一性,Android和播放声音。当游戏没有专注并尝试调用android API播放声音时,游戏将崩溃。

问题链接到When an unity game on android is not focused and tries to call android api to play sound, the game will crash

这是日志:     runtime.cc:495]正在中止线程:     runtime.cc:495]“ Thread-25” prio = 5 tid = 20 Runnable     runtime.cc:495] | group =“” sCount = 0 dsCount = 0标志= 0 obj = 0x12fc0000 self = 0xbb15f400     runtime.cc:495] | sysTid = 16268 nice = 0 cgrp =默认sched = 0/0句柄= 0xba1ee970     runtime.cc:495] |状态= R schedstat =(112336446 19147919 319)utm = 9 stm = 2核心= 2 HZ = 100     runtime.cc:495] |堆栈= 0xba0f0000-0xba0f2000堆栈大小= 1022KB     runtime.cc:495] |持有的互斥锁=“中止锁定”“ mutator锁定”(共享持有)     runtime.cc:495]本机:#00 pc 002c6aa3 /system/lib/libart.so(_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv + 130)     runtime.cc:495]本机:#01 pc 00359273 /system/lib/libart.so(_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMapb + 202)     runtime.cc:495]本机:#02 pc 00355757 /system/lib/libart.so(_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMapb + 34)     runtime.cc:495]本机:#03 pc 00346015 /system/lib/libart.so(_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE + 28)     runtime.cc:495]本机:#04 pc 00345df7 /system/lib/libart.so(_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE + 346)     runtime.cc:495]本机:#05 pc 0033a7b7 /system/lib/libart.so(_ZN3art7Runtime5AbortEPKc + 110)     runtime.cc:495]本机:#06 pc 0033aeb3 /system/lib/libart.so(_ZN3art7Runtime7AborterEPKc + 10)     runtime.cc:495]本机:#07 pc 003f3419 /system/lib/libart.so(_ZN7android4base10LogMessageD1Ev + 456)     runtime.cc:495]本机:#08 pc 001c8283 /system/lib/libart.so(_ZN3art22IndirectReferenceTable17AbortIfNoCheckJNIERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 166)     runtime.cc:495]本机:#09 pc 00234e5f /system/lib/libart.so(_ZNK3art22IndirectReferenceTable10GetCheckedEPv + 266)     runtime.cc:495]本机:#10 pc 0035d6a1 /system/lib/libart.so(_ZNK3art6Thread13DecodeJObjectEP8_jobject + 48)     runtime.cc:495]本机:#11 pc 003358af /system/lib/libart.so(_ZN3art8ArgArray24BuildArgArrayFromJValuesERKNS_33ScopedObjectAccessAlreadyRunnableENS_6ObjPtrINS_6mirror6ObjectEEEP6jvalue + 150)     runtime.cc:495]本机:#12 pc 00335719 /system/lib/libart.so(_ZN3art17InvokeWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue + 280)     runtime.cc:495]本机:#13 pc 0027e089 /system/lib/libart.so(_ZN3art3JNI23CallStaticObjectMethodAEP7_JNIEnvP7_jclassP10_jmethodIDP6jvalue + 432)     runtime.cc:495]本机:#14 pc 00ccefdc /data/app/com.mafiagame-LqUxljFSSGkjB5kgc_4d3w==/lib/arm/libunity.so(???)     runtime.cc:495]本机:#15 pc 00cd4718 /data/app/com.mafiagame-LqUxljFSSGkjB5kgc_4d3w==/lib/arm/libunity.so(???)     runtime.cc:495]本机:#16 pc 0000c96c(???)     runtime.cc:495](无托管堆栈帧)     runtime.cc:495]转储所有未持有适当锁的线程:线程列表锁     runtime.cc:495]所有线程:     runtime.cc:495] DALVIK线程(25):     runtime.cc:495]“ Thread-25” prio = 5 tid = 20 Runnable     runtime.cc:495] | group =“” sCount = 0 dsCount = 0标志= 0 obj = 0x12fc0000 self = 0xbb15f400     runtime.cc:495] | sysTid = 16268 nice = 0 cgrp =默认sched = 0/0句柄= 0xba1ee970     runtime.cc:495] |状态= R schedstat =(159230196 19147919 319)utm = 11 stm = 4核心= 2 HZ = 100     runtime.cc:495] |堆栈= 0xba0f0000-0xba0f2000堆栈大小= 1022KB     runtime.cc:495] |持有的互斥锁=“中止锁定”“ mutator锁定”(共享持有)     runtime.cc:495]本机:#00 pc 002c6aa3 /system/lib/libart.so(_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv + 130)     runtime.cc:495]本机:#01 pc 00359273 /system/lib/libart.so(_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMapb + 202)     runtime.cc:495]本机:#02 pc 00355757 /system/lib/libart.so(_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMapb + 34)     runtime.cc:495]本机:#03 pc 0036d717 /system/lib/libart.so(_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE + 654)     runtime.cc:495]本机:#04 pc 00367209 /system/lib/libart.so(_ZN3art10ThreadList13RunCheckpointEPNS_7ClosureES2_ + 320)     runtime.cc:495]本机:#05 pc 00366bef /system/lib/libart.so(_ZN3art10ThreadList4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEb + 158)     runtime.cc:495]本机:#06 pc 00345e01 /system/lib/libart.so(_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE + 356)     runtime.cc:495]本机:#07 pc 0033a7b7 /system/lib/libart.so(_ZN3art7Runtime5AbortEPKc + 110)     runtime.cc:495]本机:#08 pc 0033aeb3 /system/lib/libart.so(_ZN3art7Runtime7AborterEPKc + 10)     runtime.cc:495]本机:#09 pc 003f3419 /system/lib/libart.so(_ZN7android4base10LogMessageD1Ev + 456)     runtime.cc:495]本机:#10 pc 001c8283 /system/lib/libart.so(_ZN3art22IndirectReferenceTable17AbortIfNoCheckJNIERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 166)     runtime.cc:495]本机:#11 pc 00234e5f /system/lib/libart.so(_ZNK3art22IndirectReferenceTable10GetCheckedEPv + 266)     runtime.cc:495]本机:#12 pc 0035d6a1 /system/lib/libart.so(_ZNK3art6Thread13DecodeJObjectEP8_jobject + 48)     runtime.cc:495]本机:#13 pc 003358af /system/lib/libart.so(_ZN3art8ArgArray24BuildArgArrayFromJValuesERKNS_33ScopedObjectAccessAlreadyRunnableENS_6ObjPtrINS_6mirror6ObjectEEEP6jvalue + 150)     runtime.cc:495]本机:#14 pc 00335719 /system/lib/libart.so(_ZN3art17InvokeWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue + 280)     runtime.cc:495]本机:#15 pc 0027e089 /system/lib/libart.so(_ZN3art3JNI23CallStaticObjectMethodAEP7_JNIEnvP7_jclassP10_jmethodIDP6jvalue + 432)     runtime.cc:495]本机:#16 pc 00ccefdc /data/app/com.mafiagame-LqUxljFSSGkjB5kgc_4d3w==/lib/arm/libunity.so(???)     runtime.cc:495]本机:#17 pc 00cd4718 /data/app/com.mafiagame-LqUxljFSSGkjB5kgc_4d3w==/lib/arm/libunity.so(???)     runtime.cc:495]本机:#18 pc 0000c96c(???)     runtime.cc:495](无托管堆栈帧)     runtime.cc:495]     runtime.cc:495]“ main” prio = 5 tid = 1本机     runtime.cc:495] | group =“” sCount = 1 dsCount = 0标志= 1 obj = 0x73ab5560 self = 0xec34b000     runtime.cc:495] | sysTid = 16148 nice = 0 cgrp =默认sched = 0/0句柄= 0xf06494a8     runtime.cc:495] |状态= S schedstat =(653097919 85141133 747)utm = 50 stm = 15核心= 2 HZ = 100     runtime.cc:495] | stack = 0xff50f000-0xff511000 stackSize = 8MB     runtime.cc:495] |保持互斥锁=

0 个答案:

没有答案