java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.AlloyHarness/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException

Appcelerator JIRA | Federico Casali | 2 years ago
  1. 0

    h5. Problem description formFactor='handheld' is not correctly applied if applied to <HeaderView> object. Depending on the target, could either be not visible or crashing the app. h5. Steps to reproduce Use the following sample code: h6. index.xml {code} <Alloy> <Window> <TableView height="80%"> <HeaderView formFactor="handheld"> <View> <Label>HeaderView Handheld</Label> </View> </HeaderView> </TableView> <View formFactor="handheld"> <Label>View Handheld</Label> </View> </Window> </Alloy> {code} h6. index.tss {code} "Window":{ backgroundColor:'white', layout:'vertical' } "Label":{ font:{ fontSize:'20dp', color:'black' } } {code} 1. Build and run on Android Tablet (tested with Google Nexus 7 4.3) Expected result: App runs. Both Headerview and View are not visible. Result: App crashes with the following error log: {code} E/AndroidRuntime( 3251): FATAL EXCEPTION: main E/AndroidRuntime( 3251): Process: com.appcelerator.AlloyHarness, PID: 3251 E/AndroidRuntime( 3251): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.AlloyHarness/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException E/AndroidRuntime( 3251): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) E/AndroidRuntime( 3251): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) E/AndroidRuntime( 3251): at android.app.ActivityThread.access$800(ActivityThread.java:135) E/AndroidRuntime( 3251): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) E/AndroidRuntime( 3251): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 3251): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime( 3251): at android.app.ActivityThread.main(ActivityThread.java:5017) E/AndroidRuntime( 3251): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 3251): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 3251): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) E/AndroidRuntime( 3251): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) E/AndroidRuntime( 3251): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 3251): Caused by: java.lang.NullPointerException E/AndroidRuntime( 3251): at ti.modules.titanium.ui.widget.tableview.TiTableView.layoutHeaderOrFooter(TiTableView.java:505) E/AndroidRuntime( 3251): at ti.modules.titanium.ui.widget.tableview.TiTableView.<init>(TiTableView.java:347) E/AndroidRuntime( 3251): at ti.modules.titanium.ui.widget.TiUITableView.processProperties(TiUITableView.java:106) E/AndroidRuntime( 3251): at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1185) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:500) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:491) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:507) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:491) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:670) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:564) E/AndroidRuntime( 3251): at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:233) E/AndroidRuntime( 3251): at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:32) E/AndroidRuntime( 3251): at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:442) E/AndroidRuntime( 3251): at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:524) E/AndroidRuntime( 3251): at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) E/AndroidRuntime( 3251): at android.app.Activity.performCreate(Activity.java:5231) E/AndroidRuntime( 3251): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) E/AndroidRuntime( 3251): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) E/AndroidRuntime( 3251): ... 11 more W/ActivityManager( 550): Force finishing activity com.appcelerator.AlloyHarness/org.appcelerator.titanium.TiActivity W/ActivityManager( 550): Force finishing activity com.appcelerator.AlloyHarness/.HarnessActivity W/ActivityManager( 550): Activity pause timeout for ActivityRecord{528b362c u0 com.appcelerator.AlloyHarness/org.appcelerator.titanium.TiActivity t16 f} W/EGL_genymotion( 1017): eglSurfaceAttrib not implemented I/Process ( 3251): Sending signal. PID: 3251 SIG: 9 W/InputDispatcher( 550): channel '528c7ea0 com.appcelerator.AlloyHarness/com.appcelerator.AlloyHarness.HarnessActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 E/InputDispatcher( 550): channel '528c7ea0 com.appcelerator.AlloyHarness/com.appcelerator.AlloyHarness.HarnessActivity (server)' ~ Channel is unrecoverably broken and will be disposed! W/audio_hw_primary( 114): out_write() limiting sleep time 69659 to 23219 I/ActivityManager( 550): Process com.appcelerator.AlloyHarness (pid 3251) has died. W/InputDispatcher( 550): Attempted to unregister already unregistered input channel '528c7ea0 com.appcelerator.AlloyHarness/com.appcelerator.AlloyHarness.HarnessActivity (server)' W/InputMethodManagerService( 550): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@52bd1b38 attribute=null, token = android.os.BinderProxy@52bca104 I/WindowState( 550): WIN DEATH: Window{528c7ea0 u0 com.appcelerator.AlloyHarness/com.appcelerator.AlloyHarness.HarnessActivity} W/audio_hw_primary( 114): out_write() limiting sleep time 46439 to 23219 W/audio_hw_primary( 114): out_write() limiting sleep time 34828 to 23219 {code} 2. Build run on iOS tablet Result: app runs. <Headerview> and <View> are not visible as expected 3. Build run on Android and iOS handheld Result: app runs. <Headerview> however is not displayed, while <View> is correctly displayed as expected. Expected result: <Headerview> should be displayed.

    Appcelerator JIRA | 2 years ago | Federico Casali
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.AlloyHarness/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException
  2. 0

    h5. Problem description formFactor='handheld' is not correctly applied if applied to <HeaderView> object. Depending on the target, could either be not visible or crashing the app. h5. Steps to reproduce Use the following sample code: h6. index.xml {code} <Alloy> <Window> <TableView height="80%"> <HeaderView formFactor="handheld"> <View> <Label>HeaderView Handheld</Label> </View> </HeaderView> </TableView> <View formFactor="handheld"> <Label>View Handheld</Label> </View> </Window> </Alloy> {code} h6. index.tss {code} "Window":{ backgroundColor:'white', layout:'vertical' } "Label":{ font:{ fontSize:'20dp', color:'black' } } {code} 1. Build and run on Android Tablet (tested with Google Nexus 7 4.3) Expected result: App runs. Both Headerview and View are not visible. Result: App crashes with the following error log: {code} E/AndroidRuntime( 3251): FATAL EXCEPTION: main E/AndroidRuntime( 3251): Process: com.appcelerator.AlloyHarness, PID: 3251 E/AndroidRuntime( 3251): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.AlloyHarness/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException E/AndroidRuntime( 3251): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) E/AndroidRuntime( 3251): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) E/AndroidRuntime( 3251): at android.app.ActivityThread.access$800(ActivityThread.java:135) E/AndroidRuntime( 3251): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) E/AndroidRuntime( 3251): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 3251): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime( 3251): at android.app.ActivityThread.main(ActivityThread.java:5017) E/AndroidRuntime( 3251): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 3251): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 3251): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) E/AndroidRuntime( 3251): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) E/AndroidRuntime( 3251): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 3251): Caused by: java.lang.NullPointerException E/AndroidRuntime( 3251): at ti.modules.titanium.ui.widget.tableview.TiTableView.layoutHeaderOrFooter(TiTableView.java:505) E/AndroidRuntime( 3251): at ti.modules.titanium.ui.widget.tableview.TiTableView.<init>(TiTableView.java:347) E/AndroidRuntime( 3251): at ti.modules.titanium.ui.widget.TiUITableView.processProperties(TiUITableView.java:106) E/AndroidRuntime( 3251): at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1185) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:500) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:491) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:507) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:491) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:670) E/AndroidRuntime( 3251): at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:564) E/AndroidRuntime( 3251): at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:233) E/AndroidRuntime( 3251): at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:32) E/AndroidRuntime( 3251): at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:442) E/AndroidRuntime( 3251): at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:524) E/AndroidRuntime( 3251): at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) E/AndroidRuntime( 3251): at android.app.Activity.performCreate(Activity.java:5231) E/AndroidRuntime( 3251): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) E/AndroidRuntime( 3251): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) E/AndroidRuntime( 3251): ... 11 more W/ActivityManager( 550): Force finishing activity com.appcelerator.AlloyHarness/org.appcelerator.titanium.TiActivity W/ActivityManager( 550): Force finishing activity com.appcelerator.AlloyHarness/.HarnessActivity W/ActivityManager( 550): Activity pause timeout for ActivityRecord{528b362c u0 com.appcelerator.AlloyHarness/org.appcelerator.titanium.TiActivity t16 f} W/EGL_genymotion( 1017): eglSurfaceAttrib not implemented I/Process ( 3251): Sending signal. PID: 3251 SIG: 9 W/InputDispatcher( 550): channel '528c7ea0 com.appcelerator.AlloyHarness/com.appcelerator.AlloyHarness.HarnessActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 E/InputDispatcher( 550): channel '528c7ea0 com.appcelerator.AlloyHarness/com.appcelerator.AlloyHarness.HarnessActivity (server)' ~ Channel is unrecoverably broken and will be disposed! W/audio_hw_primary( 114): out_write() limiting sleep time 69659 to 23219 I/ActivityManager( 550): Process com.appcelerator.AlloyHarness (pid 3251) has died. W/InputDispatcher( 550): Attempted to unregister already unregistered input channel '528c7ea0 com.appcelerator.AlloyHarness/com.appcelerator.AlloyHarness.HarnessActivity (server)' W/InputMethodManagerService( 550): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@52bd1b38 attribute=null, token = android.os.BinderProxy@52bca104 I/WindowState( 550): WIN DEATH: Window{528c7ea0 u0 com.appcelerator.AlloyHarness/com.appcelerator.AlloyHarness.HarnessActivity} W/audio_hw_primary( 114): out_write() limiting sleep time 46439 to 23219 W/audio_hw_primary( 114): out_write() limiting sleep time 34828 to 23219 {code} 2. Build run on iOS tablet Result: app runs. <Headerview> and <View> are not visible as expected 3. Build run on Android and iOS handheld Result: app runs. <Headerview> however is not displayed, while <View> is correctly displayed as expected. Expected result: <Headerview> should be displayed.

    Appcelerator JIRA | 2 years ago | Federico Casali
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.AlloyHarness/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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

      No message provided

      at ti.modules.titanium.ui.widget.tableview.TiTableView.layoutHeaderOrFooter()
    2. ti.modules.titanium
      TiUITableView.processProperties
      1. ti.modules.titanium.ui.widget.tableview.TiTableView.layoutHeaderOrFooter(TiTableView.java:505)
      2. ti.modules.titanium.ui.widget.tableview.TiTableView.<init>(TiTableView.java:347)
      3. ti.modules.titanium.ui.widget.TiUITableView.processProperties(TiUITableView.java:106)
      3 frames
    3. org.appcelerator.kroll
      KrollProxy.setModelListener
      1. org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1185)
      1 frame
    4. org.appcelerator.titanium
      TiViewProxy.add
      1. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:500)
      2. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:491)
      3. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469)
      4. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:507)
      5. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:491)
      6. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469)
      7. org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:670)
      8. org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:564)
      8 frames
    5. ti.modules.titanium
      WindowProxy.windowCreated
      1. ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:233)
      1 frame
    6. org.appcelerator.titanium
      TiActivity.onCreate
      1. org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:32)
      2. org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:442)
      3. org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:524)
      4. org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
      4 frames
    7. Android Platform
      ActivityThread.main
      1. android.app.Activity.performCreate(Activity.java:5231)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
      5. android.app.ActivityThread.access$800(ActivityThread.java:135)
      6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
      7. android.os.Handler.dispatchMessage(Handler.java:102)
      8. android.os.Looper.loop(Looper.java:136)
      9. android.app.ActivityThread.main(ActivityThread.java:5017)
      9 frames
    8. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:515)
      2 frames
    9. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
      2 frames
    10. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame