SOLVED system.openUrl crashes app and causes cold app boot upon resume

Hi Andrew.

I got a new FIRE HD, 7 inch, and tried sideloading my app.  It starts up OK, but none of logging messages appear in the device logs.  Seems like the last time I did this, 6 months ago, I could see Corona prints to the device log.  ?

So I never get far enough to test the problem above.  :frowning:

I DO see an error ‘can not read UMENG_CHANNEL meta-data from AndroidManifest.xml’, which leads me to think the build is not correct.  Later I get the ‘forget to include ACCESS_WIFI_STATE permission?’… but I definitely set that in my build.settings.  So again it sounds like the build did not make the manifest properly.

More information about this problem.  I built a single line app:
 

system.openURL( "http://www.google.com" )

This line of code crashes the app on the iPad device, but not in the Windows or Mac simulators.  On the device, if I try to return to the app, it has crashed.

 

Nov 14 16:34:56 SpringBoard[33] <Warning>: LICreateIconForImage passed NULL CGImageRef image

 

quite a delay here… maybe 5 seconds before Google pops up, then these error messages:

 

Nov 14 16:34:56  kernel[0] <Debug>: launchd[18984] Container:/private/var/mobile/Applications/5679A22B-E042-48FE-A506-5B9A121028B1(sandbox)

Nov 14 16:35:07  backboardd[29] <Warning>: CoreAnimation: timed out fence 63cdb

 

then try to return to app:

 

Nov 14 16:35:07  lsd[18490] <Warning>: LaunchServices: application launch failed - received error code 11

Nov 14 16:35:08  TestopenURL[18984] <Warning>: CoreAnimation: failed to receive fence reply: 10004003

 

 

 

Quite strange.  I’d suggest you file a bug report for this with your simple TestopenURL application.

Also, what build.settings did you use for the test application (if any)?

  • Andrew

Thanks, Andrew.  Here are my build settings for both ICE and the stripped down project:

 

iphone = { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plist = { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFBundleShortVersionString = "1.1", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Icon-76@2x.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Icon-Small-50.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Icon-Small-50@2x.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Icon-Small.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Icon-Small@2x.png" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UIPrerenderedIcon = true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UIFileSharingEnabled = false, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UIStatusBarHidden = true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UIApplicationExitsOnSuspend = true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; }, android = &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; usesPermissions = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "android.permission.INTERNET", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "android.permission.ACCESS\_WIFI\_STATE", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "android.permission.ACCESS\_NETWORK\_STATE", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "android.permission.WRITE\_EXTERNAL\_STORAGE", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "android.permission.RECEIVE\_BOOT\_COMPLETED", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "com.android.vending.BILLING", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "android.permission.GET\_ACCOUNTS", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; &nbsp;

I think your issue is being caused by the line “UIApplicationExitsOnSuspend = true”.  That means that, when the user moves out of your app for any reason (such as pressing the home button or, in your case, visiting a URL), the app will completely forcibly close instead of suspending.

Just remove that line, and you should be fine.

  • Andrew

I tried that along the way… was the first thing I played with a few days ago.  Did not help at that time, but I will try it with the stripped down app.

Andrew,

Thanks for your help!  I submitted a bug report… changing the “UIApplicationExitsOnSuspend” flag makes no difference.

David

Andrew,

BTW, when I tried to run my app on a new FIRE HD 7", it appeared to run (the gui came up and I could enter search terms, etc), but absolutely no console messages appear on the device logs.  I am using an app called ‘aLogcat’, which allows one to filter console messages.  aLogcat shows various other android messages, but not a single Corona message.

So then I downloaded the adb tools, and tried to connect the FIRE to my PC via the USB port, but ‘adb devices’ only shows the emulator, not the FIRE.   If I try:

adb logcat Corona:v \*:s

I get this:

E/PGA  <520>:  PgaSocketWriteAllHdipc: hd_ipc_send() failed

W/PGA <520>: ctlSwapBuffers(133): Host Connect failed, err = -1

My PC can ‘see’ the FIRE via file explorer, so it appears to be connected through the USB ok.  I have the ‘developer’ and ‘unknown source’ modes set to on.  Without the ability to see what is in the device console, either through ‘aLogcat’ or ‘adb’, I am stuck in the water.  Is Corona is keeping up with all these stores/devices/IDEs, etc?

BTW, I am trying to connect to the FIRE on a Win 7 platform, with Java 1.7.0_45.

David

The problem could not be replicated by Corona staff, so they recommended a power reset.  That fixed the problem on one of the two devices that showed the bug.  The other device is not available for a test.  Clearing out all applications from the device execution stack did not solve the problem, but a full power reset did.