java.lang.NullPointerException: storage == null

Appcelerator JIRA | Davide Cassenti | 3 years ago
  1. 0

    h2. Problem description When removing columns from a picker, if useSpinner is set to true, the application crashes h2. Code to reproduce Just click the remove button in the app: {code} var win = Ti.UI.createWindow({ layout: 'vertical' }); var picker = Ti.UI.createPicker({ useSpinner: true }); var fruit = [ 'Bananas', 'Strawberries', 'Mangos', 'Grapes' ]; var column1 = Ti.UI.createPickerColumn(); for(var i=0, ilen=fruit.length; i<ilen; i++){ var row = Ti.UI.createPickerRow({title: fruit[i]}); column1.addRow(row); } picker.add([column1]); win.add(picker); win.open(); var btn = Ti.UI.createButton({ title: "Remove columns" }); btn.addEventListener('click', function() { var _col = picker.columns[0]; var len = _col.rowCount; for(var x = len-1; x >= 0; x-- ){ var _row = _col.rows[x]; _col.removeRow(_row); } }); win.add(btn); {code} h2. Error log {code} E/TiApplication(21214): java.lang.NullPointerException: storage == null E/TiApplication(21214): at java.util.Arrays$ArrayList.<init>(Arrays.java:38) E/TiApplication(21214): at java.util.Arrays.asList(Arrays.java:154) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TextWheelAdapter.<init>(TextWheelAdapter.java:28) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinnerColumn.refreshNativeView(TiUISpinnerColumn.java:180) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:63) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:56) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.onColumnModelChanged(TiUISpinner.java:99) E/TiApplication(21214): at ti.modules.titanium.ui.PickerProxy.handleFireColumnModelChange(PickerProxy.java:706) E/TiApplication(21214): at ti.modules.titanium.ui.PickerProxy.fireColumnModelChange(PickerProxy.java:694) E/TiApplication(21214): at ti.modules.titanium.ui.PickerProxy.rowRemoved(PickerProxy.java:765) E/TiApplication(21214): at ti.modules.titanium.ui.PickerColumnProxy.handleRemoveRow(PickerColumnProxy.java:160) E/TiApplication(21214): at ti.modules.titanium.ui.PickerColumnProxy.handleMessage(PickerColumnProxy.java:76) E/TiApplication(21214): at android.os.Handler.dispatchMessage(Handler.java:95) E/TiApplication(21214): at android.os.Looper.loop(Looper.java:137) E/TiApplication(21214): at android.app.ActivityThread.main(ActivityThread.java:5103) E/TiApplication(21214): at java.lang.reflect.Method.invokeNative(Native Method) E/TiApplication(21214): at java.lang.reflect.Method.invoke(Method.java:525) E/TiApplication(21214): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) E/TiApplication(21214): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/TiApplication(21214): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(21214): FATAL EXCEPTION: main E/AndroidRuntime(21214): java.lang.NullPointerException: storage == null E/AndroidRuntime(21214): at java.util.Arrays$ArrayList.<init>(Arrays.java:38) E/AndroidRuntime(21214): at java.util.Arrays.asList(Arrays.java:154) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TextWheelAdapter.<init>(TextWheelAdapter.java:28) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinnerColumn.refreshNativeView(TiUISpinnerColumn.java:180) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:63) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:56) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.onColumnModelChanged(TiUISpinner.java:99) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerProxy.handleFireColumnModelChange(PickerProxy.java:706) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerProxy.fireColumnModelChange(PickerProxy.java:694) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerProxy.rowRemoved(PickerProxy.java:765) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerColumnProxy.handleRemoveRow(PickerColumnProxy.java:160) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerColumnProxy.handleMessage(PickerColumnProxy.java:76) E/AndroidRuntime(21214): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime(21214): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime(21214): at android.app.ActivityThread.main(ActivityThread.java:5103) E/AndroidRuntime(21214): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(21214): at java.lang.reflect.Method.invoke(Method.java:525) E/AndroidRuntime(21214): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) E/AndroidRuntime(21214): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/AndroidRuntime(21214): at dalvik.system.NativeStart.main(Native Method) {code}

    Appcelerator JIRA | 3 years ago | Davide Cassenti
    java.lang.NullPointerException: storage == null
  2. 0

    h2. Problem description When removing columns from a picker, if useSpinner is set to true, the application crashes h2. Code to reproduce Just click the remove button in the app: {code} var win = Ti.UI.createWindow({ layout: 'vertical' }); var picker = Ti.UI.createPicker({ useSpinner: true }); var fruit = [ 'Bananas', 'Strawberries', 'Mangos', 'Grapes' ]; var column1 = Ti.UI.createPickerColumn(); for(var i=0, ilen=fruit.length; i<ilen; i++){ var row = Ti.UI.createPickerRow({title: fruit[i]}); column1.addRow(row); } picker.add([column1]); win.add(picker); win.open(); var btn = Ti.UI.createButton({ title: "Remove columns" }); btn.addEventListener('click', function() { var _col = picker.columns[0]; var len = _col.rowCount; for(var x = len-1; x >= 0; x-- ){ var _row = _col.rows[x]; _col.removeRow(_row); } }); win.add(btn); {code} h2. Error log {code} E/TiApplication(21214): java.lang.NullPointerException: storage == null E/TiApplication(21214): at java.util.Arrays$ArrayList.<init>(Arrays.java:38) E/TiApplication(21214): at java.util.Arrays.asList(Arrays.java:154) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TextWheelAdapter.<init>(TextWheelAdapter.java:28) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinnerColumn.refreshNativeView(TiUISpinnerColumn.java:180) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:63) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:56) E/TiApplication(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.onColumnModelChanged(TiUISpinner.java:99) E/TiApplication(21214): at ti.modules.titanium.ui.PickerProxy.handleFireColumnModelChange(PickerProxy.java:706) E/TiApplication(21214): at ti.modules.titanium.ui.PickerProxy.fireColumnModelChange(PickerProxy.java:694) E/TiApplication(21214): at ti.modules.titanium.ui.PickerProxy.rowRemoved(PickerProxy.java:765) E/TiApplication(21214): at ti.modules.titanium.ui.PickerColumnProxy.handleRemoveRow(PickerColumnProxy.java:160) E/TiApplication(21214): at ti.modules.titanium.ui.PickerColumnProxy.handleMessage(PickerColumnProxy.java:76) E/TiApplication(21214): at android.os.Handler.dispatchMessage(Handler.java:95) E/TiApplication(21214): at android.os.Looper.loop(Looper.java:137) E/TiApplication(21214): at android.app.ActivityThread.main(ActivityThread.java:5103) E/TiApplication(21214): at java.lang.reflect.Method.invokeNative(Native Method) E/TiApplication(21214): at java.lang.reflect.Method.invoke(Method.java:525) E/TiApplication(21214): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) E/TiApplication(21214): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/TiApplication(21214): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(21214): FATAL EXCEPTION: main E/AndroidRuntime(21214): java.lang.NullPointerException: storage == null E/AndroidRuntime(21214): at java.util.Arrays$ArrayList.<init>(Arrays.java:38) E/AndroidRuntime(21214): at java.util.Arrays.asList(Arrays.java:154) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TextWheelAdapter.<init>(TextWheelAdapter.java:28) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinnerColumn.refreshNativeView(TiUISpinnerColumn.java:180) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:63) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:56) E/AndroidRuntime(21214): at ti.modules.titanium.ui.widget.picker.TiUISpinner.onColumnModelChanged(TiUISpinner.java:99) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerProxy.handleFireColumnModelChange(PickerProxy.java:706) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerProxy.fireColumnModelChange(PickerProxy.java:694) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerProxy.rowRemoved(PickerProxy.java:765) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerColumnProxy.handleRemoveRow(PickerColumnProxy.java:160) E/AndroidRuntime(21214): at ti.modules.titanium.ui.PickerColumnProxy.handleMessage(PickerColumnProxy.java:76) E/AndroidRuntime(21214): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime(21214): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime(21214): at android.app.ActivityThread.main(ActivityThread.java:5103) E/AndroidRuntime(21214): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(21214): at java.lang.reflect.Method.invoke(Method.java:525) E/AndroidRuntime(21214): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) E/AndroidRuntime(21214): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/AndroidRuntime(21214): at dalvik.system.NativeStart.main(Native Method) {code}

    Appcelerator JIRA | 3 years ago | Davide Cassenti
    java.lang.NullPointerException: storage == null
  3. 0

    ListFragment is not display Data

    Stack Overflow | 3 years ago | Josiane Ferice
    java.lang.NullPointerException: storage == null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    App crashes on first start

    GitHub | 1 year ago | Geekgasm
    java.lang.RuntimeException: Unable to start activity ComponentInfo{eu.geekgasm.kintrol/eu.geekgasm.kintrol.DeviceChooserActivity}: java.lang.NullPointerException: storage == null
  6. 0

    java.lang.RuntimeException: Unable to start activity ComponentInfo: java.lang.NullPointerException: storage == null

    Stack Overflow | 4 years ago | Conans
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.cloudchat/com.myapp.cloudchat.HomeScreenActivity}: java.lang.NullPointerException: storage == null

  1. bluebunnty 4 times, last 2 weeks ago
  2. serious2monkeys 6 times, last 3 months ago
  3. mukky 2 times, last 4 months ago
  4. emmanuelstroem 95 times, last 6 months ago
  5. sriharshakiran 1 times, last 7 months ago
9 unregistered visitors
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. java.lang.NullPointerException

    storage == null

    at java.util.Arrays$ArrayList.<init>()
  2. Java RT
    Arrays.asList
    1. java.util.Arrays$ArrayList.<init>(Arrays.java:38)
    2. java.util.Arrays.asList(Arrays.java:154)
    2 frames
  3. ti.modules.titanium
    PickerColumnProxy.handleMessage
    1. ti.modules.titanium.ui.widget.picker.TextWheelAdapter.<init>(TextWheelAdapter.java:28)
    2. ti.modules.titanium.ui.widget.picker.TiUISpinnerColumn.refreshNativeView(TiUISpinnerColumn.java:180)
    3. ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:63)
    4. ti.modules.titanium.ui.widget.picker.TiUISpinner.refreshColumn(TiUISpinner.java:56)
    5. ti.modules.titanium.ui.widget.picker.TiUISpinner.onColumnModelChanged(TiUISpinner.java:99)
    6. ti.modules.titanium.ui.PickerProxy.handleFireColumnModelChange(PickerProxy.java:706)
    7. ti.modules.titanium.ui.PickerProxy.fireColumnModelChange(PickerProxy.java:694)
    8. ti.modules.titanium.ui.PickerProxy.rowRemoved(PickerProxy.java:765)
    9. ti.modules.titanium.ui.PickerColumnProxy.handleRemoveRow(PickerColumnProxy.java:160)
    10. ti.modules.titanium.ui.PickerColumnProxy.handleMessage(PickerColumnProxy.java:76)
    10 frames
  4. Android Platform
    ActivityThread.main
    1. android.os.Handler.dispatchMessage(Handler.java:95)
    2. android.os.Looper.loop(Looper.java:137)
    3. android.app.ActivityThread.main(ActivityThread.java:5103)
    3 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:525)
    2 frames
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    2 frames
  7. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame