java.lang.NullPointerException

Appcelerator JIRA | Ivan Skugor | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hi all. Let's say that we have heavyweight window that is opened. Calling "open" method of that window crashes application (exception message says: Unable to start activity). Here is source code that demonstrates the issue: {code:javascript|title=app.js} var win = Ti.UI.createWindow({ modal: true, backgroundColor: '#c96' }); win.open(); win.open(); {code} {code:title=log} 462 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 462 AndroidRuntime D CheckJNI is ON 462 AndroidRuntime D --- registering native functions --- 96 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x 10000000 cmp=com.testing.testing7/.Testing7Activity } 462 AndroidRuntime D Shutting down VM 462 dalvikvm D Debugger has detached; object registry had 1 entries 462 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed 96 ActivityManager I Start proc com.testing.testing7 for activity com.testing.testing7/.Testing7Activity: pid=471 uid=10040 g ids={1015, 3003} 471 TiApplication I (main) [1,1] checkpoint, app created. 471 dalvikvm D GC_FOR_MALLOC freed 2825 objects / 315088 bytes in 68ms 471 TiApplication I (main) [650,651] Titanium 1.7.1 (2011/06/17 00:13 293a6d...) 471 TiDeployData D (main) [47,698] Read deploy data: {"debuggerPort":-1,"debuggerEnabled":false,"fastdevPort":60465} 471 TiDbHelper I (main) [115,813] No value in database for platform key: 'unique_machine_id' returning supplied default ' ' 471 TiDbHelper I (main) [18,831] No value in database for platform key: 'hardware_machine_id' returning supplied default '' 471 TiPlatformHelper E (main) [1,832] renaming ID 471 TiRootActivity I (main) [1,1] checkpoint, on root activity create, savedInstanceState: null 471 TiAnalyticsDb D (main) [22,23] Creating Database tianalytics.db 471 TiAnalyticsDb I (main) [4,27] Upgrading Database from 1 to 4 471 TiApplication E (main) [320,347] APP PROXY: [Ti.App] 471 dalvikvm D GC_FOR_MALLOC freed 4421 objects / 348992 bytes in 62ms 471 TiCommonContactsApi D (main) [92,439] Using newer contacts api. Android SDK level: 8 471 global I Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 471 dalvikvm D GC_FOR_MALLOC freed 5038 objects / 349864 bytes in 158ms 96 ActivityManager I Process android.process.acore (pid 245) has died. 38 qemud D fdhandler_accept_event: accepting on fd 10 38 qemud D created client 0x150b8 listening on fd 15 38 qemud D client_fd_receive: attempting registration for service 'sensors' 38 qemud D client_fd_receive: -> received channel id 8 38 qemud D client_registration: registration succeeded for client 8 38 qemud D fdhandler_event: disconnect on fd 15 471 TiFastDev D (kroll$1: app://app.js) [857,1296] Enabling Fastdev on port 60465 471 TiFastDev D (kroll$1: app://app.js) [19,1315] sent tokens successfully 471 TiFastDev D (kroll$1: app://app.js) [2,1317] Fastdev session handshake succesful. 471 TiFastDev D (kroll$1: app://app.js) [53,1370] sent tokens successfully 471 KrollContext D (kroll$1: app://app.js) [4,1374] Running evaluated script: file:///android_asset/Resources/app.js 471 global I Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 471 dalvikvm D GC_FOR_MALLOC freed 7232 objects / 482912 bytes in 76ms 96 ActivityManager I Starting activity: Intent { cmp=com.testing.testing7/org.appcelerator.titanium.TiModalActivity (has extr as) } 471 global I Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 471 dalvikvm D GC_FOR_MALLOC freed 5946 objects / 401024 bytes in 61ms 471 AndroidRuntime D Shutting down VM 471 dalvikvm W threadid=1: thread exiting with uncaught exception (group=0x4001d800) 471 TiUncaughtHandler E (main) [707,2081] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to sta rt activity ComponentInfo{com.testing.testing7/com.testing.testing7.Testing7Activity}: java.lang.NullPoi nterException; Titanium 1.7.1,2011/06/17 00:13,293a6d... 471 TiUncaughtHandler E java.lang.RuntimeException: Unable to start activity ComponentInfo{com.testing.testing7/com.testing.test ing7.Testing7Activity}: java.lang.NullPointerException 471 TiUncaughtHandler E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 471 TiUncaughtHandler E at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 471 TiUncaughtHandler E at android.app.ActivityThread.access$2300(ActivityThread.java:125) 471 TiUncaughtHandler E at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 471 TiUncaughtHandler E at android.os.Handler.dispatchMessage(Handler.java:99) 471 TiUncaughtHandler E at android.os.Looper.loop(Looper.java:123) 471 TiUncaughtHandler E at android.app.ActivityThread.main(ActivityThread.java:4627) 471 TiUncaughtHandler E at java.lang.reflect.Method.invokeNative(Native Method) 471 TiUncaughtHandler E at java.lang.reflect.Method.invoke(Method.java:521) 471 TiUncaughtHandler E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 471 TiUncaughtHandler E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 471 TiUncaughtHandler E at dalvik.system.NativeStart.main(Native Method) 471 TiUncaughtHandler E Caused by: java.lang.NullPointerException 471 TiUncaughtHandler E at android.content.ComponentName.<init>(ComponentName.java:75) 471 TiUncaughtHandler E at android.content.Intent.<init>(Intent.java:2678) 471 TiUncaughtHandler E at ti.modules.titanium.ui.TiUIWindow.createIntent(TiUIWindow.java:527) 471 TiUncaughtHandler E at ti.modules.titanium.ui.TiUIWindow.createNewActivity(TiUIWindow.java:194) 471 TiUncaughtHandler E at ti.modules.titanium.ui.TiUIWindow.<init>(TiUIWindow.java:105) 471 TiUncaughtHandler E at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:99) 471 TiUncaughtHandler E at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:86) 471 TiUncaughtHandler E at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:86) 471 TiUncaughtHandler E at android.os.Handler.dispatchMessage(Handler.java:95) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiMessageQueue.dispatchMessage(TiMessageQueue.java:320) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiMessageQueue.dispatchPendingMessages(TiMessageQueue.java:304) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiMessageQueue$2.getResult(TiMessageQueue.java:172) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiMessageQueue.sendBlockingMessage(TiMessageQueue.java:196) 471 TiUncaughtHandler E at org.appcelerator.titanium.kroll.KrollContext.evalFile(KrollContext.java:277) 471 TiUncaughtHandler E at org.appcelerator.titanium.kroll.KrollBridge.evalFile(KrollBridge.java:130) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:190) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:210) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:71) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:112) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:294) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:102) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:38) 471 TiUncaughtHandler E at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 471 TiUncaughtHandler E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 471 TiUncaughtHandler E ... 11 more 471 AndroidRuntime E FATAL EXCEPTION: main 471 AndroidRuntime E java.lang.RuntimeException: Unable to start activity ComponentInfo{com.testing.testing7/com.testing.test ing7.Testing7Activity}: java.lang.NullPointerException 471 AndroidRuntime E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 471 AndroidRuntime E at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 471 AndroidRuntime E at android.app.ActivityThread.access$2300(ActivityThread.java:125) 471 AndroidRuntime E at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 471 AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:99) 471 AndroidRuntime E at android.os.Looper.loop(Looper.java:123) 471 AndroidRuntime E at android.app.ActivityThread.main(ActivityThread.java:4627) 471 AndroidRuntime E at java.lang.reflect.Method.invokeNative(Native Method) 471 AndroidRuntime E at java.lang.reflect.Method.invoke(Method.java:521) 471 AndroidRuntime E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 471 AndroidRuntime E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 471 AndroidRuntime E at dalvik.system.NativeStart.main(Native Method) 471 AndroidRuntime E Caused by: java.lang.NullPointerException 471 AndroidRuntime E at android.content.ComponentName.<init>(ComponentName.java:75) 471 AndroidRuntime E at android.content.Intent.<init>(Intent.java:2678) 471 AndroidRuntime E at ti.modules.titanium.ui.TiUIWindow.createIntent(TiUIWindow.java:527) 471 AndroidRuntime E at ti.modules.titanium.ui.TiUIWindow.createNewActivity(TiUIWindow.java:194) 471 AndroidRuntime E at ti.modules.titanium.ui.TiUIWindow.<init>(TiUIWindow.java:105) 471 AndroidRuntime E at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:99) 471 AndroidRuntime E at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:86) 471 AndroidRuntime E at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:86) 471 AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:95) 471 AndroidRuntime E at org.appcelerator.titanium.TiMessageQueue.dispatchMessage(TiMessageQueue.java:320) 471 AndroidRuntime E at org.appcelerator.titanium.TiMessageQueue.dispatchPendingMessages(TiMessageQueue.java:304) 471 AndroidRuntime E at org.appcelerator.titanium.TiMessageQueue$2.getResult(TiMessageQueue.java:172) 471 AndroidRuntime E at org.appcelerator.titanium.TiMessageQueue.sendBlockingMessage(TiMessageQueue.java:196) 471 AndroidRuntime E at org.appcelerator.titanium.kroll.KrollContext.evalFile(KrollContext.java:277) 471 AndroidRuntime E at org.appcelerator.titanium.kroll.KrollBridge.evalFile(KrollBridge.java:130) 471 AndroidRuntime E at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:190) 471 AndroidRuntime E at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:210) 471 AndroidRuntime E at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:71) 471 AndroidRuntime E at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:112) 471 AndroidRuntime E at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:294) 471 AndroidRuntime E at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:102) 471 AndroidRuntime E at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:38) 471 AndroidRuntime E at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 471 AndroidRuntime E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 471 AndroidRuntime E ... 11 more 96 ARMAssembler I generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x375890:0x37594c] in 328 2379 ns 96 ActivityManager W Activity pause timeout for HistoryRecord{44e77150 com.testing.testing7/.Testing7Activity} 96 ActivityManager W Activity idle timeout for HistoryRecord{44e77150 com.testing.testing7/.Testing7Activity} 96 ActivityManager W Activity idle timeout for HistoryRecord{44fdf3d0 com.testing.testing7/org.appcelerator.titanium.TiModalA ctivity} 265 dalvikvm D GC_EXPLICIT freed 2169 objects / 110744 bytes in 76ms 96 ActivityManager W Timeout executing service: ServiceRecord{45198b90 com.testing.testing7/org.appcelerator.titanium.analyti cs.TiAnalyticsService} 96 ActivityManager I Crashing app skipping ANR: ProcessRecord{44fa76f8 471:com.testing.testing7/10040} Executing service com. testing.testing7/org.appcelerator.titanium.analytics.TiAnalyticsService {code} Comment out "modal: true" and it won't crash. {code:javascript|title=app.js} var win = Ti.UI.createWindow({ // modal: true, backgroundColor: '#c96' }); win.open(); win.open(); {code} {code:title=log} 492 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 492 AndroidRuntime D CheckJNI is ON 492 AndroidRuntime D --- registering native functions --- 96 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x 10000000 cmp=com.testing.testing7/.Testing7Activity } 492 AndroidRuntime D Shutting down VM 492 dalvikvm D Debugger has detached; object registry had 1 entries 96 ActivityManager I Start proc com.testing.testing7 for activity com.testing.testing7/.Testing7Activity: pid=498 uid=10040 g ids={1015, 3003} 492 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed 33 dalvikvm D GC_EXPLICIT freed 285 objects / 10824 bytes in 587ms 33 dalvikvm D GC_EXPLICIT freed 47 objects / 2080 bytes in 138ms 33 dalvikvm D GC_EXPLICIT freed 2 objects / 64 bytes in 338ms 498 TiApplication I (main) [0,0] checkpoint, app created. 96 NotificationService W Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@450064d0 in packag e com.testing.testing7 96 ActivityManager W setProcessForeground called on unknown pid: 471 498 dalvikvm D GC_FOR_MALLOC freed 2852 objects / 316112 bytes in 67ms 498 TiApplication I (main) [671,671] Titanium 1.7.1 (2011/06/17 00:13 293a6d...) 498 TiDeployData D (main) [55,726] Read deploy data: {"debuggerPort":-1,"debuggerEnabled":false,"fastdevPort":60465} 498 TiPlatformHelper E (main) [81,807] renaming ID 498 TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: null 498 TiApplication E (main) [201,201] APP PROXY: [Ti.App] 498 TiCommonContactsApi D (main) [21,222] Using newer contacts api. Android SDK level: 8 498 dalvikvm D GC_FOR_MALLOC freed 4750 objects / 341744 bytes in 68ms 498 global I Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 498 dalvikvm D GC_FOR_MALLOC freed 4743 objects / 332640 bytes in 55ms 38 qemud D fdhandler_accept_event: accepting on fd 10 38 qemud D created client 0x150b8 listening on fd 15 38 qemud D client_fd_receive: attempting registration for service 'sensors' 38 qemud D client_fd_receive: -> received channel id 9 38 qemud D client_registration: registration succeeded for client 9 38 qemud D fdhandler_event: disconnect on fd 15 498 TiFastDev D (kroll$1: app://app.js) [566,788] Enabling Fastdev on port 60465 498 TiFastDev D (kroll$1: app://app.js) [18,806] sent tokens successfully 498 TiFastDev D (kroll$1: app://app.js) [3,809] Fastdev session handshake succesful. 498 TiFastDev D (kroll$1: app://app.js) [61,870] sent tokens successfully 498 KrollContext D (kroll$1: app://app.js) [3,873] Running evaluated script: file:///android_asset/Resources/app.js 498 TiRootActivity I (main) [0,0] checkpoint, on root activity resume. context = org.appcelerator.titanium.TiContext@44f5c170 498 TiAnalyticsSvc I (main) [43,43] Send already in progress, skipping intent 498 TiAnalyticsSvc W (Thread-11) [2,45] Analytics Service Started 498 TiAnalyticsSvc I (main) [15,60] Send already in progress, skipping intent 498 TiAnalyticsSvc W (Thread-12) [66,126] Analytics Service Started 498 TiAnalyticsSvc W (Thread-13) [1,127] Analytics Service Started 96 ActivityManager I Displayed activity com.testing.testing7/.Testing7Activity: 4625 ms (total 189518 ms) 498 dalvikvm D GC_FOR_MALLOC freed 6864 objects / 521216 bytes in 275ms 498 TiAnalyticsSvc I (Thread-12) [1643,1770] Sending 4 analytics events. 498 TiAnalyticsSvc I (Thread-11) [16,1786] Sending 4 analytics events. 498 TiAnalyticsSvc I (Thread-13) [17,1803] Sending 4 analytics events. 498 dalvikvm D GC_FOR_MALLOC freed 1025 objects / 205936 bytes in 80ms 498 dalvikvm D GC_FOR_MALLOC freed 5307 objects / 306664 bytes in 82ms 498 TiAnalyticsSvc W (Thread-11) [1431,3234] Stopping Analytics Service 498 dalvikvm D GC_FOR_MALLOC freed 4190 objects / 285272 bytes in 89ms 498 dalvikvm D GC_FOR_MALLOC freed 5038 objects / 450584 bytes in 63ms 498 NativeCrypto D Freeing OpenSSL session 498 TiAnalyticsSvc W (Thread-12) [718,3952] Stopping Analytics Service 498 TiAnalyticsSvc W (Thread-12) [4,3956] Expected to be in a sending state. Sending was already false. 498 TiAnalyticsSvc W (Thread-13) [149,4105] Stopping Analytics Service 498 TiAnalyticsSvc W (Thread-13) [13,4118] Expected to be in a sending state. Sending was already false. 265 dalvikvm D GC_EXPLICIT freed 411 objects / 23200 bytes in 72ms {code} If you need more info, please let me know.

    Appcelerator JIRA | 6 years ago | Ivan Skugor
    java.lang.NullPointerException
  2. 0

    Hi all. Let's say that we have heavyweight window that is opened. Calling "open" method of that window crashes application (exception message says: Unable to start activity). Here is source code that demonstrates the issue: {code:javascript|title=app.js} var win = Ti.UI.createWindow({ modal: true, backgroundColor: '#c96' }); win.open(); win.open(); {code} {code:title=log} 462 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 462 AndroidRuntime D CheckJNI is ON 462 AndroidRuntime D --- registering native functions --- 96 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x 10000000 cmp=com.testing.testing7/.Testing7Activity } 462 AndroidRuntime D Shutting down VM 462 dalvikvm D Debugger has detached; object registry had 1 entries 462 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed 96 ActivityManager I Start proc com.testing.testing7 for activity com.testing.testing7/.Testing7Activity: pid=471 uid=10040 g ids={1015, 3003} 471 TiApplication I (main) [1,1] checkpoint, app created. 471 dalvikvm D GC_FOR_MALLOC freed 2825 objects / 315088 bytes in 68ms 471 TiApplication I (main) [650,651] Titanium 1.7.1 (2011/06/17 00:13 293a6d...) 471 TiDeployData D (main) [47,698] Read deploy data: {"debuggerPort":-1,"debuggerEnabled":false,"fastdevPort":60465} 471 TiDbHelper I (main) [115,813] No value in database for platform key: 'unique_machine_id' returning supplied default ' ' 471 TiDbHelper I (main) [18,831] No value in database for platform key: 'hardware_machine_id' returning supplied default '' 471 TiPlatformHelper E (main) [1,832] renaming ID 471 TiRootActivity I (main) [1,1] checkpoint, on root activity create, savedInstanceState: null 471 TiAnalyticsDb D (main) [22,23] Creating Database tianalytics.db 471 TiAnalyticsDb I (main) [4,27] Upgrading Database from 1 to 4 471 TiApplication E (main) [320,347] APP PROXY: [Ti.App] 471 dalvikvm D GC_FOR_MALLOC freed 4421 objects / 348992 bytes in 62ms 471 TiCommonContactsApi D (main) [92,439] Using newer contacts api. Android SDK level: 8 471 global I Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 471 dalvikvm D GC_FOR_MALLOC freed 5038 objects / 349864 bytes in 158ms 96 ActivityManager I Process android.process.acore (pid 245) has died. 38 qemud D fdhandler_accept_event: accepting on fd 10 38 qemud D created client 0x150b8 listening on fd 15 38 qemud D client_fd_receive: attempting registration for service 'sensors' 38 qemud D client_fd_receive: -> received channel id 8 38 qemud D client_registration: registration succeeded for client 8 38 qemud D fdhandler_event: disconnect on fd 15 471 TiFastDev D (kroll$1: app://app.js) [857,1296] Enabling Fastdev on port 60465 471 TiFastDev D (kroll$1: app://app.js) [19,1315] sent tokens successfully 471 TiFastDev D (kroll$1: app://app.js) [2,1317] Fastdev session handshake succesful. 471 TiFastDev D (kroll$1: app://app.js) [53,1370] sent tokens successfully 471 KrollContext D (kroll$1: app://app.js) [4,1374] Running evaluated script: file:///android_asset/Resources/app.js 471 global I Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 471 dalvikvm D GC_FOR_MALLOC freed 7232 objects / 482912 bytes in 76ms 96 ActivityManager I Starting activity: Intent { cmp=com.testing.testing7/org.appcelerator.titanium.TiModalActivity (has extr as) } 471 global I Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 471 dalvikvm D GC_FOR_MALLOC freed 5946 objects / 401024 bytes in 61ms 471 AndroidRuntime D Shutting down VM 471 dalvikvm W threadid=1: thread exiting with uncaught exception (group=0x4001d800) 471 TiUncaughtHandler E (main) [707,2081] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to sta rt activity ComponentInfo{com.testing.testing7/com.testing.testing7.Testing7Activity}: java.lang.NullPoi nterException; Titanium 1.7.1,2011/06/17 00:13,293a6d... 471 TiUncaughtHandler E java.lang.RuntimeException: Unable to start activity ComponentInfo{com.testing.testing7/com.testing.test ing7.Testing7Activity}: java.lang.NullPointerException 471 TiUncaughtHandler E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 471 TiUncaughtHandler E at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 471 TiUncaughtHandler E at android.app.ActivityThread.access$2300(ActivityThread.java:125) 471 TiUncaughtHandler E at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 471 TiUncaughtHandler E at android.os.Handler.dispatchMessage(Handler.java:99) 471 TiUncaughtHandler E at android.os.Looper.loop(Looper.java:123) 471 TiUncaughtHandler E at android.app.ActivityThread.main(ActivityThread.java:4627) 471 TiUncaughtHandler E at java.lang.reflect.Method.invokeNative(Native Method) 471 TiUncaughtHandler E at java.lang.reflect.Method.invoke(Method.java:521) 471 TiUncaughtHandler E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 471 TiUncaughtHandler E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 471 TiUncaughtHandler E at dalvik.system.NativeStart.main(Native Method) 471 TiUncaughtHandler E Caused by: java.lang.NullPointerException 471 TiUncaughtHandler E at android.content.ComponentName.<init>(ComponentName.java:75) 471 TiUncaughtHandler E at android.content.Intent.<init>(Intent.java:2678) 471 TiUncaughtHandler E at ti.modules.titanium.ui.TiUIWindow.createIntent(TiUIWindow.java:527) 471 TiUncaughtHandler E at ti.modules.titanium.ui.TiUIWindow.createNewActivity(TiUIWindow.java:194) 471 TiUncaughtHandler E at ti.modules.titanium.ui.TiUIWindow.<init>(TiUIWindow.java:105) 471 TiUncaughtHandler E at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:99) 471 TiUncaughtHandler E at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:86) 471 TiUncaughtHandler E at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:86) 471 TiUncaughtHandler E at android.os.Handler.dispatchMessage(Handler.java:95) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiMessageQueue.dispatchMessage(TiMessageQueue.java:320) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiMessageQueue.dispatchPendingMessages(TiMessageQueue.java:304) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiMessageQueue$2.getResult(TiMessageQueue.java:172) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiMessageQueue.sendBlockingMessage(TiMessageQueue.java:196) 471 TiUncaughtHandler E at org.appcelerator.titanium.kroll.KrollContext.evalFile(KrollContext.java:277) 471 TiUncaughtHandler E at org.appcelerator.titanium.kroll.KrollBridge.evalFile(KrollBridge.java:130) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:190) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:210) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:71) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:112) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:294) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:102) 471 TiUncaughtHandler E at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:38) 471 TiUncaughtHandler E at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 471 TiUncaughtHandler E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 471 TiUncaughtHandler E ... 11 more 471 AndroidRuntime E FATAL EXCEPTION: main 471 AndroidRuntime E java.lang.RuntimeException: Unable to start activity ComponentInfo{com.testing.testing7/com.testing.test ing7.Testing7Activity}: java.lang.NullPointerException 471 AndroidRuntime E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 471 AndroidRuntime E at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 471 AndroidRuntime E at android.app.ActivityThread.access$2300(ActivityThread.java:125) 471 AndroidRuntime E at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 471 AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:99) 471 AndroidRuntime E at android.os.Looper.loop(Looper.java:123) 471 AndroidRuntime E at android.app.ActivityThread.main(ActivityThread.java:4627) 471 AndroidRuntime E at java.lang.reflect.Method.invokeNative(Native Method) 471 AndroidRuntime E at java.lang.reflect.Method.invoke(Method.java:521) 471 AndroidRuntime E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 471 AndroidRuntime E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 471 AndroidRuntime E at dalvik.system.NativeStart.main(Native Method) 471 AndroidRuntime E Caused by: java.lang.NullPointerException 471 AndroidRuntime E at android.content.ComponentName.<init>(ComponentName.java:75) 471 AndroidRuntime E at android.content.Intent.<init>(Intent.java:2678) 471 AndroidRuntime E at ti.modules.titanium.ui.TiUIWindow.createIntent(TiUIWindow.java:527) 471 AndroidRuntime E at ti.modules.titanium.ui.TiUIWindow.createNewActivity(TiUIWindow.java:194) 471 AndroidRuntime E at ti.modules.titanium.ui.TiUIWindow.<init>(TiUIWindow.java:105) 471 AndroidRuntime E at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:99) 471 AndroidRuntime E at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:86) 471 AndroidRuntime E at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:86) 471 AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:95) 471 AndroidRuntime E at org.appcelerator.titanium.TiMessageQueue.dispatchMessage(TiMessageQueue.java:320) 471 AndroidRuntime E at org.appcelerator.titanium.TiMessageQueue.dispatchPendingMessages(TiMessageQueue.java:304) 471 AndroidRuntime E at org.appcelerator.titanium.TiMessageQueue$2.getResult(TiMessageQueue.java:172) 471 AndroidRuntime E at org.appcelerator.titanium.TiMessageQueue.sendBlockingMessage(TiMessageQueue.java:196) 471 AndroidRuntime E at org.appcelerator.titanium.kroll.KrollContext.evalFile(KrollContext.java:277) 471 AndroidRuntime E at org.appcelerator.titanium.kroll.KrollBridge.evalFile(KrollBridge.java:130) 471 AndroidRuntime E at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:190) 471 AndroidRuntime E at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:210) 471 AndroidRuntime E at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:71) 471 AndroidRuntime E at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:112) 471 AndroidRuntime E at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:294) 471 AndroidRuntime E at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:102) 471 AndroidRuntime E at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:38) 471 AndroidRuntime E at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 471 AndroidRuntime E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 471 AndroidRuntime E ... 11 more 96 ARMAssembler I generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x375890:0x37594c] in 328 2379 ns 96 ActivityManager W Activity pause timeout for HistoryRecord{44e77150 com.testing.testing7/.Testing7Activity} 96 ActivityManager W Activity idle timeout for HistoryRecord{44e77150 com.testing.testing7/.Testing7Activity} 96 ActivityManager W Activity idle timeout for HistoryRecord{44fdf3d0 com.testing.testing7/org.appcelerator.titanium.TiModalA ctivity} 265 dalvikvm D GC_EXPLICIT freed 2169 objects / 110744 bytes in 76ms 96 ActivityManager W Timeout executing service: ServiceRecord{45198b90 com.testing.testing7/org.appcelerator.titanium.analyti cs.TiAnalyticsService} 96 ActivityManager I Crashing app skipping ANR: ProcessRecord{44fa76f8 471:com.testing.testing7/10040} Executing service com. testing.testing7/org.appcelerator.titanium.analytics.TiAnalyticsService {code} Comment out "modal: true" and it won't crash. {code:javascript|title=app.js} var win = Ti.UI.createWindow({ // modal: true, backgroundColor: '#c96' }); win.open(); win.open(); {code} {code:title=log} 492 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 492 AndroidRuntime D CheckJNI is ON 492 AndroidRuntime D --- registering native functions --- 96 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x 10000000 cmp=com.testing.testing7/.Testing7Activity } 492 AndroidRuntime D Shutting down VM 492 dalvikvm D Debugger has detached; object registry had 1 entries 96 ActivityManager I Start proc com.testing.testing7 for activity com.testing.testing7/.Testing7Activity: pid=498 uid=10040 g ids={1015, 3003} 492 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed 33 dalvikvm D GC_EXPLICIT freed 285 objects / 10824 bytes in 587ms 33 dalvikvm D GC_EXPLICIT freed 47 objects / 2080 bytes in 138ms 33 dalvikvm D GC_EXPLICIT freed 2 objects / 64 bytes in 338ms 498 TiApplication I (main) [0,0] checkpoint, app created. 96 NotificationService W Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@450064d0 in packag e com.testing.testing7 96 ActivityManager W setProcessForeground called on unknown pid: 471 498 dalvikvm D GC_FOR_MALLOC freed 2852 objects / 316112 bytes in 67ms 498 TiApplication I (main) [671,671] Titanium 1.7.1 (2011/06/17 00:13 293a6d...) 498 TiDeployData D (main) [55,726] Read deploy data: {"debuggerPort":-1,"debuggerEnabled":false,"fastdevPort":60465} 498 TiPlatformHelper E (main) [81,807] renaming ID 498 TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: null 498 TiApplication E (main) [201,201] APP PROXY: [Ti.App] 498 TiCommonContactsApi D (main) [21,222] Using newer contacts api. Android SDK level: 8 498 dalvikvm D GC_FOR_MALLOC freed 4750 objects / 341744 bytes in 68ms 498 global I Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 498 dalvikvm D GC_FOR_MALLOC freed 4743 objects / 332640 bytes in 55ms 38 qemud D fdhandler_accept_event: accepting on fd 10 38 qemud D created client 0x150b8 listening on fd 15 38 qemud D client_fd_receive: attempting registration for service 'sensors' 38 qemud D client_fd_receive: -> received channel id 9 38 qemud D client_registration: registration succeeded for client 9 38 qemud D fdhandler_event: disconnect on fd 15 498 TiFastDev D (kroll$1: app://app.js) [566,788] Enabling Fastdev on port 60465 498 TiFastDev D (kroll$1: app://app.js) [18,806] sent tokens successfully 498 TiFastDev D (kroll$1: app://app.js) [3,809] Fastdev session handshake succesful. 498 TiFastDev D (kroll$1: app://app.js) [61,870] sent tokens successfully 498 KrollContext D (kroll$1: app://app.js) [3,873] Running evaluated script: file:///android_asset/Resources/app.js 498 TiRootActivity I (main) [0,0] checkpoint, on root activity resume. context = org.appcelerator.titanium.TiContext@44f5c170 498 TiAnalyticsSvc I (main) [43,43] Send already in progress, skipping intent 498 TiAnalyticsSvc W (Thread-11) [2,45] Analytics Service Started 498 TiAnalyticsSvc I (main) [15,60] Send already in progress, skipping intent 498 TiAnalyticsSvc W (Thread-12) [66,126] Analytics Service Started 498 TiAnalyticsSvc W (Thread-13) [1,127] Analytics Service Started 96 ActivityManager I Displayed activity com.testing.testing7/.Testing7Activity: 4625 ms (total 189518 ms) 498 dalvikvm D GC_FOR_MALLOC freed 6864 objects / 521216 bytes in 275ms 498 TiAnalyticsSvc I (Thread-12) [1643,1770] Sending 4 analytics events. 498 TiAnalyticsSvc I (Thread-11) [16,1786] Sending 4 analytics events. 498 TiAnalyticsSvc I (Thread-13) [17,1803] Sending 4 analytics events. 498 dalvikvm D GC_FOR_MALLOC freed 1025 objects / 205936 bytes in 80ms 498 dalvikvm D GC_FOR_MALLOC freed 5307 objects / 306664 bytes in 82ms 498 TiAnalyticsSvc W (Thread-11) [1431,3234] Stopping Analytics Service 498 dalvikvm D GC_FOR_MALLOC freed 4190 objects / 285272 bytes in 89ms 498 dalvikvm D GC_FOR_MALLOC freed 5038 objects / 450584 bytes in 63ms 498 NativeCrypto D Freeing OpenSSL session 498 TiAnalyticsSvc W (Thread-12) [718,3952] Stopping Analytics Service 498 TiAnalyticsSvc W (Thread-12) [4,3956] Expected to be in a sending state. Sending was already false. 498 TiAnalyticsSvc W (Thread-13) [149,4105] Stopping Analytics Service 498 TiAnalyticsSvc W (Thread-13) [13,4118] Expected to be in a sending state. Sending was already false. 265 dalvikvm D GC_EXPLICIT freed 411 objects / 23200 bytes in 72ms {code} If you need more info, please let me know.

    Appcelerator JIRA | 6 years ago | Ivan Skugor
    java.lang.NullPointerException
  3. 0

    h4.NOTE: This is an intermittent issue. I could reproduce it 4-5 times with sdk 3.2.3.v20140422101718 & once with sdk 3.2.2.GA. So I guess this is not regression. h5. Description: 1. Create an app alloy or classic. 2. Set a breakpoint in the app for debug. 3. Debug it on device. h5. Actual Result: 1. The app crashes and we get "the app has stopped working" message. 2. Alan saw some timing issue while opening the window: {code} @Override protected void handleOpen(KrollDict options) { Activity topActivity = TiApplication.getAppCurrentActivity(); Intent intent = new Intent(topActivity, TiActivity.class); //It's is crashing on this line (198) where topActivity is null fillIntent(topActivity, intent); {code} 3. My console logs: {code} E/TiApplication( 9518): java.lang.RuntimeException: Unable to pause activity {com.app.xalloy/com.app.xalloy.XalloyActivity}: java.lang.NullPointerException E/TiApplication( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3016) E/TiApplication( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2971) E/TiApplication( 9518): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2949) E/TiApplication( 9518): at android.app.ActivityThread.access$800(ActivityThread.java:141) E/TiApplication( 9518): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1251) E/TiApplication( 9518): at android.os.Handler.dispatchMessage(Handler.java:99) E/TiApplication( 9518): at android.os.Looper.loop(Looper.java:137) E/TiApplication( 9518): at android.app.ActivityThread.main(ActivityThread.java:5039) E/TiApplication( 9518): at java.lang.reflect.Method.invokeNative(Native Method) E/TiApplication( 9518): at java.lang.reflect.Method.invoke(Method.java:511) E/TiApplication( 9518): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/TiApplication( 9518): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/TiApplication( 9518): at dalvik.system.NativeStart.main(Native Method) E/TiApplication( 9518): Caused by: java.lang.NullPointerException E/TiApplication( 9518): at android.content.ComponentName.<init>(ComponentName.java:75) E/TiApplication( 9518): at android.content.Intent.<init>(Intent.java:3491) E/TiApplication( 9518): at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:198) E/TiApplication( 9518): at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:89) E/TiApplication( 9518): at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:443) E/TiApplication( 9518): at android.os.Handler.dispatchMessage(Handler.java:95) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger.dispatchMessage(TiMessenger.java:389) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger.dispatchPendingMessages(TiMessenger.java:374) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger$2.getResult(TiMessenger.java:252) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger.sendBlockingMessage(TiMessenger.java:286) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger.sendBlockingRuntimeMessage(TiMessenger.java:186) E/TiApplication( 9518): at org.appcelerator.kroll.KrollProxy.fireSyncEvent(KrollProxy.java:763) E/TiApplication( 9518): at org.appcelerator.titanium.TiBaseActivity.onPause(TiBaseActivity.java:975) E/TiApplication( 9518): at org.appcelerator.titanium.TiLaunchActivity.onPause(TiLaunchActivity.java:338) E/TiApplication( 9518): at android.app.Activity.performPause(Activity.java:5206) E/TiApplication( 9518): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1226) E/TiApplication( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3002) E/TiApplication( 9518): ... 12 more E/AndroidRuntime( 9518): FATAL EXCEPTION: main E/AndroidRuntime( 9518): java.lang.RuntimeException: Unable to pause activity {com.app.xalloy/com.app.xalloy.XalloyActivity}: java.lang.NullPointerException E/AndroidRuntime( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3016) E/AndroidRuntime( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2971) E/AndroidRuntime( 9518): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2949) E/AndroidRuntime( 9518): at android.app.ActivityThread.access$800(ActivityThread.java:141) E/AndroidRuntime( 9518): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1251) E/AndroidRuntime( 9518): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 9518): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 9518): at android.app.ActivityThread.main(ActivityThread.java:5039) E/AndroidRuntime( 9518): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 9518): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime( 9518): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroidRuntime( 9518): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroidRuntime( 9518): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 9518): Caused by: java.lang.NullPointerException E/AndroidRuntime( 9518): at android.content.ComponentName.<init>(ComponentName.java:75) E/AndroidRuntime( 9518): at android.content.Intent.<init>(Intent.java:3491) E/AndroidRuntime( 9518): at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:198) E/AndroidRuntime( 9518): at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:89) E/AndroidRuntime( 9518): at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:443) E/AndroidRuntime( 9518): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger.dispatchMessage(TiMessenger.java:389) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger.dispatchPendingMessages(TiMessenger.java:374) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger$2.getResult(TiMessenger.java:252) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger.sendBlockingMessage(TiMessenger.java:286) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger.sendBlockingRuntimeMessage(TiMessenger.java:186) E/AndroidRuntime( 9518): at org.appcelerator.kroll.KrollProxy.fireSyncEvent(KrollProxy.java:763) E/AndroidRuntime( 9518): at org.appcelerator.titanium.TiBaseActivity.onPause(TiBaseActivity.java:975) E/AndroidRuntime( 9518): at org.appcelerator.titanium.TiLaunchActivity.onPause(TiLaunchActivity.java:338) E/AndroidRuntime( 9518): at android.app.Activity.performPause(Activity.java:5206) E/AndroidRuntime( 9518): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1226) E/AndroidRuntime( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3002) E/AndroidRuntime( 9518): ... 12 more D/overlay ( 161): FROM_STATE = OV_BYPASS_3_LAYER TO_STATE = OV_CLOSED I/v8 ( 9752): Failed to open socket on port 2525, waiting 1000 ms before retrying {code} h5. Expected Result: 1. The app should not crash & successfully launch.

    Appcelerator JIRA | 3 years ago | Lokesh Choudhary
    java.lang.RuntimeException: Unable to pause activity {com.app.xalloy/com.app.xalloy.XalloyActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h4.NOTE: This is an intermittent issue. I could reproduce it 4-5 times with sdk 3.2.3.v20140422101718 & once with sdk 3.2.2.GA. So I guess this is not regression. h5. Description: 1. Create an app alloy or classic. 2. Set a breakpoint in the app for debug. 3. Debug it on device. h5. Actual Result: 1. The app crashes and we get "the app has stopped working" message. 2. Alan saw some timing issue while opening the window: {code} @Override protected void handleOpen(KrollDict options) { Activity topActivity = TiApplication.getAppCurrentActivity(); Intent intent = new Intent(topActivity, TiActivity.class); //It's is crashing on this line (198) where topActivity is null fillIntent(topActivity, intent); {code} 3. My console logs: {code} E/TiApplication( 9518): java.lang.RuntimeException: Unable to pause activity {com.app.xalloy/com.app.xalloy.XalloyActivity}: java.lang.NullPointerException E/TiApplication( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3016) E/TiApplication( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2971) E/TiApplication( 9518): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2949) E/TiApplication( 9518): at android.app.ActivityThread.access$800(ActivityThread.java:141) E/TiApplication( 9518): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1251) E/TiApplication( 9518): at android.os.Handler.dispatchMessage(Handler.java:99) E/TiApplication( 9518): at android.os.Looper.loop(Looper.java:137) E/TiApplication( 9518): at android.app.ActivityThread.main(ActivityThread.java:5039) E/TiApplication( 9518): at java.lang.reflect.Method.invokeNative(Native Method) E/TiApplication( 9518): at java.lang.reflect.Method.invoke(Method.java:511) E/TiApplication( 9518): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/TiApplication( 9518): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/TiApplication( 9518): at dalvik.system.NativeStart.main(Native Method) E/TiApplication( 9518): Caused by: java.lang.NullPointerException E/TiApplication( 9518): at android.content.ComponentName.<init>(ComponentName.java:75) E/TiApplication( 9518): at android.content.Intent.<init>(Intent.java:3491) E/TiApplication( 9518): at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:198) E/TiApplication( 9518): at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:89) E/TiApplication( 9518): at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:443) E/TiApplication( 9518): at android.os.Handler.dispatchMessage(Handler.java:95) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger.dispatchMessage(TiMessenger.java:389) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger.dispatchPendingMessages(TiMessenger.java:374) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger$2.getResult(TiMessenger.java:252) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger.sendBlockingMessage(TiMessenger.java:286) E/TiApplication( 9518): at org.appcelerator.kroll.common.TiMessenger.sendBlockingRuntimeMessage(TiMessenger.java:186) E/TiApplication( 9518): at org.appcelerator.kroll.KrollProxy.fireSyncEvent(KrollProxy.java:763) E/TiApplication( 9518): at org.appcelerator.titanium.TiBaseActivity.onPause(TiBaseActivity.java:975) E/TiApplication( 9518): at org.appcelerator.titanium.TiLaunchActivity.onPause(TiLaunchActivity.java:338) E/TiApplication( 9518): at android.app.Activity.performPause(Activity.java:5206) E/TiApplication( 9518): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1226) E/TiApplication( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3002) E/TiApplication( 9518): ... 12 more E/AndroidRuntime( 9518): FATAL EXCEPTION: main E/AndroidRuntime( 9518): java.lang.RuntimeException: Unable to pause activity {com.app.xalloy/com.app.xalloy.XalloyActivity}: java.lang.NullPointerException E/AndroidRuntime( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3016) E/AndroidRuntime( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2971) E/AndroidRuntime( 9518): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2949) E/AndroidRuntime( 9518): at android.app.ActivityThread.access$800(ActivityThread.java:141) E/AndroidRuntime( 9518): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1251) E/AndroidRuntime( 9518): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 9518): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 9518): at android.app.ActivityThread.main(ActivityThread.java:5039) E/AndroidRuntime( 9518): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 9518): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime( 9518): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroidRuntime( 9518): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroidRuntime( 9518): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 9518): Caused by: java.lang.NullPointerException E/AndroidRuntime( 9518): at android.content.ComponentName.<init>(ComponentName.java:75) E/AndroidRuntime( 9518): at android.content.Intent.<init>(Intent.java:3491) E/AndroidRuntime( 9518): at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:198) E/AndroidRuntime( 9518): at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:89) E/AndroidRuntime( 9518): at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:443) E/AndroidRuntime( 9518): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger.dispatchMessage(TiMessenger.java:389) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger.dispatchPendingMessages(TiMessenger.java:374) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger$2.getResult(TiMessenger.java:252) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger.sendBlockingMessage(TiMessenger.java:286) E/AndroidRuntime( 9518): at org.appcelerator.kroll.common.TiMessenger.sendBlockingRuntimeMessage(TiMessenger.java:186) E/AndroidRuntime( 9518): at org.appcelerator.kroll.KrollProxy.fireSyncEvent(KrollProxy.java:763) E/AndroidRuntime( 9518): at org.appcelerator.titanium.TiBaseActivity.onPause(TiBaseActivity.java:975) E/AndroidRuntime( 9518): at org.appcelerator.titanium.TiLaunchActivity.onPause(TiLaunchActivity.java:338) E/AndroidRuntime( 9518): at android.app.Activity.performPause(Activity.java:5206) E/AndroidRuntime( 9518): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1226) E/AndroidRuntime( 9518): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3002) E/AndroidRuntime( 9518): ... 12 more D/overlay ( 161): FROM_STATE = OV_BYPASS_3_LAYER TO_STATE = OV_CLOSED I/v8 ( 9752): Failed to open socket on port 2525, waiting 1000 ms before retrying {code} h5. Expected Result: 1. The app should not crash & successfully launch.

    Appcelerator JIRA | 3 years ago | Lokesh Choudhary
    java.lang.RuntimeException: Unable to pause activity {com.app.xalloy/com.app.xalloy.XalloyActivity}: java.lang.NullPointerException
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 android.content.ComponentName.<init>()
  2. Android Platform
    Intent.<init>
    1. android.content.ComponentName.<init>(ComponentName.java:75)
    2. android.content.Intent.<init>(Intent.java:2678)
    2 frames
  3. ti.modules.titanium
    WindowProxy.handleOpen
    1. ti.modules.titanium.ui.TiUIWindow.createIntent(TiUIWindow.java:527)
    2. ti.modules.titanium.ui.TiUIWindow.createNewActivity(TiUIWindow.java:194)
    3. ti.modules.titanium.ui.TiUIWindow.<init>(TiUIWindow.java:105)
    4. ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:99)
    4 frames
  4. org.appcelerator.titanium
    TiWindowProxy.handleMessage
    1. org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:86)
    1 frame
  5. ti.modules.titanium
    WindowProxy.handleMessage
    1. ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:86)
    1 frame
  6. Android Platform
    Handler.dispatchMessage
    1. android.os.Handler.dispatchMessage(Handler.java:95)
    1 frame
  7. org.appcelerator.titanium
    TiRootActivity.onCreate
    1. org.appcelerator.titanium.TiMessageQueue.dispatchMessage(TiMessageQueue.java:320)
    2. org.appcelerator.titanium.TiMessageQueue.dispatchPendingMessages(TiMessageQueue.java:304)
    3. org.appcelerator.titanium.TiMessageQueue$2.getResult(TiMessageQueue.java:172)
    4. org.appcelerator.titanium.TiMessageQueue.sendBlockingMessage(TiMessageQueue.java:196)
    5. org.appcelerator.titanium.kroll.KrollContext.evalFile(KrollContext.java:277)
    6. org.appcelerator.titanium.kroll.KrollBridge.evalFile(KrollBridge.java:130)
    7. org.appcelerator.titanium.TiContext.evalFile(TiContext.java:190)
    8. org.appcelerator.titanium.TiContext.evalFile(TiContext.java:210)
    9. org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:71)
    10. org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:112)
    11. org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:294)
    12. org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:102)
    13. org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:38)
    13 frames
  8. Android Platform
    ActivityThread.main
    1. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    2. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
    3. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    4. android.app.ActivityThread.access$2300(ActivityThread.java:125)
    5. android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    6. android.os.Handler.dispatchMessage(Handler.java:99)
    7. android.os.Looper.loop(Looper.java:123)
    8. android.app.ActivityThread.main(ActivityThread.java:4627)
    8 frames
  9. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:521)
    2 frames
  10. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    2 frames
  11. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame