GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-10T13:16:40.000+0000 |
Affected Version/s | Release 1.7.2, Release 1.8.0 |
Fix Version/s | Sprint 2011-40, Release 1.8.0, Release 1.8.0.1 |
Components | Android |
Labels | merge-1.7.6, module_emulator, qe-testadded, regression |
Reporter | Vikramjeet Singh |
Assignee | Bill Dawson |
Created | 2011-08-26T16:55:22.000+0000 |
Updated | 2014-06-19T12:46:35.000+0000 |
New:
1.create a simple app with 1.8.0
2.run it in the emulator
3.install to device
4.eyeball device
results:app crashes on launch
OLD steps:
Steps to reproduce:
1. Create a titanium mobile project for android using TiMob: 1.8.0.v20110819142548
2. Add following to tiapp.xml within
and tags which would look something like this:
http://schemas.android.com/apk/res/android">
3. Build and run it on Android Emulator.
4. Install it on Android device. (It works on Android Emulator though.)
5. Try to run the application.
6. It would say. sorry, app quits unexpectedly. (Note: I runs properly if we directly install it on device without running it in Emulator)
adb logcat output is pasted below.
Note:
If you create the mobile with TiMob 1.7.2 and follow above from steps2 to step6, application would run properly. Also, if you first create the project with TiMob 1.7.2 and then change it to TiMob 1.8.0.v20110819142548 from tiapp.xml, and then repeat the steps from step2 to step6, it will again run properly.
E/AndroidRuntime( 5726): FATAL EXCEPTION: main
E/AndroidRuntime( 5726): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.anyApp/com.appcelerator.anyApp.AnyappActivity}: java.lang.NullPointerException
E/AndroidRuntime( 5726): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
E/AndroidRuntime( 5726): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 5726): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 5726): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 5726): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 5726): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 5726): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 5726): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 5726): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 5726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
E/AndroidRuntime( 5726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime( 5726): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 5726): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 5726): at java.io.Reader.<init>(Reader.java:65)
E/AndroidRuntime( 5726): at java.io.InputStreamReader.<init>(InputStreamReader.java:65)
E/AndroidRuntime( 5726): at ti.modules.titanium.yahoo.YahooModule.bindContextSpecific(YahooModule.java:39)
E/AndroidRuntime( 5726): at org.appcelerator.titanium.TiApplication.bindModules(TiApplication.java:117)
E/AndroidRuntime( 5726): at org.appcelerator.titanium.kroll.KrollBridge.<init>(KrollBridge.java:42)
E/AndroidRuntime( 5726): at org.appcelerator.titanium.TiContext.createTiContext(TiContext.java:319)
E/AndroidRuntime( 5726): at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:96)
E/AndroidRuntime( 5726): at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:39)
E/AndroidRuntime( 5726): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 5726): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
E/AndroidRuntime( 5726): ... 11 more
W/ActivityManager( 1096): Force finishing activity com.appcelerator.anyApp/.AnyappActivity
W/ActivityManager( 1096): Activity pause timeout for HistoryRecord{449a5c48 com.appcelerator.anyApp/.AnyappActivity}
D/dalvikvm( 5290): GC_EXPLICIT freed 3797 objects / 254792 bytes in 65ms
E/QSB.Suggestions( 5290): LEAK! Finalized without being closed: Suggestions[]
W/ActivityManager( 1096): Activity destroy timeout for HistoryRecord{449a5c48 com.appcelerator.anyApp/.AnyappActivity}
D/dalvikvm( 5337): GC_EXPLICIT freed 244 objects / 9416 bytes in 75ms
I/power ( 1096): *** set_screen_state 0
D/SurfaceFlinger( 1096): About to give-up screen, flinger = 0x120f38
D/Sensors ( 1096): using accelerometer (name=accelerometer)
D/WifiService( 1096): ACTION_SCREEN_OFF
D/WifiService( 1096): setting ACTION_DEVICE_IDLE timer for 900000ms
D/StatusBar( 1096): DISABLE_EXPAND: yes
D/GoogleLoginService( 1214): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService }
D/dalvikvm( 1214): GC_EXPLICIT freed 1248 objects / 62624 bytes in 79ms
E/Tethering( 1096): active iface (usb0) reported as added, ignoring
D/WifiService( 1096): ACTION_BATTERY_CHANGED pluggedType: 2
Also encountering it with just a new project on 10.6.8 with 1.8.0.v20110906155354 1. Create project 2. Run on emulator 3. Run on device See the same errors as the log above
I ran through the steps and when it failed, I grabbed the folder. I then cleaned and tried again without launching simulator first. I ran a diff on the folders and it looks like there are some differences that might be a factor. See attached txt file.
was - Android: tag
While I'm working on this, i just want to be sure everybody knows the workaround is to do Project -> Clean from inside Studio before building for device. If you're not using Studio, you can "touch" the tiapp.xml file to get it to work.
Pull request: https://github.com/appcelerator/titanium_mobile/pull/525
Tested with Titanium Studio, build: 1.0.5.201109301412 using: 1.8.0.v20111007112617 with Nexus S 2.3.6 Hero 2.1
Standardizing summary and labels.
As of 1.8.0.1.v20111219180133 we are not seeing this issue on rhino/v8 on win 7 and 10.6.8
Marking as resolved per Natalie's comment
Closing issue Tested with Ti Studio 1.0.8.201201091758 Ti Mob SDK 1.8.0.1 OSX Lion Droid 3, emulator 2.2 v8 and rhino Expected behavior is shown
Added Label: qe-testadded.