java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Attempting to close a Ti.UI.TabGroup when it contains a ti.map map view in one of it's tabs causes the app crash. Test case: {code} // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); // create tab group var tabGroup = Titanium.UI.createTabGroup(); var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var tab1 = Titanium.UI.createTab({ icon:'KS_nav_views.png', title:'Tab 1', window:win1 }); var Map = require('ti.map'); var mapview = Map.createView(); win1.add(mapview); tabGroup.addTab(tab1); tabGroup.open(); // Close the tabGroup after 8 seconds setTimeout(function(){ console.log("Closing tabGroup"); tabGroup.close(); }, 8000); {code} Stack trace: {panel} [ERROR] TiApplication: (main) [8315,8315] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference; Titanium 5.1.2,2015/12/16 19:00,ca822b2 [ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl.makeInactive(FragmentManager.java:1261) [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1168) [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304) [ERROR] TiApplication: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708) [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572) [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493) [ERROR] TiApplication: at android.os.Handler.handleCallback(Handler.java:739) [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:145) [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5832) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) [ERROR] AndroidRuntime: FATAL EXCEPTION: main [ERROR] AndroidRuntime: Process: com.thevirtualforge.tabtest2, PID: 6616 [ERROR] AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.makeInactive(FragmentManager.java:1261) [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1168) [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304) [ERROR] AndroidRuntime: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708) [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572) [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493) [ERROR] AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739) [ERROR] AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] AndroidRuntime: at android.os.Looper.loop(Looper.java:145) [ERROR] AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5832) [ERROR] AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) [ERROR] AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) [ERROR] AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) {panel}
    via by Terry Morgan,
  • Attempting to close a Ti.UI.TabGroup when it contains a ti.map map view in one of it's tabs causes the app crash. Test case: {code} // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); // create tab group var tabGroup = Titanium.UI.createTabGroup(); var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var tab1 = Titanium.UI.createTab({ icon:'KS_nav_views.png', title:'Tab 1', window:win1 }); var Map = require('ti.map'); var mapview = Map.createView(); win1.add(mapview); tabGroup.addTab(tab1); tabGroup.open(); // Close the tabGroup after 8 seconds setTimeout(function(){ console.log("Closing tabGroup"); tabGroup.close(); }, 8000); {code} Stack trace: {panel} [ERROR] TiApplication: (main) [8315,8315] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference; Titanium 5.1.2,2015/12/16 19:00,ca822b2 [ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl.makeInactive(FragmentManager.java:1261) [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1168) [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304) [ERROR] TiApplication: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708) [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572) [ERROR] TiApplication: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493) [ERROR] TiApplication: at android.os.Handler.handleCallback(Handler.java:739) [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:145) [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5832) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) [ERROR] AndroidRuntime: FATAL EXCEPTION: main [ERROR] AndroidRuntime: Process: com.thevirtualforge.tabtest2, PID: 6616 [ERROR] AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.makeInactive(FragmentManager.java:1261) [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1168) [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304) [ERROR] AndroidRuntime: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708) [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572) [ERROR] AndroidRuntime: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493) [ERROR] AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739) [ERROR] AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] AndroidRuntime: at android.os.Looper.loop(Looper.java:145) [ERROR] AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5832) [ERROR] AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) [ERROR] AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) [ERROR] AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) {panel}
    via by Terry Morgan,
  • ForPDA - 4PDA
    via by Unknown author,
  • Android Fragment Archives - BlogoSfera
    via by Unknown author,
    • java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference at android.support.v4.app.FragmentManagerImpl.makeInactive(FragmentManager.java:1261) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1168) at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5832) 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)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    13 more bugmates