NativeScript / NativeScript/android
java.lang.NullPointerException: at org.nativescript.widgets.TabsBar.updateItemAt (TabsBar.java:195)
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 563
- Forks
- 144
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 14
Description
Environment
AndroidSdk = '29';
AndroidSdkBuildTools = '29.0.3';
NodeJs = '10.21.0';
NativeScriptCLI = '6.7.4';
"nativescript": {
"tns-android": {
"version": "6.5.3"
},
"tns-ios": {
"version": "6.5.1"
}
},
Describe the bug
Having a couple of hard crashes in "TabsBar" widget.
Error:
at com.tns.Runtime.callJSMethodNative (Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative (Runtime.java:1286)
at com.tns.Runtime.callJSMethodImpl (Runtime.java:1173)
at com.tns.Runtime.callJSMethod (Runtime.java:1160)
at com.tns.Runtime.callJSMethod (Runtime.java:1138)
at com.tns.Runtime.callJSMethod (Runtime.java:1134)
at com.tns.NativeScriptActivity.onStart (NativeScriptActivity.java:29)
at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1433)
at android.app.Activity.performStart (Activity.java:7980)
at android.app.ActivityThread.handleStartActivity (ActivityThread.java:3578)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:183)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:132)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2220)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:237)
at android.app.ActivityThread.main (ActivityThread.java:8016)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1076)
Caused by: java.lang.NullPointerException:
at org.nativescript.widgets.TabsBar.updateItemAt (TabsBar.java:195)
To Reproduce
not able yet
Expected behavior
dont crash
Sample project
not possible yet
Additional context
Android 9/10 until now

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at org.nativescript.widgets.TabsBar.updateItemAt in TabsBar.java, line 195, and trace the Android lifecycle path shown in the stack trace. Try to reproduce the crash with the reported NativeScript, tns-android, SDK, and Android 9/10 versions. Done means the TabsBar no longer produces this NullPointerException during the affected lifecycle path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100