Author Topic: App Exits After Resume Is Selected  (Read 6892 times)

Offline Brock

  • byte
  • *
  • Posts: 27
    • View Profile
App Exits After Resume Is Selected
« on: January 03, 2012, 04:36:57 PM »
LG Optimus One

App Version: 1.3
OS: 2.3.4
CPU: ARMv6
| Display FPS = ON |
| Accurate N64 Stick = ON |
| Analog Small |
| Video Pugin = libgles2n64 |
| Sound Off |

When I try to resume the game the app exits. So far I've had this problem with all the games I've tried.
In version 1.2 this was functioning correctly. It seems that after Resume is pressed it exits and it shows running in the background but I'm not 100% sure it is actually running after it is pressed. Also it doesn't show as an error it just closes.

Let me know if you need more technical info.
Device: Samsung Galaxy S2
CPU: 1.5 GHz Dual Core  Snapdragon S3
RAM: 1GB
Resolution: 800 x 480
Rom: 4.1.2 Jelly Bean Stock

Device: Mach Speed Trio Stealth G2
CPU: 1.5 GHz Dual Core ARM Cortex-A9
RAM: 1GB DDR3
Resolution: 800x480
Rom: 4.0.4 ICS Stock

Device: Mach Speed Trio
CPU: 1.2 GHz Boxchip A13
RAM: 512MB DDR3
Resolution: 480x272
Rom: 4.0.4 ICS Stock

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: App Exits After Resume Is Selected
« Reply #1 on: January 03, 2012, 04:50:13 PM »
Just some quick troubleshooting:

Make sure "Enable Auto-Save" is selected in the "Settings" menu.  If it is not, then select it, then load a game (Mario 64 recommended for testing), wait until the game is loaded and is not switching scenes or anything, then select "Menu" from the in-game menu.  Then select "Resume" to see if it still crashes.

Next, back up your saves (from [sdcard]/Android/data/paulscode.android.mupen64plus[.xperiaplay]/data/save).  Then run the app again and select "Restore App Data" from the "Settings" menu.  Run the same test again, loading a game, selecting "Menu", then selecting "Resume" to see if it still crashes.

If it is still crashing after that, let me know, and I'll write a verbose test for you to run to figure out where the breakdown is occurring.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Brock

  • byte
  • *
  • Posts: 27
    • View Profile
Re: App Exits After Resume Is Selected
« Reply #2 on: January 03, 2012, 06:06:36 PM »
Just some quick troubleshooting:

Make sure "Enable Auto-Save" is selected in the "Settings" menu.  If it is not, then select it, then load a game (Mario 64 recommended for testing), wait until the game is loaded and is not switching scenes or anything, then select "Menu" from the in-game menu.  Then select "Resume" to see if it still crashes.

Next, back up your saves (from [sdcard]/Android/data/paulscode.android.mupen64plus[.xperiaplay]/data/save).  Then run the app again and select "Restore App Data" from the "Settings" menu.  Run the same test again, loading a game, selecting "Menu", then selecting "Resume" to see if it still crashes.

If it is still crashing after that, let me know, and I'll write a verbose test for you to run to figure out where the breakdown is occurring.

I tried both methods and I'm still getting the same problem. After it closes it shows the little icon like it is running in the background but I'm checking my task manager and it doesn't appear to be running in the background after the close.
Device: Samsung Galaxy S2
CPU: 1.5 GHz Dual Core  Snapdragon S3
RAM: 1GB
Resolution: 800 x 480
Rom: 4.1.2 Jelly Bean Stock

Device: Mach Speed Trio Stealth G2
CPU: 1.5 GHz Dual Core ARM Cortex-A9
RAM: 1GB DDR3
Resolution: 800x480
Rom: 4.0.4 ICS Stock

Device: Mach Speed Trio
CPU: 1.2 GHz Boxchip A13
RAM: 512MB DDR3
Resolution: 480x272
Rom: 4.0.4 ICS Stock

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: App Exits After Resume Is Selected
« Reply #3 on: January 03, 2012, 06:22:40 PM »
Please post the logcat output after running this test:

Resume Crash Test

(instructions on how to get the logcat output are in this post)
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Brock

  • byte
  • *
  • Posts: 27
    • View Profile
Re: App Exits After Resume Is Selected
« Reply #4 on: January 03, 2012, 11:29:54 PM »
Please post the logcat output after running this test:

Resume Crash Test

(instructions on how to get the logcat output are in this post)

I have been trying to get a log from alogcat for a couple hours now, for some reason alogcat won't load the log, I think for some reason my Custom ROM wont allow it, I tried other programs this is what sendlog says "Unable to open log device '/dev/log/main': No such file or directory". I think my log either doesn't exist or is located somewhere else. Any ideas?

This is the ROM and Kernel on my phone:

http://forum.xda-developers.com/showthread.php?t=1125870

http://forum.xda-developers.com/showthread.php?t=1049518
 
Device: Samsung Galaxy S2
CPU: 1.5 GHz Dual Core  Snapdragon S3
RAM: 1GB
Resolution: 800 x 480
Rom: 4.1.2 Jelly Bean Stock

Device: Mach Speed Trio Stealth G2
CPU: 1.5 GHz Dual Core ARM Cortex-A9
RAM: 1GB DDR3
Resolution: 800x480
Rom: 4.0.4 ICS Stock

Device: Mach Speed Trio
CPU: 1.2 GHz Boxchip A13
RAM: 512MB DDR3
Resolution: 480x272
Rom: 4.0.4 ICS Stock

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: App Exits After Resume Is Selected
« Reply #5 on: January 04, 2012, 06:59:01 PM »
A lot of custom ROMs have Logging disabled by default.  I've been reading around, and it seems some custom ROMs have a TWEAKS menu or equivalent where you can re-enable logging.  Otherwise you will have to get in touch with the person who created the custom ROM.  If no luck there, I'll just have to wait for someone else who has the same problem to post here, so I can run tests to figure out what's going wrong (I can't reproduce the problem on my phone).
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline roguenerd

  • bit
  • Posts: 1
    • View Profile
Re: App Exits After Resume Is Selected
« Reply #6 on: January 04, 2012, 08:35:29 PM »
Hey;
Kindle Fire,  1 GHz Texas Instruments OMAP 4430 dual-core processor, 512 mb ram, 600?1024 pixel resolution
Custom Android 2.3, rooted to get to Android Marketplace and Go Launcher installed. I used the Kindle Fire Utility over at xda developers.

Same bug happens to me. If I have a game started, go back to the menu and select "Resume"  it flickers the controls for a second, says "Mupen64Plus Started" and quits. Tested using Goldeneye.

Logcat attached. Hope this helps.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: App Exits After Resume Is Selected
« Reply #7 on: January 04, 2012, 09:30:29 PM »
Wow, that's strange.  Take a look at this:

Code: [Select]
V/front_end( 3073):  __  __                         __   _  _   ____  _             
V/front_end( 3073): |  \/  |_   _ _ __   ___ _ __  / /_ | || | |  _ \| |_   _ ___
V/front_end( 3073): | |\/| | | | | '_ \ / _ \ '_ \| '_ \| || |_| |_) | | | | / __| 
V/front_end( 3073): | |  | | |_| | |_) |  __/ | | | (_) |__   _|  __/| | |_| \__ \ 
V/front_end( 3073): |_|  |_|\__,_| .__/ \___|_| |_|\___/   |_| |_|   |_|\__,_|___/ 
V/front_end( 3073):              |_|         http://code.google.com/p/mupen64plus/ 
V/front_end( 3073): Mupen64Plus Console User-Interface Version 1.99.4
V/front_end( 3073):
V/core_interface( 3073): UI-console: attached to core library 'Mupen64Plus Core' version 1.99.4
V/core_interface( 3073):             Includes support for Dynamic Recompiler.
V/front_end( 3073):  __  __                         __   _  _   ____  _             
V/front_end( 3073): |  \/  |_   _ _ __   ___ _ __  / /_ | || | |  _ \| |_   _ ___
V/front_end( 3073): | |\/| | | | | '_ \ / _ \ '_ \| '_ \| || |_| |_) | | | | / __| 
V/front_end( 3073): | |  | | |_| | |_) |  __/ | | | (_) |__   _|  __/| | |_| \__ \ 
V/front_end( 3073): |_|  |_|\__,_| .__/ \___|_| |_|\___/   |_| |_|   |_|\__,_|___/ 
V/front_end( 3073):              |_|         http://code.google.com/p/mupen64plus/ 
V/front_end( 3073): Mupen64Plus Console User-Interface Version 1.99.4
V/front_end( 3073):
E/front-end( 3073): AttachCoreLib unsuccessful, returning 2.

It looks like the front-end is running twice.  That would explain why the AttachCoreLib is unsuccessful, which causes the crash.  I have no idea why two instances are running at once, though..  I'll have to think about that one.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Brock

  • byte
  • *
  • Posts: 27
    • View Profile
Re: App Exits After Resume Is Selected
« Reply #8 on: January 05, 2012, 11:25:05 AM »
Hey Paul, I wasn't able to get the log from my phone but I have the same problem with my tablet. I was able to get a log from that, I attached it. I see you may have tracked it down but I posted to confirm.
Device: Samsung Galaxy S2
CPU: 1.5 GHz Dual Core  Snapdragon S3
RAM: 1GB
Resolution: 800 x 480
Rom: 4.1.2 Jelly Bean Stock

Device: Mach Speed Trio Stealth G2
CPU: 1.5 GHz Dual Core ARM Cortex-A9
RAM: 1GB DDR3
Resolution: 800x480
Rom: 4.0.4 ICS Stock

Device: Mach Speed Trio
CPU: 1.2 GHz Boxchip A13
RAM: 512MB DDR3
Resolution: 480x272
Rom: 4.0.4 ICS Stock

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: App Exits After Resume Is Selected
« Reply #9 on: January 05, 2012, 03:06:35 PM »
Brock, your log shows a different cause.  You can see where the problem starts around here:

Code: [Select]
E/Config  ( 1712): IOException creating file /mnt/sdcard/Android/data/paulscode.android.mupen64plus/error.log, error message: /mnt/sdcard/Android/data/paulscode.android.mupen64plus/error.log (No such file or directory)
W/InputManagerService(  132): Got RemoteException sending setActive(false) notification to pid 1688 uid 10059
I/ActivityManager(  132): Displayed paulscode.android.mupen64plus.test/paulscode.android.mupen64plus.MenuActivity: +529ms
E/Config  ( 1712): IOException creating file /mnt/sdcard/Android/data/paulscode.android.mupen64plus/mupen64plus.cfg, error message: /mnt/sdcard/Android/data/paulscode.android.mupen64plus/mupen64plus.cfg (No such file or directory)
E/Config  ( 1712): IOException creating file /mnt/sdcard/Android/data/paulscode.android.mupen64plus/data/InputAutoCfg.ini, error message: /mnt/sdcard/Android/data/paulscode.android.mupen64plus/data/InputAutoCfg.ini (No such file or directory)
E/Config  ( 1712): IOException creating file /mnt/sdcard/Android/data/paulscode.android.mupen64plus/data/gui.cfg, error message: /mnt/sdcard/Android/data/paulscode.android.mupen64plus/data/gui.cfg (No such file or directory)
D/dalvikvm( 1712): Trying to load lib /data/data/paulscode.android.mupen64plus.test/lib/libSDL.so 0x40513940
D/dalvikvm( 1712): Added shared lib /data/data/paulscode.android.mupen64plus.test/lib/libSDL.so 0x40513940
D/dalvikvm( 1712): Trying to load lib /data/data/paulscode.android.mupen64plus.test/lib/libcore.so 0x40513940
D/dalvikvm( 1712): Added shared lib /data/data/paulscode.android.mupen64plus.test/lib/libcore.so 0x40513940
D/dalvikvm( 1712): No JNI_OnLoad found in /data/data/paulscode.android.mupen64plus.test/lib/libcore.so 0x40513940, skipping init
D/dalvikvm( 1712): Trying to load lib /data/data/paulscode.android.mupen64plus.test/lib/libfront-end.so 0x40513940
D/dalvikvm( 1712): Added shared lib /data/data/paulscode.android.mupen64plus.test/lib/libfront-end.so 0x40513940

It seems to be able to access /data/data/..., but not /mnt/sdcard/Android/data/...  This usually indicates that the device is plugged into a computer in "Mass Storage Device" mode, so the SD card is not accessible from the phone.  However, that doesn't seem to be the case here, because it ran the first time in the log without any problems, so it must have had access to the SD card then.  The actual crash follows soon after in the log:

Code: [Select]
W/dalvikvm( 1712): threadid=1: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 1712): FATAL EXCEPTION: main
E/AndroidRuntime( 1712): java.lang.RuntimeException: Unable to start activity ComponentInfo{paulscode.android.mupen64plus.test/paulscode.android.mupen64plus.SDLActivity}: java.lang.NullPointerException
E/AndroidRuntime( 1712): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
E/AndroidRuntime( 1712): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
E/AndroidRuntime( 1712): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 1712): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
E/AndroidRuntime( 1712): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1712): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1712): at android.app.ActivityThread.main(ActivityThread.java:3647)
E/AndroidRuntime( 1712): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1712): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 1712): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 1712): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 1712): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1712): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 1712): at paulscode.android.mupen64plus.SDLActivity.onCreate(SDLActivity.java:215)
E/AndroidRuntime( 1712): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 1712): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
E/AndroidRuntime( 1712): ... 11 more
W/ActivityManager(  132):   Force finishing activity paulscode.android.mupen64plus.test/paulscode.android.mupen64plus.SDLActivity

This is caused by the fact that it wasn't able to access the sdcard to read InputAutoCfg.ini.  The code that causes the crash:
Code: [Select]
val = MenuActivity.InputAutoCfg_ini.get( "Keyboard", "X Axis" );
int x = val.indexOf( "(" );   <------ CRASH HERE

Now I can prevent this code from crashing by making sure "val" isn't null before I call "indexOf()", but that won't solve the underlying problem, which is that it couldn't access the SD card.

Could you try the following to see if it fixes the problem?

1) Reboot your device
2) Make sure the SD card is accessible on the device (from the "Files" app or something)
3) Run the emulator
4) Choose "Restore App Data" from the "Settings" menu
5) Open Mario64 and wait for it to get to Mario's 3D head
6) Choose "Menu" from the in-game menu
7) Choose "Resume"

If that still crashes, I'll have to think about this problem some more.
« Last Edit: January 05, 2012, 06:31:52 PM by Paul »
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Brock

  • byte
  • *
  • Posts: 27
    • View Profile
Re: App Exits After Resume Is Selected
« Reply #10 on: January 05, 2012, 06:27:42 PM »
I'm definitely still getting the crash problem, I double checked also. I'll do some more testing too, I'll try my tablet as well. Let me know if you need to try anymore methods.
Device: Samsung Galaxy S2
CPU: 1.5 GHz Dual Core  Snapdragon S3
RAM: 1GB
Resolution: 800 x 480
Rom: 4.1.2 Jelly Bean Stock

Device: Mach Speed Trio Stealth G2
CPU: 1.5 GHz Dual Core ARM Cortex-A9
RAM: 1GB DDR3
Resolution: 800x480
Rom: 4.0.4 ICS Stock

Device: Mach Speed Trio
CPU: 1.2 GHz Boxchip A13
RAM: 512MB DDR3
Resolution: 480x272
Rom: 4.0.4 ICS Stock