Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Instant "app was closed" message on Android — Gideros Forum

Instant "app was closed" message on Android

HolonistHolonist Member
edited May 2015 in General questions
Hi,

My game runs fine on my PC and on my phone when using Gideros Android player.
Unfortunately when trying to start it on my phone from an actual apk, it instantly closes itself.

I tried another phone, there it was the same behaviour.
The two phones are [OnePlus One -> CyanogenMod 12.0/Android 5.0.2] and [HTC One Mini -> Android 4.4.2]
I'm currently running the latest version of Gideros studio, but up to today I was using 2014-04. (The error was my reason to update, but it happens in both versions)

I checked if something's wrong with my Eclipse setup, but I was able to deploy and start another simple app I wrote recently, without any troubles. So it has to be something in my game code.

I really don't know where to start, because when I tested my game locally or on phone via the Gideros software, everything was fine. Are there any known 'bad practices' to avoid when going to android? In the beginning, I'm creating about 200 fonts within loops. Can't imagine that this would crash the app though.

Comments

  • SinisterSoftSinisterSoft Maintainer
    Check to see if any objects you create are nil before you use them.

    Also plug the phone via usb into a PC then send the program across using Eclipse (using run) - you should get debug messages explaining the crash.

    Likes: Holonist

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • ar2rsawseenar2rsawseen Maintainer
    The most common problem is that PC filesystem is case insensitive, while Android's is case sensitive.

    So for example if you have image.PNG file and you use it as image.png it will work on Desktop, but will crash on Android
  • HolonistHolonist Member
    edited May 2015
    @SinisterSoft when I press 'run' in Eclipse it says that no device is connected. I was able to access my phone in Explorer though, an debug mode is also activated. Do I need to add the phone to Eclipse somehow?
  • dreiko65dreiko65 Member
    edited May 2015
    @Holonist when plugged your phone on pc while having eclipse running did you see a popup window on phone? It asks you if you really "trust" the pc you are connecting your phone to. You should press the connect button

    If you dont see this popup window then check your phones drivers.

    Likes: Holonist

    +1 -1 (+1 / -0 )Share on Facebook
  • HolonistHolonist Member
    edited May 2015
    @dreiko65 thanks, my OPO didn't have such popup. I downloaded the drivers here, which fixed it. http://adbdriver.com/downloads/

    I was able to make a 'run' on my phone and get a logcat output.
    I'm adding it as txt file.

    I'd be glad if you guys would take a look at it.

    In the beginning it says "fileNotFoundException" quite often. Are folders/files with a leading '_' not allowed?

    (The files do exist when I look for them in the imported eclipse project)
    txt
    txt
    tvrpgLog1.txt
    5K
  • ar2rsawseenar2rsawseen Maintainer
    Accepted Answer
    It could be, I don't know never tried it :)

    1) check if file really exists in your apk
    2) check if whole path name case is the same as you use
    3) if both previous are yes, then probably _ is not allowed
  • I removed the underscores, now it works!!!

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.