android - App force closing when turning screen off -
i can't figure out why app forceclosing when turn off screen, logcat app has scrolling text, displays widgets, gets user location, has pager, gets current time, gets battery level, code pretty long i'll post logcat, maybe can figure out if need pieces of code let me know
04-09 02:57:56.498: d/evolution launcher(16574): stopping 04-09 02:57:56.623: w/iinputconnectionwrapper(16574): getextractedtext on inactive inputconnection 04-09 02:57:56.639: w/iinputconnectionwrapper(16574): gettextbeforecursor on inactive inputconnection 04-09 02:57:56.655: w/iinputconnectionwrapper(16574): getselectedtext on inactive inputconnection 04-09 02:57:56.662: w/iinputconnectionwrapper(16574): gettextaftercursor on inactive inputconnection 04-09 02:57:56.670: w/iinputconnectionwrapper(16574): getextractedtext on inactive inputconnection 04-09 02:57:56.670: w/iinputconnectionwrapper(16574): gettextbeforecursor on inactive inputconnection 04-09 02:57:56.850: d/dalvikvm(16574): gc_explicit freed 1120k, 6% free 20548k/21696k, paused 3ms+13ms, total 140ms 04-09 02:57:56.959: w/iinputconnectionwrapper(16574): getextractedtext on inactive inputconnection 04-09 02:57:57.053: w/resourcetype(16574): failure getting entry 0x7f030004 (t=2 e=4) in package 0 (error -75) 04-09 02:57:57.053: d/androidruntime(16574): shutting down vm 04-09 02:57:57.053: w/dalvikvm(16574): threadid=1: thread exiting uncaught exception (group=0x41356930) 04-09 02:57:57.069: e/androidruntime(16574): fatal exception: main 04-09 02:57:57.069: e/androidruntime(16574): java.lang.runtimeexception: unable start activity componentinfo{com.doublep.evolution/com.doublep.evolution.launcheractivity}: android.content.res.resources$notfoundexception: resource id #0x7f030004 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.activitythread.performlaunchactivity(activitythread.java:2180) 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.activitythread.handlelaunchactivity(activitythread.java:2230) 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.activitythread.handlerelaunchactivity(activitythread.java:3692) 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.activitythread.access$700(activitythread.java:141) 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.activitythread$h.handlemessage(activitythread.java:1240) 04-09 02:57:57.069: e/androidruntime(16574): @ android.os.handler.dispatchmessage(handler.java:99) 04-09 02:57:57.069: e/androidruntime(16574): @ android.os.looper.loop(looper.java:137) 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.activitythread.main(activitythread.java:5041) 04-09 02:57:57.069: e/androidruntime(16574): @ java.lang.reflect.method.invokenative(native method) 04-09 02:57:57.069: e/androidruntime(16574): @ java.lang.reflect.method.invoke(method.java:511) 04-09 02:57:57.069: e/androidruntime(16574): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:793) 04-09 02:57:57.069: e/androidruntime(16574): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:560) 04-09 02:57:57.069: e/androidruntime(16574): @ dalvik.system.nativestart.main(native method) 04-09 02:57:57.069: e/androidruntime(16574): caused by: android.content.res.resources$notfoundexception: resource id #0x7f030004 04-09 02:57:57.069: e/androidruntime(16574): @ android.content.res.resources.getvalue(resources.java:1014) 04-09 02:57:57.069: e/androidruntime(16574): @ android.content.res.resources.loadxmlresourceparser(resources.java:2139) 04-09 02:57:57.069: e/androidruntime(16574): @ android.content.res.resources.getlayout(resources.java:853) 04-09 02:57:57.069: e/androidruntime(16574): @ android.view.layoutinflater.inflate(layoutinflater.java:394) 04-09 02:57:57.069: e/androidruntime(16574): @ android.view.layoutinflater.inflate(layoutinflater.java:352) 04-09 02:57:57.069: e/androidruntime(16574): @ com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:270) 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.activity.setcontentview(activity.java:1881) 04-09 02:57:57.069: e/androidruntime(16574): @ com.doublep.evolution.launcheractivity.oncreate(launcheractivity.java:455) 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.activity.performcreate(activity.java:5104) 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1080) 04-09 02:57:57.069: e/androidruntime(16574): @ android.app.activitythread.performlaunchactivity(activitythread.java:2144) 04-09 02:57:57.069: e/androidruntime(16574): ... 12 more 04-09 02:57:57.116: i/process(16574): sending signal. pid: 16574 sig: 9
i've changed setcontentview different layout (different file, copied content old one) , gives me different forceclosing
04-09 03:34:25.514: d/dalvikvm(18864): gc_explicit freed 1259k, 6% free 20440k/21728k, paused 2ms+7ms, total 36ms 04-09 03:34:28.553: d/evolution launcher(18864): stopping 04-09 03:34:28.756: w/iinputconnectionwrapper(18864): getextractedtext on inactive inputconnection 04-09 03:34:28.772: w/iinputconnectionwrapper(18864): gettextbeforecursor on inactive inputconnection 04-09 03:34:28.780: w/iinputconnectionwrapper(18864): getselectedtext on inactive inputconnection 04-09 03:34:28.780: w/iinputconnectionwrapper(18864): gettextaftercursor on inactive inputconnection 04-09 03:34:28.780: w/iinputconnectionwrapper(18864): getextractedtext on inactive inputconnection 04-09 03:34:28.787: w/iinputconnectionwrapper(18864): gettextbeforecursor on inactive inputconnection 04-09 03:34:28.795: w/iinputconnectionwrapper(18864): getextractedtext on inactive inputconnection 04-09 03:34:28.795: w/iinputconnectionwrapper(18864): gettextbeforecursor on inactive inputconnection 04-09 03:34:28.803: w/iinputconnectionwrapper(18864): getselectedtext on inactive inputconnection 04-09 03:34:28.803: w/iinputconnectionwrapper(18864): gettextaftercursor on inactive inputconnection 04-09 03:34:28.811: w/iinputconnectionwrapper(18864): getextractedtext on inactive inputconnection 04-09 03:34:28.819: w/iinputconnectionwrapper(18864): gettextbeforecursor on inactive inputconnection 04-09 03:34:28.819: w/iinputconnectionwrapper(18864): getselectedtext on inactive inputconnection 04-09 03:34:28.826: w/iinputconnectionwrapper(18864): gettextaftercursor on inactive inputconnection 04-09 03:34:28.834: w/iinputconnectionwrapper(18864): beginbatchedit on inactive inputconnection 04-09 03:34:28.834: w/iinputconnectionwrapper(18864): endbatchedit on inactive inputconnection 04-09 03:34:28.834: w/iinputconnectionwrapper(18864): getextractedtext on inactive inputconnection 04-09 03:34:28.834: w/iinputconnectionwrapper(18864): gettextbeforecursor on inactive inputconnection 04-09 03:34:28.842: w/iinputconnectionwrapper(18864): getselectedtext on inactive inputconnection 04-09 03:34:28.842: w/iinputconnectionwrapper(18864): gettextaftercursor on inactive inputconnection 04-09 03:34:28.858: w/iinputconnectionwrapper(18864): beginbatchedit on inactive inputconnection 04-09 03:34:28.858: w/iinputconnectionwrapper(18864): endbatchedit on inactive inputconnection 04-09 03:34:29.569: d/dalvikvm(18864): gc_for_alloc freed 1154k, 7% free 21232k/22604k, paused 51ms, total 66ms 04-09 03:34:29.819: d/dalvikvm(18864): gc_for_alloc freed 201k, 7% free 23846k/25416k, paused 25ms, total 25ms 04-09 03:34:30.170: d/dalvikvm(18864): gc_for_alloc freed 3k, 6% free 26556k/28128k, paused 21ms, total 24ms 04-09 03:34:30.420: d/evolution launcher(18864): loading variables 04-09 03:34:30.420: d/evolution launcher(18864): restoring prefs 04-09 03:34:30.420: d/evolution launcher(18864): screen density actions 04-09 03:34:30.467: w/iinputconnectionwrapper(18864): getextractedtext on inactive inputconnection 04-09 03:34:30.475: i/choreographer(18864): skipped 71 frames! application may doing work on main thread. 04-09 03:34:30.631: e/activitythread(18864): activity com.doublep.evolution.launcheractivity has leaked intentreceiver com.doublep.evolution.launcheractivity$4@42858a78 registered here. missing call unregisterreceiver()? 04-09 03:34:30.631: e/activitythread(18864): android.app.intentreceiverleaked: activity com.doublep.evolution.launcheractivity has leaked intentreceiver com.doublep.evolution.launcheractivity$4@42858a78 registered here. missing call unregisterreceiver()? 04-09 03:34:30.631: e/activitythread(18864): @ android.app.loadedapk$receiverdispatcher.<init>(loadedapk.java:795) 04-09 03:34:30.631: e/activitythread(18864): @ android.app.loadedapk.getreceiverdispatcher(loadedapk.java:596) 04-09 03:34:30.631: e/activitythread(18864): @ android.app.contextimpl.registerreceiverinternal(contextimpl.java:1316) 04-09 03:34:30.631: e/activitythread(18864): @ android.app.contextimpl.registerreceiver(contextimpl.java:1296) 04-09 03:34:30.631: e/activitythread(18864): @ android.app.contextimpl.registerreceiver(contextimpl.java:1290) 04-09 03:34:30.631: e/activitythread(18864): @ android.content.contextwrapper.registerreceiver(contextwrapper.java:423) 04-09 03:34:30.631: e/activitythread(18864): @ com.doublep.evolution.launcheractivity.batterylevel(launcheractivity.java:144) 04-09 03:34:30.631: e/activitythread(18864): @ com.doublep.evolution.launcheractivity.access$0(launcheractivity.java:116) 04-09 03:34:30.631: e/activitythread(18864): @ com.doublep.evolution.launcheractivity$1.run(launcheractivity.java:985) 04-09 03:34:30.631: e/activitythread(18864): @ android.os.handler.handlecallback(handler.java:725) 04-09 03:34:30.631: e/activitythread(18864): @ android.os.handler.dispatchmessage(handler.java:92) 04-09 03:34:30.631: e/activitythread(18864): @ android.os.looper.loop(looper.java:137) 04-09 03:34:30.631: e/activitythread(18864): @ android.app.activitythread.main(activitythread.java:5041) 04-09 03:34:30.631: e/activitythread(18864): @ java.lang.reflect.method.invokenative(native method) 04-09 03:34:30.631: e/activitythread(18864): @ java.lang.reflect.method.invoke(method.java:511) 04-09 03:34:30.631: e/activitythread(18864): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:793) 04-09 03:34:30.631: e/activitythread(18864): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:560) 04-09 03:34:30.631: e/activitythread(18864): @ dalvik.system.nativestart.main(native method) 04-09 03:34:30.701: w/iinputconnectionwrapper(18864): gettextbeforecursor on inactive inputconnection 04-09 03:34:30.701: d/androidruntime(18864): shutting down vm 04-09 03:34:30.701: w/dalvikvm(18864): threadid=1: thread exiting uncaught exception (group=0x41356930) 04-09 03:34:30.709: e/androidruntime(18864): fatal exception: main 04-09 03:34:30.709: e/androidruntime(18864): java.lang.runtimeexception: error receiving broadcast intent { act=android.intent.action.battery_changed flg=0x60000010 (has extras) } in com.doublep.evolution.launcheractivity$4@42858a78 04-09 03:34:30.709: e/androidruntime(18864): @ android.app.loadedapk$receiverdispatcher$args.run(loadedapk.java:768) 04-09 03:34:30.709: e/androidruntime(18864): @ android.os.handler.handlecallback(handler.java:725) 04-09 03:34:30.709: e/androidruntime(18864): @ android.os.handler.dispatchmessage(handler.java:92) 04-09 03:34:30.709: e/androidruntime(18864): @ android.os.looper.loop(looper.java:137) 04-09 03:34:30.709: e/androidruntime(18864): @ android.app.activitythread.main(activitythread.java:5041) 04-09 03:34:30.709: e/androidruntime(18864): @ java.lang.reflect.method.invokenative(native method) 04-09 03:34:30.709: e/androidruntime(18864): @ java.lang.reflect.method.invoke(method.java:511) 04-09 03:34:30.709: e/androidruntime(18864): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:793) 04-09 03:34:30.709: e/androidruntime(18864): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:560) 04-09 03:34:30.709: e/androidruntime(18864): @ dalvik.system.nativestart.main(native method) 04-09 03:34:30.709: e/androidruntime(18864): caused by: java.lang.illegalargumentexception: receiver not registered: com.doublep.evolution.launcheractivity$4@42858a78 04-09 03:34:30.709: e/androidruntime(18864): @ android.app.loadedapk.forgetreceiverdispatcher(loadedapk.java:657) 04-09 03:34:30.709: e/androidruntime(18864): @ android.app.contextimpl.unregisterreceiver(contextimpl.java:1339) 04-09 03:34:30.709: e/androidruntime(18864): @ android.content.contextwrapper.unregisterreceiver(contextwrapper.java:445) 04-09 03:34:30.709: e/androidruntime(18864): @ com.doublep.evolution.launcheractivity$4.onreceive(launcheractivity.java:121) 04-09 03:34:30.709: e/androidruntime(18864): @ android.app.loadedapk$receiverdispatcher$args.run(loadedapk.java:758) 04-09 03:34:30.709: e/androidruntime(18864): ... 9 more 04-09 03:34:30.741: i/process(18864): sending signal. pid: 18864 sig: 9
where see log "stopping" it's when turn off screen, see "loading variables" it's in oncreate, mean time it's restarting crashes anyways
update: app runs in landscape mode, main layout inside land-layout only, apparently first logcat when have landscape, second 1 when have inside portrait layout
update 2 0x7f030004 layout called numpad.xml not used, after deleting it, value got reassociated settings.xml, same problem
update 3 i've commented out broadcastreceiver, logcat http://pastebin.com/cxya7bje
update 4 partially solved ok, so, first logcat given me when had layout in landscape, transferring portrait solved first logcat
the second logcat solved commenting out broadcastreceiver
this how broadcastreceiver looks
batterylevelreceiver = new broadcastreceiver() { public void onreceive(context context, intent intent) { context.unregisterreceiver(this); int rawlevel = intent.getintextra("level", -1); int scale = intent.getintextra("scale", -1); int level = -1; if (rawlevel >= 0 && scale > 0) { level = (rawlevel * 100) / scale; } if (animtobattery == true) { if (animvalue < level * 1.8) { animvalue = animvalue +2; } else { animtobattery = false; } arcview.value = (float)(animvalue); } else { arcview.value = (float)(level * 1.8); } } }; intentfilter batterylevelfilter = new intentfilter(intent.action_battery_changed); registerreceiver(batterylevelreceiver, batterylevelfilter);
is there wrong it? i'm unregistering in onstop(), don't know context.unregisterreceiver(this);
doing there deleting doesn't solve anything
update 5 after initializing variable
caused by: java.lang.illegalargumentexception: receiver not registered: com.doublep.evolution.launcheractivity$4@42858a78
and java.lang.runtimeexception: error receiving broadcast intent { act=android.intent.action.battery_changed flg=0x60000010 (has extras) }
seem fishy. have registered broadcast receiver if battery levels change?
activity com.doublep.evolution.launcheractivity has leaked intentreceiver com.doublep.evolution.launcheractivity$4@42858a78 registered here. missing call unregisterreceiver()?
i'm leaning more , more towards fact there's problem broadcastreceiver.
first logcat
judging logcat again, see there's resource not found exception - caused by: android.content.res.resources$notfoundexception: resource id #0x7f030004
check r.java
file points #0x7f030004
, see if resource exists.
second logcat
caused by: java.lang.illegalargumentexception: receiver not registered: com.doublep.evolution.launcheractivity$4@42858a78
check if you've registered receiver in launcheractivity.
update
try making intentfilter batterylevelfilter
global , initializing batterylevel
. i'm assuming due scope of resolution android doesn't recognize receiver.
Comments
Post a Comment