{ "id": "82553", "key": "TIMOB-6133", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-05T17:03:04.000+0000", "created": "2011-11-08T16:11:42.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "branch-v8", "module_titanium", "qe-testadded" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43:16.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "+Expected Behavior+\r\nWhen JavaScript code calls a Java proxy method and a Java exception gets thrown\r\nit should be converted to a JavaScript exception.\r\n\r\n+Actual Behavior+\r\nThe application crashes due to the Java exception not being handled correctly.\r\n\r\n+Test case+\r\n{code}\r\nvar buffer = Ti.createBuffer();\r\nbuffer.append() // illegal call, missing required arguments.\r\n{code}\r\n\r\n+Log+\r\nV8:\r\n{quote}\r\nW/System.err( 335): java.lang.ArrayIndexOutOfBoundsException\r\nW/System.err( 335): \tat ti.modules.titanium.BufferProxy.append(BufferProxy.java:202)\r\nW/System.err( 335): \tat org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)\r\nW/System.err( 335): \tat org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(Unknown Source)\r\nW/System.err( 335): \tat org.appcelerator.kroll.KrollRuntime.handleMessage(Unknown Source)\r\nW/System.err( 335): \tat org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(Unknown Source)\r\nW/System.err( 335): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nW/System.err( 335): \tat android.os.Looper.loop(Looper.java:123)\r\nW/System.err( 335): \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(Unknown Source)\r\nW/dalvikvm( 335): JNI WARNING: JNI method called with exception raised\r\nW/dalvikvm( 335): in Lorg/appcelerator/kroll/runtime/v8/V8Runtime;.nativeRunModule (Ljava/lang/String;Ljava/lang/String;Lorg/appcelerator/kroll/KrollProxySupport;)V (CallObjectMethodV)\r\nW/dalvikvm( 335): Pending exception is:\r\nI/dalvikvm( 335): Ljava/lang/ArrayIndexOutOfBoundsException;:\r\nI/dalvikvm( 335): (no stack trace data found)\r\nI/dalvikvm( 335): \"KrollRuntimeThread\" prio=5 tid=7 NATIVE\r\nI/dalvikvm( 335): | group=\"main\" sCount=0 dsCount=0 s=N obj=0x43e4a328 self=0x11d230\r\nI/dalvikvm( 335): | sysTid=342 nice=0 sched=0/0 cgrp=default handle=2339192\r\nI/dalvikvm( 335): | schedstat=( 1525760156 223823015 90 )\r\nI/dalvikvm( 335): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)\r\nI/dalvikvm( 335): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule((null):-1)\r\nI/dalvikvm( 335): at org.appcelerator.kroll.KrollRuntime.handleMessage((null):-1)\r\nI/dalvikvm( 335): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage((null):-1)\r\nI/dalvikvm( 335): at android.os.Handler.dispatchMessage(Handler.java:95)\r\nI/dalvikvm( 335): at android.os.Looper.loop(Looper.java:123)\r\nI/dalvikvm( 335): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run((null):-1)\r\nI/dalvikvm( 335): \r\nE/dalvikvm( 335): VM aborting\r\n{quote}\r\n\r\nRhino:\r\n{quote}\r\nE/ScriptsModule( 6699): Error while executing Resources/app.js: Wrapped java.lang.ArrayIndexOutOfBoundsException: index=0 length=0 (Resources/app.js#2)\r\nE/ScriptsModule( 6699): org.mozilla.javascript.WrappedException: Wrapped java.lang.ArrayIndexOutOfBoundsException: index=0 length=0 (Resources/app.js#2)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)\r\nE/ScriptsModule( 6699): \tat ti.modules.titanium.BufferProxyPrototype.append(BufferProxyPrototype.java:123)\r\nE/ScriptsModule( 6699): \tat ti.modules.titanium.BufferProxyPrototype.execIdCall(BufferProxyPrototype.java:594)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)\r\nE/ScriptsModule( 6699): \tat script(Resources/app.js:2)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:178)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.Context.evaluateString(Context.java:1111)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.runSource(ScriptsModule.java:63)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.access$200(ScriptsModule.java:26)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule$RunInThisContext.call(ScriptsModule.java:123)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_7(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js:134)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_5(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js:80)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_3(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js:48)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)\r\nE/ScriptsModule( 6699): \tat org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.runtime.rhino.RhinoRuntime.doRunModule(RhinoRuntime.java:61)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.KrollRuntime.handleMessage(Unknown Source)\r\nE/ScriptsModule( 6699): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/ScriptsModule( 6699): \tat android.os.Looper.loop(Looper.java:132)\r\nE/ScriptsModule( 6699): \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(Unknown Source)\r\nE/ScriptsModule( 6699): Caused by: java.lang.ArrayIndexOutOfBoundsException: index=0 length=0\r\nE/ScriptsModule( 6699): \tat ti.modules.titanium.BufferProxy.append(BufferProxy.java:202)\r\nE/ScriptsModule( 6699): \tat ti.modules.titanium.BufferProxyPrototype.append(BufferProxyPrototype.java:116)\r\nE/ScriptsModule( 6699): \t... 26 more\r\nW/dalvikvm( 6699): threadid=8: thread exiting with uncaught exception (group=0x4014d760)\r\nD/dalvikvm( 6699): GC_CONCURRENT freed 259K, 5% free 7037K/7367K, paused 2ms+2ms\r\nE/TiApplication( 6699): (KrollRuntimeThread) [251,348] Sending event: exception on thread: KrollRuntimeThread msg:org.mozilla.javascript.WrappedException: Wrapped java.lang.ArrayIndexOutOfBoundsException: index=0 length=0 (Resources/app.js#2); Titanium 1.8.0.1,2011/11/08 12:46,31f6a70\r\nE/TiApplication( 6699): org.mozilla.javascript.WrappedException: Wrapped java.lang.ArrayIndexOutOfBoundsException: index=0 length=0 (Resources/app.js#2)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)\r\nE/TiApplication( 6699): \tat ti.modules.titanium.BufferProxyPrototype.append(BufferProxyPrototype.java:123)\r\nE/TiApplication( 6699): \tat ti.modules.titanium.BufferProxyPrototype.execIdCall(BufferProxyPrototype.java:594)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)\r\nE/TiApplication( 6699): \tat script(Resources/app.js:2)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:178)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.Context.evaluateString(Context.java:1111)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.runSource(ScriptsModule.java:63)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.access$200(ScriptsModule.java:26)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule$RunInThisContext.call(ScriptsModule.java:123)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_7(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js:134)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_5(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js:80)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_3(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js:48)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)\r\nE/TiApplication( 6699): \tat org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.runtime.rhino.RhinoRuntime.doRunModule(RhinoRuntime.java:61)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.KrollRuntime.handleMessage(Unknown Source)\r\nE/TiApplication( 6699): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/TiApplication( 6699): \tat android.os.Looper.loop(Looper.java:132)\r\nE/TiApplication( 6699): \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(Unknown Source)\r\nE/TiApplication( 6699): Caused by: java.lang.ArrayIndexOutOfBoundsException: index=0 length=0\r\nE/TiApplication( 6699): \tat ti.modules.titanium.BufferProxy.append(BufferProxy.java:202)\r\nE/TiApplication( 6699): \tat ti.modules.titanium.BufferProxyPrototype.append(BufferProxyPrototype.java:116)\r\nE/TiApplication( 6699): \t... 26 more\r\nE/AndroidRuntime( 6699): FATAL EXCEPTION: KrollRuntimeThread\r\nE/AndroidRuntime( 6699): org.mozilla.javascript.WrappedException: Wrapped java.lang.ArrayIndexOutOfBoundsException: index=0 length=0 (Resources/app.js#2)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)\r\nE/AndroidRuntime( 6699): \tat ti.modules.titanium.BufferProxyPrototype.append(BufferProxyPrototype.java:123)\r\nE/AndroidRuntime( 6699): \tat ti.modules.titanium.BufferProxyPrototype.execIdCall(BufferProxyPrototype.java:594)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)\r\nE/AndroidRuntime( 6699): \tat script(Resources/app.js:2)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:178)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.Context.evaluateString(Context.java:1111)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.runSource(ScriptsModule.java:63)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.access$200(ScriptsModule.java:26)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule$RunInThisContext.call(ScriptsModule.java:123)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_7(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js:134)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_5(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js:80)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_3(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js:48)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)\r\nE/AndroidRuntime( 6699): \tat org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/_p/q0xcb_090pv85yyxf3hsx2h40000gn/T/module.js)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.runtime.rhino.RhinoRuntime.doRunModule(RhinoRuntime.java:61)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.KrollRuntime.handleMessage(Unknown Source)\r\nE/AndroidRuntime( 6699): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/AndroidRuntime( 6699): \tat android.os.Looper.loop(Looper.java:132)\r\nE/AndroidRuntime( 6699): \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(Unknown Source)\r\nE/AndroidRuntime( 6699): Caused by: java.lang.ArrayIndexOutOfBoundsException: index=0 length=0\r\nE/AndroidRuntime( 6699): \tat ti.modules.titanium.BufferProxy.append(BufferProxy.java:202)\r\nE/AndroidRuntime( 6699): \tat ti.modules.titanium.BufferProxyPrototype.append(BufferProxyPrototype.java:116)\r\nE/AndroidRuntime( 6699): \t... 26 more\r\nW/ActivityManager( 142): Force finishing activity com.joshr.mobilesandbox/.MobilesandboxActivity\r\n{quote}\r\n", "attachment": [], "flagged": false, "summary": "Android: Kroll - Application crashes when a Java exception is thrown", "creator": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Devices: emulator, Xoom\r\nRuntimes: v8 (emulator), rhino (device & emulator)", "comment": { "comments": [ { "id": "173454", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This was resolved early on with Allen's exception dialog pull request", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-20T23:51:44.000+0000", "updated": "2011-11-20T23:51:44.000+0000" }, { "id": "175256", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 1.8.0.1.v20111207090257\r\nXoom (3.2.1) - v8\r\nSamsung Tab 10.1 (3.1) - rhino", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-07T15:40:22.000+0000", "updated": "2011-12-07T15:40:22.000+0000" }, { "id": "178281", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Added label qe-testadded.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-05T17:02:16.000+0000", "updated": "2012-01-05T17:02:16.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }