Repository navigation
Closed
Labels
Milestone
Description
com.tns.NativeScriptException:
Calling js method afterTextChanged failed
Error: com.tns.NativeScriptException: No weak reference found. Attempt to use cleared object reference id=10709
com.tns.Platform.getJavaObjectByID(Platform.java:623)
com.tns.Platform.callJSMethodNative(Native Method)
com.tns.Platform.dispatchCallJSMethodNative(Platform.java:799)
com.tns.Platform.callJSMethod(Platform.java:700)
com.tns.Platform.callJSMethod(Platform.java:680)
com.tns.Platform.callJSMethod(Platform.java:670)
com.tns.gen.android.text.TextWatcher_ftns_modules_ui_editable-text-base_editable-text-base_l22_c27__.afterTextChanged(android.text.TextWatcher.java)
android.widget.TextView.sendAfterTextChanged(TextView.java:8004)
android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10165)
android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1043)
android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:560)
android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:492)
android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:491)
android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:685)
android.view.inputmethod.BaseInputConnection.commitText(BaseInputConnection.java:197)
com.android.internal.widget.EditableInputConnection.commitText(EditableInputConnection.java:184)
com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:286)
com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:148)
android.app.ActivityThread.main(ActivityThread.java:5417)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
File: "/data/data/com.darrenwhitlen.ircmobile/files/app/tns_modules/ui/editable-text-base/editable-text-base.js, line: 46, column: 100
StackTrace:
Frame: function:'android.text.TextWatcher.afterTextChanged', file:'/data/data/com.darrenwhitlen.ircmobile/files/app/tns_modules/ui/editable-text-base/editable-text-base.js', line: 46, column: 101
at com.tns.Platform.callJSMethodNative(Native Method)
at com.tns.Platform.dispatchCallJSMethodNative(Platform.java:799)
at com.tns.Platform.callJSMethod(Platform.java:700)
at com.tns.Platform.callJSMethod(Platform.java:680)
at com.tns.Platform.callJSMethod(Platform.java:670)
at com.tns.gen.android.text.TextWatcher_ftns_modules_ui_editable-text-base_editable-text-base_l22_c27__.afterTextChanged(android.text.TextWatcher.java)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8004)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10165)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1043)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:560)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:492)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:491)
at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:685)
at android.view.inputmethod.BaseInputConnection.commitText(BaseInputConnection.java:197)
at com.android.internal.widget.EditableInputConnection.commitText(EditableInputConnection.java:184)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:286)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Activity
enchev commentedon Jan 20, 2016
Can you post more info about your environment? Is this a device or emulator? What is the API Level?
prawnsalad commentedon Jan 20, 2016
Testing on a Nexus 5 device, developing against SDK 22. It only happens when I'm not expecting it but it's appearing when I'm tapping around the textfield pretty fast, tapping between the TextField and a Button.
prawnsalad commentedon Jan 21, 2016
Not sure if I should be including anything else, but making these changes on my 1.5.2 install didn't make any difference. Still getting the same error
ofirdagan commentedon Feb 20, 2016
+1
Happened to me as well (Nexus 5 real device android 6.0.1)
dragGH102 commentedon Feb 25, 2016
+1 here, happens very occasionally on Android 5.0 - {n} 1.6.1 when
frameModule.topmost().navigate(module_name)
@enchev may this issue be open again? it's quite a severe issue in a production app. thanks :)
Daxito commentedon Feb 25, 2016
+1
I also see this error from time to time.
Daxito commentedon Mar 7, 2016
+1
Still getting this error over and over, this is my log, maybe this is actually a different error??
Using {N} 1.6.1
com.tns.NativeScriptException: No weak reference found. Attempt to use cleared object reference id=10609
at com.tns.Platform.getJavaObjectByID(Platform.java:633)
at com.tns.Platform.callJSMethodNative(Native Method)
at com.tns.Platform.dispatchCallJSMethodNative(Platform.java:812)
at com.tns.Platform.callJSMethod(Platform.java:711)
at com.tns.Platform.callJSMethod(Platform.java:690)
at com.tns.Platform.callJSMethod(Platform.java:680)
at com.tns.gen.android.text.TextWatcher_ftns_modules_ui_editable-text-base_editable-text-base_l22_c29__.afterTextChanged(android.text.TextWatcher.java)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8702)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:11001)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:976)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:520)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:216)
at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:33)
at android.text.method.BaseKeyListener.backspaceOrForwardDelete(BaseKeyListener.java:94)
at android.text.method.BaseKeyListener.backspace(BaseKeyListener.java:49)
at android.text.method.BaseKeyListener.onKeyDown(BaseKeyListener.java:155)
at android.text.method.NumberKeyListener.onKeyDown(NumberKeyListener.java:138)
at android.widget.TextView.doKeyDown(TextView.java:6675)
at android.widget.TextView.onKeyDown(TextView.java:6453)
at android.view.KeyEvent.dispatch(KeyEvent.java:3135)
at android.view.View.dispatchKeyEvent(View.java:8777)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1680)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1680)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1680)
at android.widget.ScrollView.dispatchKeyEvent(ScrollView.java:516)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1680)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1680)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1680)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1680)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1680)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1680)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:2544)
at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1757)
at android.app.Activity.dispatchKeyEvent(Activity.java:2800)
at com.tns.NativeScriptActivity.dispatchKeyEvent(NativeScriptActivity.java:331)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2429)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4512)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4467)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4024)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4077)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4043)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4157)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4051)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4214)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4024)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4077)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4043)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4051)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4024)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6485)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6384)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6355)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3588)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5835)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
x00 commentedon Feb 8, 2017
with me I type a few letters then clear backspace to clear, then backspace twice, then another letter, this causes the error.
x00 commentedon Feb 11, 2017
Advice: put some error handling in your methods you will find that actual error that is causing the problem, rather than this failure message.
lock commentedon Aug 28, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.