[TIMOB-3767] Android: Debugger breakpoint conditions with failures should report an error in the debugger console, but still break
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Won't Fix |
| Resolution Date | 2017-07-31T20:52:08.000+0000 |
| Affected Version/s | Release 1.7.0 |
| Fix Version/s | n/a |
| Components | Android |
| Labels | merge-1.8.1, parity |
| Reporter | Marshall Culpepper |
| Assignee | Eric Merriman |
| Created | 2011-04-27T13:14:13.000+0000 |
| Updated | 2017-07-31T20:52:33.000+0000 |
Steps to test: - Right click on an enabled breakpoint in a debugged app, go to Properties - Enable the Breakpoint Condition, enter an invalid expression - The next time that code runs, a failure should show in the Console, but the breakpoint should still break
Using
with the breakpoint set on thefor (var i = 0; i < 10; i++) { Ti.API.debug("Hello: " + i); }Ti.API.debugstatement and the conditional set toi ==. I get the following crash.D/TiFileFactory( 669): (main) [174,1299] getting initial from parts: app://app.js D/TiLaunchActivity( 669): (main) [2,1301] Eval JS Activity:file:///android_asset/Resources/app.js D/TiFileFactory( 669): (kroll$1: app://app.js) [4,1305] getting initial from parts: file:///android_asset/Resources/app.js D/TiDebugClient( 669): (kroll$1: app://app.js) [1,1306] debugger evalFile: file:///android_asset/Resources/app.js D/TiDebugSession( 669): (kroll$1: app://app.js) [1,1307] write packet: 40*threads*created*9*kroll$1: [app:/app.js] D/TiDebugSession( 669): (kroll$1: app://app.js) [6,1313] write packet: 46*scripts*created*9|app:/app.js|app:/app.js|1|18 E/TiJSError( 669): (kroll$1: app://app.js) [228,1541] ----- Titanium Javascript Error ----- E/TiJSError( 669): (kroll$1: app://app.js) [2,1543] - In <expr>:1,5 E/TiJSError( 669): (kroll$1: app://app.js) [1,1544] - Message: Unexpected end of file E/TiJSError( 669): (kroll$1: app://app.js) [0,1544] - Source: i == E/TiJSError( 669): (kroll$1: app://app.js) [185,1729] ----- Titanium Javascript Runtime Error ----- E/TiJSError( 669): (kroll$1: app://app.js) [1,1730] - In <expr>:1,0 E/TiJSError( 669): (kroll$1: app://app.js) [2,1732] - Message: Compilation produced 1 syntax errors. E/TiJSError( 669): (kroll$1: app://app.js) [1,1733] - Source: null I/System.out( 669): onExceptionThrown, cx:org.mozilla.javascript.Context@44c4d6e0, exception:java.lang.NullPointerException D/TiDebugSession( 669): (kroll$1: app://app.js) [51,1784] write packet: 20*log*err*[ERROR] null D/TiDebugSession( 669): (kroll$1: app://app.js) [2,1786] write packet: 36*suspended*9*exception*app:/app.js*16 D/TiDebugSession( 669): (Thread-11) [13,1799] rcvd request: 22*1305478837459*frames*9 D/FramesHandler( 669): Frame 0 scope: [object Object] D/TiDebugSession( 669): (Thread-11) [6,1805] write packet: 62*1305478837459*0|||app:/app.js|16|false|1305478838301|333894860 W/ActivityManager( 53): Launch timeout has expired, giving up wake lock! W/ActivityManager( 53): Activity idle timeout for HistoryRecord{44d2e878 net.donthorp.adhoc/.AdhocActivity} D/TiDebugSession( 669): (Thread-11) [7531,9336] rcvd request: 9**resume*9 D/TiDebugSession( 669): (Thread-11) [13,9352] write packet: 16*resumed*9*resume E/KrollContext( 669): (kroll$1: app://app.js) [3,9339] Error: null E/KrollContext( 669): java.lang.NullPointerException E/KrollContext( 669): at org.mozilla.javascript.Parser.parse(Parser.java:597) E/KrollContext( 669): at org.mozilla.javascript.Parser.parse(Parser.java:506) E/KrollContext( 669): at org.mozilla.javascript.Context.compileImpl(Context.java:2401) E/KrollContext( 669): at org.mozilla.javascript.Context.compileString(Context.java:1367) E/KrollContext( 669): at org.mozilla.javascript.Context.compileString(Context.java:1356) E/KrollContext( 669): at org.mozilla.javascript.tools.debugger.Dim$Condition.shouldBreak(Dim.java:1454) E/KrollContext( 669): at org.mozilla.javascript.tools.debugger.Dim$StackFrame.onLineChange(Dim.java:1293) E/KrollContext( 669): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2127) E/KrollContext( 669): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollContext( 669): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollContext( 669): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollContext( 669): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollContext( 669): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollContext( 669): at org.mozilla.javascript.Context.evaluateString(Context.java:1111) E/KrollContext( 669): at org.mozilla.javascript.tools.debugger.Dim$DimIProxy.run(Dim.java:1039) E/KrollContext( 669): at org.mozilla.javascript.Context.call(Context.java:521) E/KrollContext( 669): at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:535) E/KrollContext( 669): at org.mozilla.javascript.tools.debugger.Dim$DimIProxy.withContext(Dim.java:1078) E/KrollContext( 669): at org.mozilla.javascript.tools.debugger.Dim$DimIProxy.access$3(Dim.java:1077) E/KrollContext( 669): at org.mozilla.javascript.tools.debugger.Dim.evalScript(Dim.java:677) E/KrollContext( 669): at ti.modules.titanium.debug.g.evaluateFile(Unknown Source) E/KrollContext( 669): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollContext( 669): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollContext( 669): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollContext( 669): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollContext( 669): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollContext( 669): at android.os.Looper.loop(Looper.java:123) E/KrollContext( 669): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) W/dalvikvm( 669): threadid=17: thread exiting with uncaught exception (group=0x4001b188) E/TiUncaughtHandler( 669): (kroll$1: app://app.js) [51,9403] Sending event: exception on thread: kroll$1: app://app.js msg:org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException; Titanium 1.7.0,2011/05/14 13:16,6afca8 E/TiUncaughtHandler( 669): org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException E/TiUncaughtHandler( 669): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/TiUncaughtHandler( 669): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.handleException(KrollContext.java:148) E/TiUncaughtHandler( 669): at ti.modules.titanium.debug.g.handleException(Unknown Source) E/TiUncaughtHandler( 669): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:325) E/TiUncaughtHandler( 669): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/TiUncaughtHandler( 669): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/TiUncaughtHandler( 669): at android.os.Handler.dispatchMessage(Handler.java:95) E/TiUncaughtHandler( 669): at android.os.Looper.loop(Looper.java:123) E/TiUncaughtHandler( 669): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/TiUncaughtHandler( 669): Caused by: java.lang.NullPointerException E/TiUncaughtHandler( 669): at org.mozilla.javascript.Parser.parse(Parser.java:597) E/TiUncaughtHandler( 669): at org.mozilla.javascript.Parser.parse(Parser.java:506) E/TiUncaughtHandler( 669): at org.mozilla.javascript.Context.compileImpl(Context.java:2401) E/TiUncaughtHandler( 669): at org.mozilla.javascript.Context.compileString(Context.java:1367) E/TiUncaughtHandler( 669): at org.mozilla.javascript.Context.compileString(Context.java:1356) E/TiUncaughtHandler( 669): at org.mozilla.javascript.tools.debugger.Dim$Condition.shouldBreak(Dim.java:1454) E/TiUncaughtHandler( 669): at org.mozilla.javascript.tools.debugger.Dim$StackFrame.onLineChange(Dim.java:1293) E/TiUncaughtHandler( 669): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2127) E/TiUncaughtHandler( 669): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/TiUncaughtHandler( 669): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/TiUncaughtHandler( 669): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/TiUncaughtHandler( 669): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/TiUncaughtHandler( 669): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/TiUncaughtHandler( 669): at org.mozilla.javascript.Context.evaluateString(Context.java:1111) E/TiUncaughtHandler( 669): at org.mozilla.javascript.tools.debugger.Dim$DimIProxy.run(Dim.java:1039) E/TiUncaughtHandler( 669): at org.mozilla.javascript.Context.call(Context.java:521) E/TiUncaughtHandler( 669): at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:535) E/TiUncaughtHandler( 669): at org.mozilla.javascript.tools.debugger.Dim$DimIProxy.withContext(Dim.java:1078) E/TiUncaughtHandler( 669): at org.mozilla.javascript.tools.debugger.Dim$DimIProxy.access$3(Dim.java:1077) E/TiUncaughtHandler( 669): at org.mozilla.javascript.tools.debugger.Dim.evalScript(Dim.java:677) E/TiUncaughtHandler( 669): at ti.modules.titanium.debug.g.evaluateFile(Unknown Source) E/TiUncaughtHandler( 669): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/TiUncaughtHandler( 669): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/TiUncaughtHandler( 669): ... 5 more E/AndroidRuntime( 669): Uncaught handler: thread kroll$1: app://app.js exiting due to uncaught exception D/dalvikvm( 669): GC freed 5691 objects / 463080 bytes in 76ms E/AndroidRuntime( 669): org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException E/AndroidRuntime( 669): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/AndroidRuntime( 669): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.handleException(KrollContext.java:148) E/AndroidRuntime( 669): at ti.modules.titanium.debug.g.handleException(Unknown Source) E/AndroidRuntime( 669): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:325) E/AndroidRuntime( 669): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/AndroidRuntime( 669): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/AndroidRuntime( 669): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 669): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 669): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/AndroidRuntime( 669): Caused by: java.lang.NullPointerException E/AndroidRuntime( 669): at org.mozilla.javascript.Parser.parse(Parser.java:597) E/AndroidRuntime( 669): at org.mozilla.javascript.Parser.parse(Parser.java:506) E/AndroidRuntime( 669): at org.mozilla.javascript.Context.compileImpl(Context.java:2401) E/AndroidRuntime( 669): at org.mozilla.javascript.Context.compileString(Context.java:1367) E/AndroidRuntime( 669): at org.mozilla.javascript.Context.compileString(Context.java:1356) E/AndroidRuntime( 669): at org.mozilla.javascript.tools.debugger.Dim$Condition.shouldBreak(Dim.java:1454) E/AndroidRuntime( 669): at org.mozilla.javascript.tools.debugger.Dim$StackFrame.onLineChange(Dim.java:1293) E/AndroidRuntime( 669): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2127) E/AndroidRuntime( 669): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/AndroidRuntime( 669): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/AndroidRuntime( 669): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/AndroidRuntime( 669): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/AndroidRuntime( 669): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/AndroidRuntime( 669): at org.mozilla.javascript.Context.evaluateString(Context.java:1111) E/AndroidRuntime( 669): at org.mozilla.javascript.tools.debugger.Dim$DimIProxy.run(Dim.java:1039) E/AndroidRuntime( 669): at org.mozilla.javascript.Context.call(Context.java:521) E/AndroidRuntime( 669): at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:535) E/AndroidRuntime( 669): at org.mozilla.javascript.tools.debugger.Dim$DimIProxy.withContext(Dim.java:1078) E/AndroidRuntime( 669): at org.mozilla.javascript.tools.debugger.Dim$DimIProxy.access$3(Dim.java:1077) E/AndroidRuntime( 669): at org.mozilla.javascript.tools.debugger.Dim.evalScript(Dim.java:677) E/AndroidRuntime( 669): at ti.modules.titanium.debug.g.evaluateFile(Unknown Source) E/AndroidRuntime( 669): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/AndroidRuntime( 669): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/AndroidRuntime( 669): ... 5 more I/Process ( 53): Sending signal. PID: 669 SIG: 3This was stuck in TBS. Moved to sprint 25.
This appears to have already been fixed. I've re-tested Don's test case and the breakpoint error is correctly reported to the app's console in TiStudio, while the breakpoint itself seems to work fine.
Tested with 1.8.0.v20110909152148 on Win 7 Linux 10.04 Mac OS X 10.6.8 ported test to Debugger test plan
Standardizing summary and labels.
moving sprint so it can be verified and closed if need be. was this resolved with 1.8.0?
TiApp crashes on build 1.8.0.1 running Rhino on Windows 7 and XP:
I do not get the NullPointerException when compared to Don's crash. But, when running the same for loop code on V8 (1.8.0.1, Windows 7 and XP), TiApp does not crash. It loops through and prints out the count.Tested with 1.8.0.1 on Mac 10.6.8, Linux 10.04 and Window 7 and XP. Rhino is working as expected, but V8 does not stop at the breakpoint, may be related to TIMOB-4162, leaving open until we can confirm that it is working on V8
Closing due to inactivity. If this issue still exists, please raise a new ticket.