谁能帮我从Log里找找程序崩溃时的原因

wangdong20 加州州立大学北岭分校 2013-02-07 07:27:05
我照着一个项目敲的代码,总算敲完了,一运行直接崩溃
输出的Log如下:

02-07 18:47:12.570: I/ApplicationPackageManager(16173): cscCountry is not German : CHN
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 1
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 2
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 3
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 4
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 5
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 6
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 0
02-07 18:47:12.710: E/SensorManager(16173): registerListener :: handle = 1 name= BMA222 Acceleration Sensor delay= 20000 Listener= org.example.androidgames.framework.impl.AccelerometerHandler@40521f28
02-07 18:47:12.750: E/SensorManager(16173): =======>>>Sensor Thread RUNNING <<<========
02-07 18:47:12.750: E/SensorManager(16173): reg :: handle = 1
02-07 18:47:41.281: D/PhoneWindow(16173): couldn't save which view has focus because the focused view org.example.androidgames.framework.impl.AndroidFastRenderView@4051f5e0 has no id.
02-07 18:47:41.289: D/AndroidRuntime(16173): Shutting down VM
02-07 18:47:41.289: W/dalvikvm(16173): threadid=1: thread exiting with uncaught exception (group=0x40018578)
02-07 18:47:41.289: E/AndroidRuntime(16173): FATAL EXCEPTION: main
02-07 18:47:41.289: E/AndroidRuntime(16173): java.lang.RuntimeException: Unable to pause activity {org.example.ch06_mrnom/org.example.androidgames.mrnom.MrNomGame}: java.lang.RuntimeException: WakeLock under-locked GLGame
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2358)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2315)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2295)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.app.ActivityThread.access$1700(ActivityThread.java:117)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.os.Looper.loop(Looper.java:130)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.app.ActivityThread.main(ActivityThread.java:3687)
02-07 18:47:41.289: E/AndroidRuntime(16173): at java.lang.reflect.Method.invokeNative(Native Method)
02-07 18:47:41.289: E/AndroidRuntime(16173): at java.lang.reflect.Method.invoke(Method.java:507)
02-07 18:47:41.289: E/AndroidRuntime(16173): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
02-07 18:47:41.289: E/AndroidRuntime(16173): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
02-07 18:47:41.289: E/AndroidRuntime(16173): at dalvik.system.NativeStart.main(Native Method)
02-07 18:47:41.289: E/AndroidRuntime(16173): Caused by: java.lang.RuntimeException: WakeLock under-locked GLGame
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.os.PowerManager$WakeLock.release(PowerManager.java:307)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.os.PowerManager$WakeLock.release(PowerManager.java:282)
02-07 18:47:41.289: E/AndroidRuntime(16173): at org.example.androidgames.framework.impl.AndroidGame.onPause(AndroidGame.java:67)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.app.Activity.performPause(Activity.java:3851)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1191)
02-07 18:47:41.289: E/AndroidRuntime(16173): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2345)
02-07 18:47:41.289: E/AndroidRuntime(16173): ... 12 more

一开始程序卡住时,
报的Log是

02-07 18:47:12.570: I/ApplicationPackageManager(16173): cscCountry is not German : CHN
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 1
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 2
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 3
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 4
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 5
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 6
02-07 18:47:12.710: D/SensorManager(16173): ====>>>>>Num Sensor: 0
02-07 18:47:12.710: E/SensorManager(16173): registerListener :: handle = 1 name= BMA222 Acceleration Sensor delay= 20000 Listener= org.example.androidgames.framework.impl.AccelerometerHandler@40521f28
02-07 18:47:12.750: E/SensorManager(16173): =======>>>Sensor Thread RUNNING <<<========
02-07 18:47:12.750: E/SensorManager(16173): reg :: handle = 1
...全文
1078 5 点赞 打赏 收藏 举报
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
UphieElis 2014-08-20
引用 3 楼 wangdong20 的回复:
谢谢两位的回答,我找到原因了,就是WakeLock的问题
到底是哪里出问题了?能说的详细点吗,我也遇到了相似的问题
  • 打赏
  • 举报
回复
hljstardust2012 2013-10-24
找到原因不说一下原因吗
  • 打赏
  • 举报
回复
wangdong20 2013-02-08
谢谢两位的回答,我找到原因了,就是WakeLock的问题
  • 打赏
  • 举报
回复
csdn_2013 2013-02-08
引用 楼主 wangdong20 的回复:
我照着一个项目敲的代码,总算敲完了,一运行直接崩溃 输出的Log如下: Plain Text code ? 1234567891011121314151617181920212223242526272829303132333435363738 02-07 18:47:12.570: I/ApplicationPackageManager(16173): cscCo……
释放WakeLock的时候,应当先判别当前WakeLock是否等于null值,再来处理WakeLock
  • 打赏
  • 举报
回复
bluewanderer 2013-02-08
释放WakeLock的时候WakeLock已经释放了,带timeout的WakeLock释放的时候可能最好try一下。
  • 打赏
  • 举报
回复
相关推荐
发帖
Android
加入

7.9w+

社区成员

移动平台 Android
申请成为版主
帖子事件
创建了帖子
2013-02-07 07:27
社区公告
暂无公告