I'm trying to run the default sample app on an HTC Dream Android device, but it's force closing on startup. I'm using the 1.0 Titanium Developer and the 1.0.0 SDK. I have the Android 1.6, API 4, Rev 2 SDK installed along with Google APIs API 4, Rev 2.
The device itself is rooted and running Cyanogenmod 4.2.14.1.
Here's the log trace from the device:
I/ActivityManager( 94): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x 10200000 cmp=com.phpexpertsca.red2/.Red2Activity } I/ActivityManager( 94): Start proc com.phpexpertsca.red2 for activity com.phpexpertsca.red2/.Red2Activity: pid=1413 uid=10054 gi ds={3003} I/Log ( 1413): (main) [0,0] checkpoint, app created. D/TiProperties( 1413): (main) [162,162] setString called with key:ti.deploytype, value:test I/Log ( 1413): (main) [0,0] checkpoint, on root activity create. D/TiProperties( 1413): (main) [191,191] getString called with key:ti.deploytype, def:unknown D/TiProperties( 1413): (main) [20,211] getString called with key:ti.version, def:0.0.0 D/TiApplication( 1413): (main) [45,256] Analytics Event: type=ti.start D/TiApplication( 1413): event=ti.start D/TiApplication( 1413): timestamp=2010-03-10T02:00:19.230-0500 D/TiApplication( 1413): mid=200140d9c4c54931 D/TiApplication( 1413): sid=c05549d4-5541-47ea-8f8d-1ba59befb2de D/TiApplication( 1413): aguid=67fee181-a15e-4c34-b096-3808ee45fc25 D/TiApplication( 1413): isJSON=true D/TiApplication( 1413): payload={"os":"HTC Dream","tz":-300,"nettype":"WIFI","deploytype":"test","app_version":"1.0","osver":"1.6 ","un":"shade","version":"0.0.0"} I/k9 ( 282): Committing preference changes E/TiContext( 1413): (main) [74,330] BaseURL for context is null E/KrollContext( 1413): (kroll$1) [13,343] Context Thread: kroll$1 I/KrollContext( 1413): (kroll$1) [112,455] Preparing scope I/KrollContext( 1413): (kroll$1) [58,513] Scope prepared E/KrollObject( 1413): (main) [6,519] getModulePath(): Titanium D/KrollObject( 1413): (main) [2,521] Module: ti.modules.titanium.TitaniumModule I/k9 ( 282): Preferences commit took 222ms D/TiProxy ( 1413): (main) [257,778] New: TitaniumModule D/dalvikvm( 1413): GC freed 4508 objects / 347640 bytes in 107ms E/KrollObject( 1413): (main) [155,933] getModulePath(): Titanium E/KrollObject( 1413): (main) [2,935] targetPath: ti.modules.titanium D/KrollObject( 1413): (main) [1,936] Module: ti.modules.titanium.json.JSONModule D/TiProxy ( 1413): (main) [4,940] New: JSONModule D/dalvikvm( 1413): GC freed 683 objects / 42472 bytes in 96ms E/ROOT ( 1413): (main) [223,1163] Leaving TiRootActivity.onCreate I/Log ( 1413): (main) [0,0] checkpoint, on root activity resume. W/dalvikvm( 1413): threadid=17: thread exiting with uncaught exception (group=0x4001e170) E/TiUncaughtHandler( 1413): (Thread-9) [10,10] Sending event: exception on thread: Thread-9 msg:java.lang.NullPointerException E/TiUncaughtHandler( 1413): java.lang.NullPointerException E/TiUncaughtHandler( 1413): at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:266) E/TiUncaughtHandler( 1413): at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:281) E/TiUncaughtHandler( 1413): at org.appcelerator.titanium.TiRootActivity$1.run(TiRootActivity.java:69) E/TiUncaughtHandler( 1413): at java.lang.Thread.run(Thread.java:1096) D/TiApplication( 1413): (Thread-9) [46,56] Analytics Event: type=ti.crash D/TiApplication( 1413): event=ti.crash D/TiApplication( 1413): timestamp=2010-03-10T02:00:20.190-0500 D/TiApplication( 1413): mid=200140d9c4c54931 D/TiApplication( 1413): sid=c05549d4-5541-47ea-8f8d-1ba59befb2de D/TiApplication( 1413): aguid=67fee181-a15e-4c34-b096-3808ee45fc25 D/TiApplication( 1413): isJSON=true D/TiApplication( 1413): payload={"value":"thread_nameThread-9\nthread_id9\nerror_msgjava.lang.NullPointerException\n<<<<<<<<<<<<< << STACK TRACE >>>>>>>>>>>>>>>\norg.appcelerator.titanium.TiContext.evalFile(TiContext.java:266)\norg.appcelerator.titanium.TiCont ext.evalFile(TiContext.java:281)\norg.appcelerator.titanium.TiRootActivity$1.run(TiRootActivity.java:69)\njava.lang.Thread.run(Thr ead.java:1096)\n"} E/AndroidRuntime( 1413): Uncaught handler: thread Thread-9 exiting due to uncaught exception E/AndroidRuntime( 1413): java.lang.NullPointerException E/AndroidRuntime( 1413): at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:266) E/AndroidRuntime( 1413): at org.appcelerator.titanium.TiContext.evalFile(TiContext.java:281) E/AndroidRuntime( 1413): at org.appcelerator.titanium.TiRootActivity$1.run(TiRootActivity.java:69) E/AndroidRuntime( 1413): at java.lang.Thread.run(Thread.java:1096) I/Process ( 94): Sending signal. PID: 1413 SIG: 3 I/dalvikvm( 1413): threadid=7: reacting to signal 3 I/dalvikvm( 1413): Wrote stack trace to '/data/anr/traces.txt' I/ActivityManager( 94): Displayed activity com.phpexpertsca.red2/.Red2Activity: 2287 ms (total 2287 ms) W/TiAnalyticsSvc( 1413): (Thread-10) [338,394] Analytics Service Started D/dalvikvm( 282): GC freed 7160 objects / 457736 bytes in 236ms I/TiAnalyticsSvc( 1413): (Thread-10) [1038,1432] Sending 2 analytics events. D/NetworkLocationProvider( 94): onCellLocationChanged [56000,547843] D/dalvikvm( 282): GC freed 6751 objects / 323832 bytes in 144ms D/dalvikvm( 1413): GC freed 5376 objects / 380376 bytes in 115ms I/k9 ( 282): Committing preference changes I/k9 ( 282): Preferences commit took 47ms I/k9 ( 282): Committing preference changes I/k9 ( 282): Preferences commit took 69ms D/dalvikvm( 1413): GC freed 2761 objects / 134248 bytes in 89ms W/TiAnalyticsSvc( 1413): (Thread-10) [3105,4537] Stopping Analytics Service D/dalvikvm( 148): GC freed 2058 objects / 99656 bytes in 165ms I/Process ( 1413): Sending signal. PID: 1413 SIG: 9 I/ActivityManager( 94): Process com.phpexpertsca.red2 (pid 1413) has died. I/WindowManager( 94): WIN DEATH: Window{43c24da8 com.phpexpertsca.red2/com.phpexpertsca.red2.Red2Activity paused=false} W/UsageStats( 94): Unexpected resume of com.android.launcher while already resumed in com.phpexpertsca.red2 W/InputManagerService( 94): Got RemoteException sending setActive(false) notification to pid 1413 uid 10054
3 Answers
Josh, we haven't made any effort to support the Cyanogenmod'd devices. Would you mind putting that trace into a pastie. It's hard to read through it all run together like that. What I did see implies that I can't find app.js. I am using file://android_asset/ to locate the resources in the application. Do you know if Cyanogenmod supports the URL correctly?
Hi Don, Sorry about that messy paste. Here's the pastie link for the trace: http://pastie.org/863981
I don't know if Cyanogenmod supports the URL correctly or not. Is there a way I can confirm that for you?
I just tried disabling Analytics in tiapp.xml and managed to run the sample app successfully. I'll try some more complicated apps and see how it goes.
Your Answer
Think you can help? Login to answer this question!