org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: argument type mismatch (app://examples/picker_basic.js#18)

Appcelerator JIRA | Paul Dowsett | 6 years ago
  1. 0

    {html}<div><p>Environment:<br></p> <pre> <code>ubuntu android emulator 1_4_X (2 Nov) 1_5_X (6 Nov) - unable to test due to #2284'</code> </pre> Change line 19 of <a href= "https://github.com/appcelerator/titanium_mobile/blob/master/demos/KitchenSink/Resources/examples/picker_basic.js#L19"> picker_basic.js</a> from:<br> <pre> <code>picker.setSelectedRow(0,1,true);</code> </pre> to<br> <pre> <code>picker.setSelectedRow(0,1);</code> </pre> <p>Following exception will occur as soon as script is invoked:</p> <pre> <code> 718 KrollContext D (kroll$5) [438,21753] eval file: app://examples/picker_basic.js 718 KrollContext E (kroll$5) [348,22101] Error evaluating source: Wrapped java.lang.IllegalArgumentException: argument type mismatch (app://examples/picker_basic.js#18) 718 KrollContext E org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: argument type mismatch (app://examples/picker_basic.js#18) 718 KrollContext E at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source) 718 KrollContext E at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:109) 718 KrollContext E at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source) 718 KrollContext E at script(app://examples/picker_basic.js:18) 718 KrollContext E at org.mozilla.javascript.Interpreter.interpret(Unknown Source) 718 KrollContext E at org.mozilla.javascript.InterpretedFunction.call(Unknown Source) 718 KrollContext E at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source) 718 KrollContext E at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source) 718 KrollContext E at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source) 718 KrollContext E at org.mozilla.javascript.Context.evaluateReader(Unknown Source) 718 KrollContext E at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:159) 718 KrollContext E at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:101) 718 KrollContext E at android.os.Handler.dispatchMessage(Handler.java:95) 718 KrollContext E at android.os.Looper.loop(Looper.java:123) 718 KrollContext E at android.os.HandlerThread.run(HandlerThread.java:60) 718 KrollContext E Caused by: java.lang.IllegalArgumentException: argument type mismatch 718 KrollContext E at java.lang.reflect.Method.invokeNative(Native Method) 718 KrollContext E at java.lang.reflect.Method.invoke(Method.java:521) 718 KrollContext E at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:81) 718 KrollContext E ... 12 more</code> </pre></div>{html}

    Appcelerator JIRA | 6 years ago | Paul Dowsett
    org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: argument type mismatch (app://examples/picker_basic.js#18)
  2. 0

    {html}<div><p>Environment:<br></p> <pre> <code>ubuntu android emulator 1_4_X (2 Nov) 1_5_X (6 Nov) - unable to test due to #2284'</code> </pre> Change line 19 of <a href= "https://github.com/appcelerator/titanium_mobile/blob/master/demos/KitchenSink/Resources/examples/picker_basic.js#L19"> picker_basic.js</a> from:<br> <pre> <code>picker.setSelectedRow(0,1,true);</code> </pre> to<br> <pre> <code>picker.setSelectedRow(0,1);</code> </pre> <p>Following exception will occur as soon as script is invoked:</p> <pre> <code> 718 KrollContext D (kroll$5) [438,21753] eval file: app://examples/picker_basic.js 718 KrollContext E (kroll$5) [348,22101] Error evaluating source: Wrapped java.lang.IllegalArgumentException: argument type mismatch (app://examples/picker_basic.js#18) 718 KrollContext E org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: argument type mismatch (app://examples/picker_basic.js#18) 718 KrollContext E at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source) 718 KrollContext E at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:109) 718 KrollContext E at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source) 718 KrollContext E at script(app://examples/picker_basic.js:18) 718 KrollContext E at org.mozilla.javascript.Interpreter.interpret(Unknown Source) 718 KrollContext E at org.mozilla.javascript.InterpretedFunction.call(Unknown Source) 718 KrollContext E at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source) 718 KrollContext E at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source) 718 KrollContext E at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source) 718 KrollContext E at org.mozilla.javascript.Context.evaluateReader(Unknown Source) 718 KrollContext E at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:159) 718 KrollContext E at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:101) 718 KrollContext E at android.os.Handler.dispatchMessage(Handler.java:95) 718 KrollContext E at android.os.Looper.loop(Looper.java:123) 718 KrollContext E at android.os.HandlerThread.run(HandlerThread.java:60) 718 KrollContext E Caused by: java.lang.IllegalArgumentException: argument type mismatch 718 KrollContext E at java.lang.reflect.Method.invokeNative(Native Method) 718 KrollContext E at java.lang.reflect.Method.invoke(Method.java:521) 718 KrollContext E at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:81) 718 KrollContext E ... 12 more</code> </pre></div>{html}

    Appcelerator JIRA | 6 years ago | Paul Dowsett
    org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: argument type mismatch (app://examples/picker_basic.js#18)
  3. 0

    {html}<div><p>Adding a click event inside another click event causes an exception.</p> <p>I have just found this bug in the latest build, 1.4.2 / 30.09.2010. The 1.4.2 CI build released 21.09.2010 did not have this issue.</p> <p>To see the issue in action, replace Resources/examples/animation.js in the KitchenSink with the following code:</p> <p><a href= "http://gist.github.com/605647">Resources/examples/animation.js</a></p> <p>Here is the error output:</p> <pre> <code>2087 KrollContext D (kroll$4) [550,44126] eval file: app://examples/animation.js 2087 dalvikvm D GC_FOR_MALLOC freed 4800 objects / 266512 bytes in 124ms 60 InputManagerService W Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44fc6370 60 InputManagerService W Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44fa11c0 2087 KrollCallback E (kroll$4) [23525,67651] Error evaluating source: Wrapped java.lang.NullPointerException (app://examples/animation.js#40) 2087 KrollCallback E org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (app://examples/animation.js#40) 2087 KrollCallback E at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source) 2087 KrollCallback E at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:96) 2087 KrollCallback E at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source) 2087 KrollCallback E at script(app://examples/animation.js:40) 2087 KrollCallback E at org.mozilla.javascript.Interpreter.interpret(Unknown Source) 2087 KrollCallback E at org.mozilla.javascript.InterpretedFunction.call(Unknown Source) 2087 KrollCallback E at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source) 2087 KrollCallback E at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source) 2087 KrollCallback E at org.mozilla.javascript.InterpretedFunction.call(Unknown Source) 2087 KrollCallback E at org.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:70) 2087 KrollCallback E at android.os.Handler.handleCallback(Handler.java:587) 2087 KrollCallback E at android.os.Handler.dispatchMessage(Handler.java:92) 2087 KrollCallback E at android.os.Looper.loop(Looper.java:123) 2087 KrollCallback E at android.os.HandlerThread.run(HandlerThread.java:60) 2087 KrollCallback E Caused by: java.lang.NullPointerException 2087 KrollCallback E at org.appcelerator.titanium.proxy.TiViewProxy.setClickable(TiViewProxy.java:589) 2087 KrollCallback E at org.appcelerator.titanium.proxy.TiViewProxy.eventListenerAdded(TiViewProxy.java:569) 2087 KrollCallback E at org.appcelerator.titanium.TiContext.dispatchOnEventChange(TiContext.java:362) 2087 KrollCallback E at org.appcelerator.titanium.TiContext.addEventListener(TiContext.java:409) 2087 KrollCallback E at org.appcelerator.titanium.TiProxy.addEventListener(TiProxy.java:232) 2087 KrollCallback E at java.lang.reflect.Method.invokeNative(Native Method) 2087 KrollCallback E at java.lang.reflect.Method.invoke(Method.java:521) 2087 KrollCallback E at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:84) 2087 KrollCallback E ... 11 more</code> </pre></div>{html}

    Appcelerator JIRA | 6 years ago | Paul Dowsett
    org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (app://examples/animation.js#40)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    {html}<div><p>Adding a click event inside another click event causes an exception.</p> <p>I have just found this bug in the latest build, 1.4.2 / 30.09.2010. The 1.4.2 CI build released 21.09.2010 did not have this issue.</p> <p>To see the issue in action, replace Resources/examples/animation.js in the KitchenSink with the following code:</p> <p><a href= "http://gist.github.com/605647">Resources/examples/animation.js</a></p> <p>Here is the error output:</p> <pre> <code>2087 KrollContext D (kroll$4) [550,44126] eval file: app://examples/animation.js 2087 dalvikvm D GC_FOR_MALLOC freed 4800 objects / 266512 bytes in 124ms 60 InputManagerService W Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44fc6370 60 InputManagerService W Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44fa11c0 2087 KrollCallback E (kroll$4) [23525,67651] Error evaluating source: Wrapped java.lang.NullPointerException (app://examples/animation.js#40) 2087 KrollCallback E org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (app://examples/animation.js#40) 2087 KrollCallback E at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source) 2087 KrollCallback E at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:96) 2087 KrollCallback E at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source) 2087 KrollCallback E at script(app://examples/animation.js:40) 2087 KrollCallback E at org.mozilla.javascript.Interpreter.interpret(Unknown Source) 2087 KrollCallback E at org.mozilla.javascript.InterpretedFunction.call(Unknown Source) 2087 KrollCallback E at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source) 2087 KrollCallback E at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source) 2087 KrollCallback E at org.mozilla.javascript.InterpretedFunction.call(Unknown Source) 2087 KrollCallback E at org.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:70) 2087 KrollCallback E at android.os.Handler.handleCallback(Handler.java:587) 2087 KrollCallback E at android.os.Handler.dispatchMessage(Handler.java:92) 2087 KrollCallback E at android.os.Looper.loop(Looper.java:123) 2087 KrollCallback E at android.os.HandlerThread.run(HandlerThread.java:60) 2087 KrollCallback E Caused by: java.lang.NullPointerException 2087 KrollCallback E at org.appcelerator.titanium.proxy.TiViewProxy.setClickable(TiViewProxy.java:589) 2087 KrollCallback E at org.appcelerator.titanium.proxy.TiViewProxy.eventListenerAdded(TiViewProxy.java:569) 2087 KrollCallback E at org.appcelerator.titanium.TiContext.dispatchOnEventChange(TiContext.java:362) 2087 KrollCallback E at org.appcelerator.titanium.TiContext.addEventListener(TiContext.java:409) 2087 KrollCallback E at org.appcelerator.titanium.TiProxy.addEventListener(TiProxy.java:232) 2087 KrollCallback E at java.lang.reflect.Method.invokeNative(Native Method) 2087 KrollCallback E at java.lang.reflect.Method.invoke(Method.java:521) 2087 KrollCallback E at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:84) 2087 KrollCallback E ... 11 more</code> </pre></div>{html}

    Appcelerator JIRA | 6 years ago | Paul Dowsett
    org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (app://examples/animation.js#40)
  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: argument type mismatch (app://examples/picker_basic.js#18)

      at org.mozilla.javascript.Context.throwAsScriptRuntimeEx()
    2. Rhino
      Context.throwAsScriptRuntimeEx
      1. org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)
      1 frame
    3. org.appcelerator.titanium
      KrollMethod.call
      1. org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:109)
      1 frame
    4. Rhino
      Interpreter.interpretLoop
      1. org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
      1 frame