game sometimes freezes on first load of new APK build

0 favourites
  • 8 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • So this is a weird thing. I noticed it once on my Android phone (S7) after downloading a new update where I had added bunch of sounds and music to my game. On the first time load of the newest version, the game froze at the Construct loading screen. A restart of the phone fixed the issue and I didn't have it happen again for any new updates.

    Then today I opened up access to my game for testing. One of the first comments I got was that the game doesn't get past the loading screen (OnePlus 5), and that the bar freezes about 2/3s of the way across, pretty much exactly where mine froze that first time. So I suggested a device restart and, sure enough, the problem went away.

    Now obviously this is not an ideal situation. If the game requires users to restart the first time then you can imagine how bad this looks. I'm not sure if this might be related to loading of sounds (currently the game preloads sounds at startup) but that's my gut feeling based on the fact that this didn't happen until I added a bunch of new sounds/music. The game itself is small in size at 10Mb so I don't see what's causing it to hang (corrupted sound file maybe, if that's possible?)

    A link to the game is below. While I won't post the c3p, if a member wants to have a look inside I'm happy to communicate via pm.

    play.google.com/apps/testing/com.lukewebster

    Thanks

  • It might be a bug that has been around for while that causes the Games to Freeze although those Bug Reports are specific for ios and you are on Android but it might be related

    https://github.com/Scirra/Construct-3-bugs/issues/2553#issuecomment-467673506

    https://github.com/Scirra/Construct-3-bugs/issues/2548

    it looks like shortercode found some Fix

    Check the Browser Log if you see any Error Like >>>Failed to Load Textures then you know is the same Bug other ways will be something else

  • Thanks for the reply. Not sure it's possible to test the log in APK is it? Never had this issue launching from pc.

    Having said that, I also noticed that sjrya says this: '-After some trial and error, I converted all my audio files (Sounds) back to .m4a from .webm and that seems to have solved my problem.'

    Which makes me wonder if this is somehow related to my issue, which only started after I added some sounds. In fact, I didn't even get the loading bar prior to importing the sounds, it would load instantly into the game.

    Going to do make a test version of my game with all the sounds removed and see what happens.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So removing all the sounds in my project made it load instantly. The loading bar did flick on for a frame before going straight to the first screen before the bar even had a chance to animate, so essentially instant.

    Likewise, setting the project to not preload sounds has the same effect.

    I'm wondering if I screwed up the encoding with one of my .wav files. This didn't happen until I loaded in my second set of sound files, so maybe I have one in there that's not playing along.

    For now, I think I'll just leave preload sounds off.

  • You didn't mention which version of C3 you're using - is it a beta release? If so there are known issues with WebGL 2 on Mali GPUs (which the S7 has).

  • Hey LukeW

    If you have your computer set up for Android development you can use Chrome developer tools for an attached device and view webviews for debug applications and Chrome pages.

    You can see a guide on it here

    developers.google.com/web/tools/chrome-devtools/remote-debugging

    Depending on the device you may need some additional set up, Samsung devices seem to require you to start a "ADB" session with the device first. I normally do this by opening Android Studio with a random project and selecting the "logcat" tab ( which is like the console for the Java side of your apps code ).

    In terms of audio files some audio decoders don't like very short files, I'm not sure what audio format your using but .m4a .aac and .mp3 files have historically been problematic ( but mostly solved now I believe ). If you can find a good way of reproducing this issue then we would like to take a look.

  • Ashley running the stable channel.

    Nepeo I'll have a look at that stuff when I get home from work today. I do have some small sounds files in there at 3-4kb, however, they're all .wav files.

    I was thinking about this this morning though. I use a few different programs to generate sounds. One of those programs is FL Studio. I don't think I was having this issue until I imported some sounds made in this (because I imported a whole bunch from different sounds generators at once, I didn't see the link). I'm wondering if I delete the sounds made in FL Studio whether my load times will vanish again. I will try this when I get home as well.

  • well, looks like it wasn't the FL Studio audio files causing the issue.

    I think I'm going to leave this for now, running without preload sounds on seems to be doing the trick anyway.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)