[TIMOB-16305] Android: Alloy Projects Stuck at Splash screen (Samsung Note 10.1)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Done |
Resolution Date | 2015-06-05T06:51:34.000+0000 |
Affected Version/s | Release 3.2.0, Release 3.2.1 |
Fix Version/s | Release 4.1.0 |
Components | Android |
Labels | n/a |
Reporter | Andrew Greenstreet |
Assignee | Hieu Pham |
Created | 2014-01-23T21:32:25.000+0000 |
Updated | 2017-03-16T21:42:33.000+0000 |
Description
On a Samsung Galaxy Note 10.1 (2012 Edition), any project that is built with Alloy gets stuck at the splash screen. Projects built in "Classic" have no such issue.
When the project is built in "Debug" mode (connected to the debugger) it works as expected. However, if this app is restarted on the device, without the debugger, is gets stuck at the splash screen.
Application log
-- Start application log -----------------------------------------------------
[INFO] : TiApplication: (main) [0,0] checkpoint, app created.
[INFO] : TiApplication: (main) [103,103] Titanium 3.3.0 (2014/01/14 17:57 5d19c60)
[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 7.942MB for 272514-byte allocation
[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 8.385MB for 136265-byte allocation
[INFO] : TiApplication: (main) [410,513] Titanium Javascript runtime: v8
[WARN] : V8Object: Runtime disposed, cannot set property 'userAgent'
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
[INFO] : TiApplication: (main) [0,0] Analytics have been disabled
[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 8.833MB for 614416-byte allocation
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.mycompany.myappname@41d0c9c8
Anything in alloy.js never runs.
Moving this ticket to Engineering as I can reproduce the issue on Samsung Note 10.1. Also, note that on Samsung Nexus 10 tablet its working fine.
I was able to reproduce the issue on Galaxy Note 10.1 for an alloy as well as classic app.Both apps hang on the splash screen when run after debug session has been run. The deploy.json exists in the app folder after debug, deleting it & running the app launches the app successfully. Carried out the same tests on Samsung galaxy S4 & Samsung galaxy tab 3 10.1 and was not able to reproduce the issue. I checked the app folder for deploy.json on these devices & could not find it. It gets deleted. Environment: Appc Studio : 3.2.1.201401221450 Ti SDK : 3.2.1.v20140122175749 , 3.2.0.GA Mac OSX : 10.8.5 Alloy : 1.3.1-beta3 , 1.3.0 CLI - 3.2.1 beta3 Samsung Galaxy S4 running android 4.2.2 Samsung Galaxy Tab 3 10.1 running android 4.2.2 Samsung Galaxy Note 10.1 running android 4.0.4
We will likely remove deploy.json in 3.3.0, making this a non-issue at that point.
Duplicate of TIMOB-16132
Resolving as a duplicate.
Reopening this ticket with following configurations : Mac :10.9.2 Appcelerator Studio, build: 3.3.0.201405011408 SDK - 3.3.0.v20140507163312 acs-1.0.14 alloy-1.4.0-dev npm-1.3.2 titanium-3.3.0-dev titanium-code-processor-1.1.1 Xcode :5.1.1 Devices Used: Nexus 7 (4.3) ,HTC desire (4.0.3) , Samsung Note( 2.3.6) Emulator : Android 4.1.2 (skin : WXGA800; SDCard :1024 M) Steps to reproduce: 1.Create any alloy or classic mobile app project. 2.Add breakpoints. 3.Debug the project on any android device or emulator. 4.Wait till debug process completes ( break point hits ) 5.Force stop the app from the background in order to make sure no background instance is running. 6.Relaunch the same app. Observed behavior: App stops at the splash screen Note : There is no deploy.json file available on the devices I tried.
[~dpandey] When you relaunch the app, is Studio in "debug" mode? cc [~emerriman]
When the debugging session is halted in Studio, it appears as if the session disconnect triggers the app to die. Then the Android ActivityManager starts up the app again in which case it tries to reconnect to Studio, but Studio is not expecting a debug connection. Here's the logcat output:
This is NOT a Titanium CLI or Android build related issue. This is either inside the titanium-debug jar or somewhere in the Titanium Android platform code. In any case, re-assigning to the Android team for further investigation.
I did some investigation and here is my finding I can reproduce the issue with the test Titanium application I have in the Eclipse by creating a file called deploy.json in the assets folder with the following content in the file. {"debuggerEnabled":false,"debuggerPort":52904,"profilerEnabled":false,"profilerPort":-1} None of the code in the app.js is getting executed. I don't know how the debugger works but my guess is that the app is waiting to connect to the debugger port and it never connects. When the app get killed forcefully, the deploy.json doesn't get deleted and next time when the app starts, it try to connect to the debugger and it never succeeds and it just wait. If I delete the deploy.json from the app directory after the force stop of the application, it runs fine. May be the studio was supposed to delete the deploy.json after the app debugging is done but since the app is terminated using force stop, deploy.json is never cleaned up.
The current Android debugger architecture only allows debug builds to run in debug mode. A simple workaround would be to reinstall the app using 'Run' instead of 'Debug' if users wish to run the app normally.
As according to Hieu's comments, resolving the ticket as done.
Can confirm that this was done.