Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16086] Android: Application hangs on splash screen after terminating debugging from studio

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2014-03-13T22:26:54.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.3.0
Componentsn/a
Labelsn/a
ReporterMarco Brendolini
AssigneeAllen Yeung
Created2013-12-24T15:32:57.000+0000
Updated2017-03-23T05:25:09.000+0000

Description

Steps to Reproduce 1. Create a new app 2. Run the app in debug mode on device 3. From Studio, terminate the debug session Actual Result The app is frozen on the splash screen. i.e. if you press back, it will freeze and prompt user to force quit since it's non-responsive Expected Result The app goes to the splash screen and you are able to back out of it. This is the behavior in 3.1.3.GA.

Comments

  1. Ritu Agrawal 2013-12-26

    Moving this ticket to engineering as I can reproduce this problem in a little different scenario than described above. Steps to reproduce ------------------ 1. Create a Classic Titanium Mobile project using Titanium Studio 3.2.0 GA 2. Copy and paste the code below in app.js file 3. Start debugging this application on an Android device (4.2.2). Debugging works fine. 4. Terminate the debugging from Studio 5. Step 4 should result in the termination of application on the device but the application goes back to the splash screen and gets stuck there. Additional Information ---------------------- If I debug the same application again then the applications gets installed with no problem. Basic problem is that the application gets stuck when debugging is terminated. Here is the application code to reproduce this problem:
       Ti.API.info('This will print only once, as expected');
       var win1 = Titanium.UI.createWindow({  
           backgroundColor:'#fff',
           modal: false // ensure heavyweight window in all SDKs
       });
       var numOpens = 0;
       var label1 = Titanium.UI.createLabel({
           color:'#999',
           font:{fontSize:20,fontFamily:'Helvetica Neue'},
           textAlign:'center',
           width: Ti.UI.FILL,
           height: Ti.UI.SIZE
       });
        
       win1.add(label1);
       win1.addEventListener('open', function() {
           numOpens++;
           label1.text = 'Window was opened ' + numOpens + ' times';   
       });
        
       win1.addEventListener('close', function() {
           Ti.API.info('window was closed');
       });
       win1.open();
       
  2. Ritu Agrawal 2013-12-26

    [~mxia] Please change the reporter back to Marco Brendolini.
  3. Michael Xia 2013-12-26

    [~pinnamuri] Could you help investigate the problem to see if it's Studio or SDK issue? Thanks.
  4. Praveen Innamuri 2013-12-26

    I was able to reproduce the splash screen hang issue if the app is run on device after debbugging on Android device. When the same app is run with 3.1.3.GA SDK, the app run without any issues (even after debugging it). However, for 3.2.0.GA SDK, the app hung up on splash screen if it is run after debugging on device.
  5. Ingo Muschenetz 2013-12-27

    Resolving as duplicate of linked issue.
  6. Ritu Agrawal 2013-12-27

    I am reopening this ticket as I believe it is not a duplicate of TIMOB-15306. TIMOB-15306 is about going from debugging on device followed by distribution build. In my reproduction steps listed above, there is no distribution build and I can reproduce it very easily while debugging a simple application. No second build required.
  7. Ingo Muschenetz 2013-12-27

    Ritu, can you please edit the main ticket to clarify the reproduction steps. I'm also unclear if you HAVE to use your application code, or if you can reproduce it with any application?
  8. Ritu Agrawal 2013-12-27

    [~ingo] I have clarified the steps above so let me know if you need additional information. I have not tried multiple projects so cannot say for sure if it reproduces with ANY application but it reproduces consistently with the simple code provided in my comment.
  9. João Serra 2013-12-31

    Luis Ferreira found out that if you change application ID the app can run again in normal mode. Also uninstalling and re-installing the application does not seems to fix it.
  10. Sabil Rahim 2014-01-03

    Cannot seem to reproduce with the latest 3_2_X build . Could have been fixed TIMOB-16018 Tested on Android 4.4.2 nexus 5 TiSDK 3.2.1 (git hash e1ec944d8609d7dd7f4557e27d1f9454f36e7ec1) ti cli 3.2.0.GA
  11. Allen Yeung 2014-01-03

    I've updated the ticket to reflect the behavior Ritu is seeing. I was able to reproduce the issue in 3.2.0.GA. The behavior is slightly different than 3.1.3.GA, but is not very severe.
  12. Luis Pedro Ferreira 2014-01-04

    I discovered that if I manually delete the file com.myappid/deploy.json in de device after deploy, I can normally run the app again without any issues.
  13. Neha Mittal 2014-01-07

    Tested with SDK: 3.2.1.v20140106195644 and 3.3.0.v20140106195650 using environment: Appcelerator Studio: 3.2.1.201401061716 acs@1.0.11 alloy@1.3.1-beta npm@1.3.2 titanium@3.2.0 titanium-code-processor@1.1.0 Mac OSX 10.9 Mavericks Device: Nexus7(4.4.2) Result: On terminating the debug session, app goes to the splash screen. when we clicked two times back button on Nexus 7(4.2.2) as mentioned in the first comment, we are able to back out of it.
  14. Allen Yeung 2014-02-10

    This ticket should be resolved when TIMOB-16279 is fixed.
  15. Allen Yeung 2014-03-13

  16. Lee Morris 2017-03-23

    Closing ticket as duplicate with reference to the linked issues above.

JSON Source