App Restarts - Still searching for help

You must Login before you can answer or comment on any questions.

So here's the situation a number of my users (mostly with Samsung S3 phones and some Moto phones) say that my app just restarts as soon as it opens. After trying on my phone I was unable to reproduce. So I bit the bullet and bought an S3 - of course I can't reproduce it still.

Here is the trace:

[ 09-17 16:35:24.023   651:0x2af I/power    ]
release_dvfs_lock : lockType : 1 
 
 
[ 09-17 16:35:24.023   651:0x2af D/PowerManagerService ]
releaseDVFSLockLocked : all DVFS_MIN_LIMIT are released 
 
[ 09-17 16:35:24.023   651:0x2af W/ActivityManager ]
mDVFSLock.release()
 
[ 09-17 16:35:24.203 10286:0x283d I/TiAPI    ]
dashboard open event called
 
[ 09-17 16:35:24.203 10286:0x283d I/TiAPI    ]
x
 
[ 09-17 16:35:24.213 10286:0x283d I/TiAPI    ]
show dialog
 
[ 09-17 16:35:24.313   651:0x683b V/WindowManager ]
rotationForOrientationLw(orient=1, last=0); user=0  mLidOpen=-1 mDockMode=0 mHdmiPlugged=false mAccelerometerDefault=1 sensorRotation=0
 
[ 09-17 16:35:24.363 10286:0x282e D/TiUIView ]
(main) [1533,1541] Nativeview is null
 
[ 09-17 16:35:24.363   342:0x207 W/SurfaceFlinger ]
id=1229(3) createSurface 0xef5264 (1x1),2 flag=400
 
[ 09-17 16:35:24.373   651:0x4c0 D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.373  1101:0x44d V/PhoneStatusBar ]
setLightsOn(true)
 
[ 09-17 16:35:24.373   651:0x30f D/STATUSBAR-StatusBarManagerService ]
setSystemUiVisibility(0x0)
 
[ 09-17 16:35:24.373   651:0x30f D/STATUSBAR-StatusBarManagerService ]
manageDisableList what=0x0 pkg=WindowManager.LayoutParams
 
[ 09-17 16:35:24.383 10286:0x282e D/TiUIView ]
(main) [21,1562] Nativeview is null
 
[ 09-17 16:35:24.383 10286:0x282e D/TiUIView ]
(main) [0,1562] Nativeview is null
 
[ 09-17 16:35:24.423 10286:0x282e D/TiUIView ]
(main) [41,1603] Nativeview is null
 
[ 09-17 16:35:24.423   651:0x2851 I/ClipboardServiceEx ]
Send intent for dismiss clipboard dialog inside hideCurrentInputLocked() !
 
[ 09-17 16:35:24.423   651:0x4340 D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.443   342:0x51a4 D/memalloc ]
ion: Allocated buffer base:0x437fe000 size:3768320 fd:42
 
[ 09-17 16:35:24.443 10286:0x282e D/memalloc ]
ion: Mapped buffer base:0x60329000 size:3768320 offset:0 fd:102
 
[ 09-17 16:35:24.483   342:0x207 I/Adreno200-EGLSUB ]
<CreateImage:893>: Android Image
 
[ 09-17 16:35:24.483   342:0x207 I/Adreno200-EGLSUB ]
<GetImageAttributes:1158>: RGBX_8888
 
[ 09-17 16:35:24.483   651:0x4c3 D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.483   651:0x4c3 D/DEFERED_APP_VISIBILITY ]
tweaking closing app
 
[ 09-17 16:35:24.493   651:0x4c3 D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.503   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.523   651:0x2ad V/WindowOrientationListener ]
nearestRotation : 0   Angle: 4   tilt: 29
 
[ 09-17 16:35:24.533   342:0x207 W/SurfaceFlinger ]
id=1230(4) createSurface 0xee0b84 (1x1),1 flag=0
 
 
[ 09-17 16:35:24.563   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.573   342:0x747d D/memalloc ]
ion: Allocated buffer base:0x43c59000 size:1130496 fd:34
 
[ 09-17 16:35:24.573 10286:0x282e D/memalloc ]
ion: Mapped buffer base:0x606c1000 size:1130496 offset:0 fd:105
 
 
[ 09-17 16:35:24.593   342:0x207 I/Adreno200-EGLSUB ]
<CreateImage:893>: Android Image
 
[ 09-17 16:35:24.593   342:0x207 I/Adreno200-EGLSUB ]
<GetImageAttributes:1102>: RGBA_8888
 
[ 09-17 16:35:24.593   651:0x30e I/ActivityManager ]
Displayed shortComponentName: +1s547ms
 
[ 09-17 16:35:24.593   651:0x814 D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.593   651:0x4cb D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.593   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.613   342:0x4c19 D/memalloc ]
ion: Allocated buffer base:0x44455000 size:3768320 fd:50
 
[ 09-17 16:35:24.613   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.613 10286:0x282e D/memalloc ]
ion: Mapped buffer base:0x607d5000 size:3768320 offset:0 fd:108
 
