org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: size < 0 (app://examples/commonjs.js#28)

Appcelerator JIRA | Federico "Lox" Lucignano | 5 years ago
  1. 0

    Another regression for Android (works on iOS), probably related to TIMOB-4802 (Ti.Filesystem issue). [KitchenSink commonjs.js example|https://github.com/appcelerator/KitchenSink/blob/master/Resources/examples/commonjs.js] fails at loading a CommonJS javascript module: {code:javascript} var echo = require('echo'); var result = echo.echo('hello world'); {code} generates: {code} D/KrollContext( 423): (kroll$5: app://examples/commonjs.js) [2315,14044] Running evaluated script: app://examples/commonjs.js D/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [128,14172] Attempting to include native module: echo D/TiFastDev( 423): (kroll$5: app://examples/commonjs.js) [188,14360] sent tokens successfully E/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [3,14363] Error loading module named: echo E/TitaniumModule( 423): java.lang.IllegalArgumentException: size < 0 E/TitaniumModule( 423): at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:65) E/TitaniumModule( 423): at org.appcelerator.titanium.util.TiStreamHelper.toByteArray(TiStreamHelper.java:106) E/TitaniumModule( 423): at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:120) E/TitaniumModule( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/TitaniumModule( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/TitaniumModule( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/TitaniumModule( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/TitaniumModule( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/TitaniumModule( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/TitaniumModule( 423): at android.os.Looper.loop(Looper.java:130) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): (kroll$5: app://examples/commonjs.js) [33,14396] Exception calling kroll method require, invocation: null ] E/KrollMethod( 423): org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: size < 0 (app://examples/commonjs.js#28) E/KrollMethod( 423): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:453) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/KrollMethod( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/KrollMethod( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollMethod( 423): at script(app://examples/commonjs.js:28) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollMethod( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollMethod( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollMethod( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollMethod( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollMethod( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollMethod( 423): at android.os.Looper.loop(Looper.java:130) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): Caused by: java.lang.IllegalArgumentException: size < 0 E/KrollMethod( 423): at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:65) E/KrollMethod( 423): at org.appcelerator.titanium.util.TiStreamHelper.toByteArray(TiStreamHelper.java:106) E/KrollMethod( 423): at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:120) E/KrollMethod( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/KrollMethod( 423): ... 18 more D/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [199,14595] Attempting to include native module: echo E/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [11,14606] Error loading module named: echo E/TitaniumModule( 423): java.lang.NullPointerException E/TitaniumModule( 423): at java.lang.String.<init>(String.java:276) E/TitaniumModule( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/TitaniumModule( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/TitaniumModule( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/TitaniumModule( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/TitaniumModule( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/TitaniumModule( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/TitaniumModule( 423): at android.os.Looper.loop(Looper.java:130) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): (kroll$5: app://examples/commonjs.js) [13,14619] Exception calling kroll method require, invocation: null ] E/KrollMethod( 423): org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (app://examples/commonjs.js#39) E/KrollMethod( 423): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:453) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/KrollMethod( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/KrollMethod( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollMethod( 423): at script(app://examples/commonjs.js:39) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollMethod( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollMethod( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollMethod( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollMethod( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollMethod( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollMethod( 423): at android.os.Looper.loop(Looper.java:130) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): Caused by: java.lang.NullPointerException E/KrollMethod( 423): at java.lang.String.<init>(String.java:276) E/KrollMethod( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/KrollMethod( 423): ... 18 more D/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [85,14704] Attempting to include native module: __bad_module__ E/TiFastDev( 423): (kroll$5: app://examples/commonjs.js) [28,14732] Broken pipe E/TiFastDev( 423): java.net.SocketException: Broken pipe E/TiFastDev( 423): at org.apache.harmony.luni.platform.OSNetworkSystem.write(Native Method) E/TiFastDev( 423): at dalvik.system.BlockGuard$WrappedNetworkSystem.write(BlockGuard.java:284) E/TiFastDev( 423): at org.apache.harmony.luni.net.PlainSocketImpl.write(PlainSocketImpl.java:472) E/TiFastDev( 423): at org.apache.harmony.luni.net.SocketOutputStream.write(SocketOutputStream.java:48) E/TiFastDev( 423): at org.appcelerator.titanium.TiFastDev$Session.sendTokens(TiFastDev.java:430) E/TiFastDev( 423): at org.appcelerator.titanium.TiFastDev.openInputStream(TiFastDev.java:169) E/TiFastDev( 423): at org.appcelerator.titanium.io.TiResourceFile.getInputStream(TiResourceFile.java:61) E/TiFastDev( 423): at org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:157) E/TiFastDev( 423): at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:117) E/TiFastDev( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/TiFastDev( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/TiFastDev( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/TiFastDev( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/TiFastDev( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/TiFastDev( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/TiFastDev( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/TiFastDev( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/TiFastDev( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/TiFastDev( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/TiFastDev( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/TiFastDev( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/TiFastDev( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/TiFastDev( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/TiFastDev( 423): at android.os.Looper.loop(Looper.java:130) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [17,14749] Error loading module named: __bad_module__ E/TitaniumModule( 423): java.lang.NullPointerException E/TitaniumModule( 423): at java.lang.String.<init>(String.java:276) E/TitaniumModule( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/TitaniumModule( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/TitaniumModule( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/TitaniumModule( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/TitaniumModule( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/TitaniumModule( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/TitaniumModule( 423): at android.os.Looper.loop(Looper.java:130) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): (kroll$5: app://examples/commonjs.js) [57,14806] Exception calling kroll method require, invocation: null ] E/KrollMethod( 423): org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (app://examples/commonjs.js#50) E/KrollMethod( 423): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:453) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/KrollMethod( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/KrollMethod( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollMethod( 423): at script(app://examples/commonjs.js:50) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollMethod( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollMethod( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollMethod( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollMethod( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollMethod( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollMethod( 423): at android.os.Looper.loop(Looper.java:130) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): Caused by: java.lang.NullPointerException E/KrollMethod( 423): at java.lang.String.<init>(String.java:276) E/KrollMethod( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/KrollMethod( 423): ... 18 more {code}

    Appcelerator JIRA | 5 years ago | Federico "Lox" Lucignano
    org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: size < 0 (app://examples/commonjs.js#28)
  2. 0

    Another regression for Android (works on iOS), probably related to TIMOB-4802 (Ti.Filesystem issue). [KitchenSink commonjs.js example|https://github.com/appcelerator/KitchenSink/blob/master/Resources/examples/commonjs.js] fails at loading a CommonJS javascript module: {code:javascript} var echo = require('echo'); var result = echo.echo('hello world'); {code} generates: {code} D/KrollContext( 423): (kroll$5: app://examples/commonjs.js) [2315,14044] Running evaluated script: app://examples/commonjs.js D/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [128,14172] Attempting to include native module: echo D/TiFastDev( 423): (kroll$5: app://examples/commonjs.js) [188,14360] sent tokens successfully E/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [3,14363] Error loading module named: echo E/TitaniumModule( 423): java.lang.IllegalArgumentException: size < 0 E/TitaniumModule( 423): at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:65) E/TitaniumModule( 423): at org.appcelerator.titanium.util.TiStreamHelper.toByteArray(TiStreamHelper.java:106) E/TitaniumModule( 423): at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:120) E/TitaniumModule( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/TitaniumModule( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/TitaniumModule( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/TitaniumModule( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/TitaniumModule( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/TitaniumModule( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/TitaniumModule( 423): at android.os.Looper.loop(Looper.java:130) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): (kroll$5: app://examples/commonjs.js) [33,14396] Exception calling kroll method require, invocation: null ] E/KrollMethod( 423): org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: size < 0 (app://examples/commonjs.js#28) E/KrollMethod( 423): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:453) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/KrollMethod( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/KrollMethod( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollMethod( 423): at script(app://examples/commonjs.js:28) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollMethod( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollMethod( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollMethod( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollMethod( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollMethod( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollMethod( 423): at android.os.Looper.loop(Looper.java:130) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): Caused by: java.lang.IllegalArgumentException: size < 0 E/KrollMethod( 423): at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:65) E/KrollMethod( 423): at org.appcelerator.titanium.util.TiStreamHelper.toByteArray(TiStreamHelper.java:106) E/KrollMethod( 423): at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:120) E/KrollMethod( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/KrollMethod( 423): ... 18 more D/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [199,14595] Attempting to include native module: echo E/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [11,14606] Error loading module named: echo E/TitaniumModule( 423): java.lang.NullPointerException E/TitaniumModule( 423): at java.lang.String.<init>(String.java:276) E/TitaniumModule( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/TitaniumModule( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/TitaniumModule( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/TitaniumModule( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/TitaniumModule( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/TitaniumModule( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/TitaniumModule( 423): at android.os.Looper.loop(Looper.java:130) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): (kroll$5: app://examples/commonjs.js) [13,14619] Exception calling kroll method require, invocation: null ] E/KrollMethod( 423): org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (app://examples/commonjs.js#39) E/KrollMethod( 423): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:453) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/KrollMethod( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/KrollMethod( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollMethod( 423): at script(app://examples/commonjs.js:39) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollMethod( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollMethod( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollMethod( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollMethod( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollMethod( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollMethod( 423): at android.os.Looper.loop(Looper.java:130) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): Caused by: java.lang.NullPointerException E/KrollMethod( 423): at java.lang.String.<init>(String.java:276) E/KrollMethod( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/KrollMethod( 423): ... 18 more D/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [85,14704] Attempting to include native module: __bad_module__ E/TiFastDev( 423): (kroll$5: app://examples/commonjs.js) [28,14732] Broken pipe E/TiFastDev( 423): java.net.SocketException: Broken pipe E/TiFastDev( 423): at org.apache.harmony.luni.platform.OSNetworkSystem.write(Native Method) E/TiFastDev( 423): at dalvik.system.BlockGuard$WrappedNetworkSystem.write(BlockGuard.java:284) E/TiFastDev( 423): at org.apache.harmony.luni.net.PlainSocketImpl.write(PlainSocketImpl.java:472) E/TiFastDev( 423): at org.apache.harmony.luni.net.SocketOutputStream.write(SocketOutputStream.java:48) E/TiFastDev( 423): at org.appcelerator.titanium.TiFastDev$Session.sendTokens(TiFastDev.java:430) E/TiFastDev( 423): at org.appcelerator.titanium.TiFastDev.openInputStream(TiFastDev.java:169) E/TiFastDev( 423): at org.appcelerator.titanium.io.TiResourceFile.getInputStream(TiResourceFile.java:61) E/TiFastDev( 423): at org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:157) E/TiFastDev( 423): at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:117) E/TiFastDev( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/TiFastDev( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/TiFastDev( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/TiFastDev( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/TiFastDev( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/TiFastDev( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/TiFastDev( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/TiFastDev( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/TiFastDev( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/TiFastDev( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/TiFastDev( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/TiFastDev( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/TiFastDev( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/TiFastDev( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/TiFastDev( 423): at android.os.Looper.loop(Looper.java:130) E/TiFastDev( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/TitaniumModule( 423): (kroll$5: app://examples/commonjs.js) [17,14749] Error loading module named: __bad_module__ E/TitaniumModule( 423): java.lang.NullPointerException E/TitaniumModule( 423): at java.lang.String.<init>(String.java:276) E/TitaniumModule( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/TitaniumModule( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/TitaniumModule( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/TitaniumModule( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/TitaniumModule( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/TitaniumModule( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/TitaniumModule( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/TitaniumModule( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/TitaniumModule( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/TitaniumModule( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/TitaniumModule( 423): at android.os.Looper.loop(Looper.java:130) E/TitaniumModule( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): (kroll$5: app://examples/commonjs.js) [57,14806] Exception calling kroll method require, invocation: null ] E/KrollMethod( 423): org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (app://examples/commonjs.js#50) E/KrollMethod( 423): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:453) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875) E/KrollMethod( 423): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397) E/KrollMethod( 423): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollMethod( 423): at script(app://examples/commonjs.js:50) E/KrollMethod( 423): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollMethod( 423): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollMethod( 423): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollMethod( 423): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollMethod( 423): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollMethod( 423): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollMethod( 423): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollMethod( 423): at android.os.Looper.loop(Looper.java:130) E/KrollMethod( 423): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollMethod( 423): Caused by: java.lang.NullPointerException E/KrollMethod( 423): at java.lang.String.<init>(String.java:276) E/KrollMethod( 423): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216) E/KrollMethod( 423): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431) E/KrollMethod( 423): ... 18 more {code}

    Appcelerator JIRA | 5 years ago | Federico "Lox" Lucignano
    org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: size < 0 (app://examples/commonjs.js#28)
  3. 0

    1.launch KS and check adb output results: ResourceType( 3210): No package identifier when getting value for resource number 0x00000000 E/KrollMethod( 3210): (kroll$56: app://app.js) [1,599] Exception calling kroll method getString, invocation: null ] E/KrollMethod( 3210): android.content.res.Resources$NotFoundException: String resource ID #0x0 E/KrollMethod( 3210): at android.content.res.Resources.getText(Resources.java:242) E/KrollMethod( 3210): at android.content.res.Resources.getString(Resources.java:326) E/KrollMethod( 3210): at android.content.Context.getString(Context.java:204) E/KrollMethod( 3210): at ti.modules.titanium.locale.LocaleModule.getString(LocaleModule.java:91) E/KrollMethod( 3210): at ti.modules.titanium.locale.LocaleModuleBindingGen$12.invoke(LocaleModuleBindingGen.java:427) E/KrollMethod( 3210): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollMethod( 3210): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollMethod( 3210): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollMethod( 3210): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollMethod( 3210): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollMethod( 3210): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollMethod( 3210): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollMethod( 3210): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollMethod( 3210): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollMethod( 3210): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollMethod( 3210): at android.os.Looper.loop(Looper.java:126) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollContext( 3210): (kroll$56: app://app.js) [2,601] Error evaluating source: Wrapped android.content.res.Resources$NotFoundException: String resource ID #0x0 (file:///android_asset/Resources/app.js#332) E/KrollContext( 3210): org.mozilla.javascript.WrappedException: Wrapped android.content.res.Resources$NotFoundException: String resource ID #0x0 (file:///android_asset/Resources/app.js#332) E/KrollContext( 3210): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/KrollContext( 3210): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:85) E/KrollContext( 3210): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollContext( 3210): at script(file:///android_asset/Resources/app.js:332) E/KrollContext( 3210): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollContext( 3210): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollContext( 3210): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollContext( 3210): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollContext( 3210): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollContext( 3210): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollContext( 3210): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollContext( 3210): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollContext( 3210): at android.os.Looper.loop(Looper.java:126) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollContext( 3210): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0 E/KrollContext( 3210): at android.content.res.Resources.getText(Resources.java:242) E/KrollContext( 3210): at android.content.res.Resources.getString(Resources.java:326) E/KrollContext( 3210): at android.content.Context.getString(Context.java:204) E/KrollContext( 3210): at ti.modules.titanium.locale.LocaleModule.getString(LocaleModule.java:91) E/KrollContext( 3210): at ti.modules.titanium.locale.LocaleModuleBindingGen$12.invoke(LocaleModuleBindingGen.java:427) E/KrollContext( 3210): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollContext( 3210): ... 15 more E/TiJSError( 3210): (kroll$56: app://app.js) [2,603] ----- Titanium Javascript Runtime Error ----- E/TiJSError( 3210): (kroll$56: app://app.js) [1,604] - In file:///android_asset/Resources/app.js:332,0 E/TiJSError( 3210): (kroll$56: app://app.js) [0,604] - Message: Wrapped android.content.res.Resources$NotFoundException: String resource ID #0x0 (file:///android_asset/Resources/app.js#332) E/TiJSError( 3210): (kroll$56: app://app.js) [0,604] - Source: null

    Appcelerator JIRA | 6 years ago | Thomas Huelbert
    org.mozilla.javascript.WrappedException: Wrapped android.content.res.Resources$NotFoundException: String resource ID #0x0 (file:///android_asset/Resources/app.js#332)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3. Problem Email Dialog crashes android on CI builds of 1.8 Works fine on earlier versions. h3. Sample Code {code} var win = Ti.UI.createWindow(); var btn = Ti.UI.createButton({ title:'here' }); win.add(btn); win.open(); btn.addEventListener('click', function(){ var emailDialog = Titanium.UI.createEmailDialog(); emailDialog.setSubject('Hello from Titanium!'); emailDialog.setToRecipients(['foo@yahoo.com']); emailDialog.setCcRecipients(['bar@yahoo.com']); emailDialog.setBccRecipients(['blah@yahoo.com']); emailDialog.addEventListener('complete',function(e) { if (e.result == emailDialog.SENT) { if (Ti.Platform.osname != 'android') { // android doesn't give us useful result codes. // it anyway shows a toast. alert("message was sent"); } } else { alert("message was not sent. result = " + e.result); } }); emailDialog.open(); }); {code} h3. Log {code} 07-08 15:56:37.334: ERROR/KrollMethod(509): (kroll$1: app://app.js) [5836,30550] Exception calling kroll method open, invocation: null ] 07-08 15:56:37.334: ERROR/KrollMethod(509): java.lang.NullPointerException 07-08 15:56:37.334: ERROR/KrollMethod(509): at ti.modules.titanium.ui.EmailDialogProxy.getAttachmentUris(EmailDialogProxy.java:251) 07-08 15:56:37.334: ERROR/KrollMethod(509): at ti.modules.titanium.ui.EmailDialogProxy.buildIntent(EmailDialogProxy.java:115) 07-08 15:56:37.334: ERROR/KrollMethod(509): at ti.modules.titanium.ui.EmailDialogProxy.open(EmailDialogProxy.java:139) 07-08 15:56:37.334: ERROR/KrollMethod(509): at ti.modules.titanium.ui.EmailDialogProxyBindingGen$2.invoke(EmailDialogProxyBindingGen.java:142) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.appcelerator.titanium.kroll.KrollCallback.callSync(KrollCallback.java:139) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:164) 07-08 15:56:37.334: ERROR/KrollMethod(509): at android.os.Handler.handleCallback(Handler.java:587) 07-08 15:56:37.334: ERROR/KrollMethod(509): at android.os.Handler.dispatchMessage(Handler.java:92) 07-08 15:56:37.334: ERROR/KrollMethod(509): at android.os.Looper.loop(Looper.java:123) 07-08 15:56:37.334: ERROR/KrollMethod(509): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) 07-08 15:56:37.354: ERROR/KrollCallback(509): (kroll$1: app://app.js) [13,30563] Error evaluating source, invocation: [callMethod UI.Button.UI.Button:event:click null], message: Wrapped java.lang.NullPointerException (file:///android_asset/Resources/app.js#33) 07-08 15:56:37.354: ERROR/KrollCallback(509): org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (file:///android_asset/Resources/app.js#33) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:85) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) 07-08 15:56:37.354: ERROR/KrollCallback(509): at script(file:///android_asset/Resources/app.js:33) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.appcelerator.titanium.kroll.KrollCallback.callSync(KrollCallback.java:139) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:164) 07-08 15:56:37.354: ERROR/KrollCallback(509): at android.os.Handler.handleCallback(Handler.java:587) 07-08 15:56:37.354: ERROR/KrollCallback(509): at android.os.Handler.dispatchMessage(Handler.java:92) 07-08 15:56:37.354: ERROR/KrollCallback(509): at android.os.Looper.loop(Looper.java:123) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) 07-08 15:56:37.354: ERROR/KrollCallback(509): Caused by: java.lang.NullPointerException 07-08 15:56:37.354: ERROR/KrollCallback(509): at ti.modules.titanium.ui.EmailDialogProxy.getAttachmentUris(EmailDialogProxy.java:251) 07-08 15:56:37.354: ERROR/KrollCallback(509): at ti.modules.titanium.ui.EmailDialogProxy.buildIntent(EmailDialogProxy.java:115) 07-08 15:56:37.354: ERROR/KrollCallback(509): at ti.modules.titanium.ui.EmailDialogProxy.open(EmailDialogProxy.java:139) 07-08 15:56:37.354: ERROR/KrollCallback(509): at ti.modules.titanium.ui.EmailDialogProxyBindingGen$2.invoke(EmailDialogProxyBindingGen.java:142) 07-08 15:56:37.354: ERROR/KrollCallback(509): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) 07-08 15:56:37.354: ERROR/KrollCallback(509): ... 12 more 07-08 15:56:37.354: ERROR/TiJSError(509): (kroll$1: app://app.js) [19,30582] ----- Titanium Javascript Runtime Error ----- 07-08 15:56:37.365: ERROR/TiJSError(509): (kroll$1: app://app.js) [7,30589] - In file:///android_asset/Resources/app.js:33,0 07-08 15:56:37.385: ERROR/TiJSError(509): (kroll$1: app://app.js) [12,30601] - Message: Wrapped java.lang.NullPointerException (file:///android_asset/Resources/app.js#33) 07-08 15:56:37.385: ERROR/TiJSError(509): (kroll$1: app://app.js) [4,30605] - Source: null {code}

    Appcelerator JIRA | 5 years ago | Pedro Enrique
    org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (file:///android_asset/Resources/app.js#33)
  6. 0

    1.launch KS and check adb output results: ResourceType( 3210): No package identifier when getting value for resource number 0x00000000 E/KrollMethod( 3210): (kroll$56: app://app.js) [1,599] Exception calling kroll method getString, invocation: null ] E/KrollMethod( 3210): android.content.res.Resources$NotFoundException: String resource ID #0x0 E/KrollMethod( 3210): at android.content.res.Resources.getText(Resources.java:242) E/KrollMethod( 3210): at android.content.res.Resources.getString(Resources.java:326) E/KrollMethod( 3210): at android.content.Context.getString(Context.java:204) E/KrollMethod( 3210): at ti.modules.titanium.locale.LocaleModule.getString(LocaleModule.java:91) E/KrollMethod( 3210): at ti.modules.titanium.locale.LocaleModuleBindingGen$12.invoke(LocaleModuleBindingGen.java:427) E/KrollMethod( 3210): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollMethod( 3210): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollMethod( 3210): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollMethod( 3210): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollMethod( 3210): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollMethod( 3210): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollMethod( 3210): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollMethod( 3210): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollMethod( 3210): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollMethod( 3210): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollMethod( 3210): at android.os.Looper.loop(Looper.java:126) E/KrollMethod( 3210): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollContext( 3210): (kroll$56: app://app.js) [2,601] Error evaluating source: Wrapped android.content.res.Resources$NotFoundException: String resource ID #0x0 (file:///android_asset/Resources/app.js#332) E/KrollContext( 3210): org.mozilla.javascript.WrappedException: Wrapped android.content.res.Resources$NotFoundException: String resource ID #0x0 (file:///android_asset/Resources/app.js#332) E/KrollContext( 3210): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786) E/KrollContext( 3210): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:85) E/KrollContext( 3210): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701) E/KrollContext( 3210): at script(file:///android_asset/Resources/app.js:332) E/KrollContext( 3210): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854) E/KrollContext( 3210): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) E/KrollContext( 3210): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) E/KrollContext( 3210): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177) E/KrollContext( 3210): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) E/KrollContext( 3210): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217) E/KrollContext( 3210): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223) E/KrollContext( 3210): at android.os.Handler.dispatchMessage(Handler.java:95) E/KrollContext( 3210): at android.os.Looper.loop(Looper.java:126) E/KrollContext( 3210): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) E/KrollContext( 3210): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0 E/KrollContext( 3210): at android.content.res.Resources.getText(Resources.java:242) E/KrollContext( 3210): at android.content.res.Resources.getString(Resources.java:326) E/KrollContext( 3210): at android.content.Context.getString(Context.java:204) E/KrollContext( 3210): at ti.modules.titanium.locale.LocaleModule.getString(LocaleModule.java:91) E/KrollContext( 3210): at ti.modules.titanium.locale.LocaleModuleBindingGen$12.invoke(LocaleModuleBindingGen.java:427) E/KrollContext( 3210): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51) E/KrollContext( 3210): ... 15 more E/TiJSError( 3210): (kroll$56: app://app.js) [2,603] ----- Titanium Javascript Runtime Error ----- E/TiJSError( 3210): (kroll$56: app://app.js) [1,604] - In file:///android_asset/Resources/app.js:332,0 E/TiJSError( 3210): (kroll$56: app://app.js) [0,604] - Message: Wrapped android.content.res.Resources$NotFoundException: String resource ID #0x0 (file:///android_asset/Resources/app.js#332) E/TiJSError( 3210): (kroll$56: app://app.js) [0,604] - Source: null

    Appcelerator JIRA | 6 years ago | Thomas Huelbert
    org.mozilla.javascript.WrappedException: Wrapped android.content.res.Resources$NotFoundException: String resource ID #0x0 (file:///android_asset/Resources/app.js#332)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.mozilla.javascript.WrappedException

      Wrapped java.lang.IllegalArgumentException: size < 0 (app://examples/commonjs.js#28)

      at org.mozilla.javascript.Context.throwAsScriptRuntimeEx()
    2. Rhino
      Context.throwAsScriptRuntimeEx
      1. org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)
      1 frame
    3. ti.modules.titanium
      TitaniumModuleBindingGen$23.invoke
      1. ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:453)
      2. ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875)
      2 frames
    4. org.appcelerator.kroll
      KrollMethod.call
      1. org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397)
      2. org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51)
      2 frames
    5. Rhino
      Interpreter.interpretLoop
      1. org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
      1 frame