[TIMOB-6762] Android: Platform Data crashes when pressing BACK
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-23T16:58:48.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | Sprint 2011-51, Release 2.0.0, Release 1.8.1 |
Components | Android |
Labels | n/a |
Reporter | Ping Wang |
Assignee | Ping Wang |
Created | 2011-12-19T14:49:56.000+0000 |
Updated | 2012-01-23T16:58:48.000+0000 |
Description
Steps to reproduce:
1) KS->Platform->Platform Data
2) Click BACK to return to the main menu
3) Check the log and find the crash message:
E/RhinoObject( 4494): (KrollRuntimeThread) [8712,8974] Error: removeListener only takes instances of Function (/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js#201)
E/RhinoObject( 4494): org.mozilla.javascript.JavaScriptException: Error: removeListener only takes instances of Function (/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js#201)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events._c_anonymous_8(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js:200)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events.call(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js)
E/RhinoObject( 4494): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
E/RhinoObject( 4494): at script(examples/platform.js:14)
E/RhinoObject( 4494): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/RhinoObject( 4494): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/RhinoObject( 4494): at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.window._c_anonymous_30(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/window.js:434)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.window.call(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/window.js)
E/RhinoObject( 4494): at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2520)
E/RhinoObject( 4494): at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
E/RhinoObject( 4494): at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
E/RhinoObject( 4494): at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events._c_anonymous_2(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js:42)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events.call(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js)
E/RhinoObject( 4494): at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events._c_anonymous_3(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js:85)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events.call(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js)
E/RhinoObject( 4494): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/RhinoObject( 4494): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events.call(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.RhinoObject.fireEvent(RhinoObject.java:73)
E/RhinoObject( 4494): at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:441)
E/RhinoObject( 4494): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:608)
E/RhinoObject( 4494): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:340)
E/RhinoObject( 4494): at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:109)
E/RhinoObject( 4494): at ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:94)
E/RhinoObject( 4494): at android.os.Handler.dispatchMessage(Handler.java:95)
E/RhinoObject( 4494): at android.os.Looper.loop(Looper.java:132)
E/RhinoObject( 4494): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:102)
E/TiJSError( 4494): (main) [45,9019] ----- Titanium Javascript Runtime Error -----
E/TiJSError( 4494): (main) [1,9020] - In /var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js:201,0
E/TiJSError( 4494): (main) [0,9020] - Message: Error: removeListener only takes instances of Function (/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js#201)
E/TiJSError( 4494): (main) [0,9020] - Source: null
4) Click "Platform Data" again.
5) Click BACK to return to the main menu
6) Check the log and find the crash message:
E/RhinoObject( 4494): (KrollRuntimeThread) [53310,770586] Receiver not registered: ti.modules.titanium.platform.PlatformModule$1@40bfddd8
E/RhinoObject( 4494): java.lang.IllegalArgumentException: Receiver not registered: ti.modules.titanium.platform.PlatformModule$1@40bfddd8
E/RhinoObject( 4494): at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:619)
E/RhinoObject( 4494): at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1022)
E/RhinoObject( 4494): at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:354)
E/RhinoObject( 4494): at ti.modules.titanium.platform.PlatformModule.unregisterBatteryStateReceiver(PlatformModule.java:228)
E/RhinoObject( 4494): at ti.modules.titanium.platform.PlatformModule.setBatteryMonitoring(PlatformModule.java:179)
E/RhinoObject( 4494): at ti.modules.titanium.platform.PlatformModulePrototype.setter_batteryMonitoring(PlatformModulePrototype.java:793)
E/RhinoObject( 4494): at ti.modules.titanium.platform.PlatformModulePrototype.setInstanceIdValue(PlatformModulePrototype.java:1450)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.EventEmitter.put(EventEmitter.java:132)
E/RhinoObject( 4494): at org.mozilla.javascript.ScriptableObject.putProperty(ScriptableObject.java:2236)
E/RhinoObject( 4494): at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1643)
E/RhinoObject( 4494): at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1633)
E/RhinoObject( 4494): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1407)
E/RhinoObject( 4494): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/RhinoObject( 4494): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/RhinoObject( 4494): at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.window._c_anonymous_30(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/window.js:434)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.window.call(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/window.js)
E/RhinoObject( 4494): at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2520)
E/RhinoObject( 4494): at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
E/RhinoObject( 4494): at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
E/RhinoObject( 4494): at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events._c_anonymous_2(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js:42)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events.call(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js)
E/RhinoObject( 4494): at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events._c_anonymous_3(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js:85)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events.call(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js)
E/RhinoObject( 4494): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/RhinoObject( 4494): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.js.events.call(/var/folders/re/reVrZ+2iFGi2nZcnF8Otj++++TM/-Tmp-/events.js)
E/RhinoObject( 4494): at org.appcelerator.kroll.runtime.rhino.RhinoObject.fireEvent(RhinoObject.java:73)
E/RhinoObject( 4494): at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:441)
E/RhinoObject( 4494): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:608)
E/RhinoObject( 4494): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:340)
E/RhinoObject( 4494): at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:109)
E/RhinoObject( 4494): at ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:94)
E/RhinoObject( 4494): at android.os.Handler.dispatchMessage(Handler.java:95)
E/RhinoObject( 4494): at android.os.Looper.loop(Looper.java:132)
E/RhinoObject( 4494): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:102)
E/TiJSError( 4494): (main) [47,770633] ----- Titanium Javascript Error -----
E/TiJSError( 4494): (main) [0,770633] - In null:0,0
E/TiJSError( 4494): (main) [0,770633] - Message: Receiver not registered: ti.modules.titanium.platform.PlatformModule$1@40bfddd8
E/TiJSError( 4494): (main) [0,770633] - Source: null
Closing bug. Verified fix on: SDK build: 1.9.0.v20120112104633 Runtime: V8, Rhino Titanium Studio, build: 1.0.8.201201111843 Device: Droid 3 (2.3.4)