[ 09-17 16:35:24.623   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.643   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.663   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.663   651:0x3946 D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.673 10286:0x282e D/memalloc ]
ion: Unmapping buffer  base:0x5f2bf000 size:3768320
 
[ 09-17 16:35:24.673   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.683   342:0x4c19 D/memalloc ]
ion: Allocated buffer base:0x452ae000 size:3768320 fd:59
 
[ 09-17 16:35:24.683   342:0x207 I/Adreno200-EGLSUB ]
<CreateImage:893>: Android Image
 
[ 09-17 16:35:24.683   342:0x207 I/Adreno200-EGLSUB ]
<GetImageAttributes:1158>: RGBX_8888
 
[ 09-17 16:35:24.683 10286:0x282e D/memalloc ]
ion: Mapped buffer base:0x5f2bf000 size:3768320 offset:0 fd:65
 
[ 09-17 16:35:24.693   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.714   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.714   342:0x1581 W/SurfaceFlinger ]
id=1227 Removed idx=1 Map Size=5
 
[ 09-17 16:35:24.714   342:0x156 W/SurfaceFlinger ]
id=1227 Removed idx=-2 Map Size=5
 
[ 09-17 16:35:24.724   651:0x30e D/KeyguardViewMediator ]
setHidden false
 
[ 09-17 16:35:24.744   342:0x207 D/memalloc ]
ion: Freeing buffer base:0x440bd000 size:3768320 fd:36
 
[ 09-17 16:35:24.744   342:0x207 D/memalloc ]
ion: Unmapping buffer  base:0x440bd000 size:3768320
 
[ 09-17 16:35:24.744   342:0x207 I/Adreno200-EGLSUB ]
<CreateImage:893>: Android Image
 
[ 09-17 16:35:24.744   342:0x207 I/Adreno200-EGLSUB ]
<GetImageAttributes:1158>: RGBX_8888
 
 
[ 09-17 16:35:24.844 10286:0x282e W/TiApplication ]
(main) [422,2025] Scheduling application restart
You can see near the top the last TiAPI log message "show dialog" this happens at the very start of my app. Then a bunch of system stuff and the TiApplication "scheduling application restart". I traced it on my new S3 and everything looks the same except I dont get the scheduling application restart. I'm totally lost on what else I can do. Ideas?

Note: this is happening on the latest RC as well as all the 2.x releases.

— asked 9 months ago by Frank A
2 Comments
  • You need to post code samples for help with these types of issues

    — commented 9 months ago by Matt Apperson

  • I posted some relevant code below. I'm happy to post/send more.

    — commented 9 months ago by Frank A

1 Answer

When does the restart occur? on daily usage or only when the user tries to open it from the playstore (after download)?

— answered 9 months ago by Dan Tamas
answer permalink
1 Comment
  • On every start of the app (for the users who have the issue). I've had them try starting the app from the home screen, app store, application list. What's so frustrating is that I've never personally seen it happen, just have the logs to work off of. What they say is that the app starts and they see the dialog flash and then it just restarts. The app has a dialog that shows up after the main window opens.

    Here's the relevant code:

    theWin.addEventListener('open',function(){
            Ti.API.info('dashboard open event called');
            if (settings.getShownRegMsg()!=true && !settings.isPremium()){
                util.premiumMsg(null,function(){
                    //NOTE this never shows up when things crash
                    Ti.API.info("Closing premium msg");
                    settings.setShownRegMsg(true);
                    if (!settings.isPremium()){
                        var adUtil = require('/ui/adutil');
                        var lat = 40.714623;
                        var lng = -74.006605;
                        if (settings.hasLastSearch()==true){
                            lat = settings.getLastLat();
                            lng = settings.getLastLng();
                        }
                        theWin.addEventListener('tvf:adgood',function(e){
                            theWin.theAd = e.ad;
                            Ti.API.info('Setting this.theAd '+JSON.stringify(theWin.theAd));
                        });
                        Ti.API.info('addad2 called from openDashboard');
                        adUtil.addAd2(theWin,lat,lng,'HOME');
     
                    }
                });
        }
        });
     
    //utils.js
    exports.premiumMsg=function(msg,callback){
         if (!msg)
                msg = 'Would you like to support TVFoodMaps, remove ads and get premium features?';
     
          var dlg = Titanium.UI.createAlertDialog({
            message:msg, 
            buttonNames: ['Yes, Upgrade for $2.99','Learn More','No Thanks']
          });
          dlg.addEventListener('click', function(ev) {
            Ti.API.info('premium msg dialog clicked');
            if (ev.index == 0) { // clicked "Yes"
                Ti.App.fireEvent("tvf:buypremium");
            } else if (ev.index == 1) { // clicked "learn more"
              Ti.Platform.openURL('http://www.tvfoodmaps.com/T_PremiumMobile.jsp');
              setTimeout (function(){dlg.show()},500);
           } else {
           }
           if(callback){
             Ti.API.info('Calling premiumMsg callback');
             callback();
           }
          });
          dlg.show();
          Ti.API.info("show dialog");
    }

    — commented 9 months ago by Frank A

Your Answer

Think you can help? Login to answer this question!