How do I get rid of crashes?

0 favourites
  • 10 posts
  • Hi everyone,

    I have a few games on google play,and the weird thing is they work on some mobiles and crash on some...

    Many people complained me about the crashes,so how do i get rid of crashes? Is it the engines problem or mine?

    Note : pls dont tell that its memory issue and phone limitation, bcoz the same phones can run angry bird, temple run, subway surfers etc flawlessly and i can see that those games uses much more graphics than my simple game.

    Even if it is actually a memory issue,i wonder how come other games cope up with it and not the games with c3?

    Tagged:

  • How much memory does your game use?

  • Estimated Image Memory is just 50 mb.

  • Bump!

    How do we check the cause of crashes and fix them?

    I couldn't find anything helpful about this in forums, that's why i asked....Isn't this really important to find the reason and fix it?

  • There's little anyone can say without more information about the crashes.

    All I can do is speculate, and a top cause of crashes is bugs in the device's GPU drivers. Welcome to software publishing...

  • In most other languages there are things called exceptions that can be checked for.

    en.wikipedia.org/wiki/Exception_handling

    In some languages, exceptions can be checked for globally so that if the program crashes anywhere, it breaks out of what it's doing and the programmer can decide how to handle the crash, like a bug report. In JS there is the try/catch which can be used on blocks of code to find when things go wrong.

    In Construct there appears to be nothing like this. In most languages

    4÷0

    would cause an exception. In construct, it let's it fly and gives the results as Infinity. This tells me that Construct is likely set up to at least avert crashes caused by the programmers bad code.

    So, as far as I know, there's no way to have your actual app check itself for errors or crashes and report those crashes back to you. My method of debugging is to run in Chrome and hit the F12 to bring up the developer console. I keep watch on it to see if any serious errors are occurring. If my app runs on my hardware, it's able to do everything I want it to do and I see no errors, then I've done all I can.

    As Ashley pointed out, there are so many different hardware and software configurations out there that it's impossible to test for all of them.

    About the closest thing I've found that can help you track down errors is this:

    stackoverflow.com/questions/19846078/how-to-read-from-chromes-console-in-javascript

    I haven't tried this, but supposedly this JS will capture the console log (in Chrome, I don't know about other browsers). You could likely adapt this to store the log locally and send that log back to a web server somewhere where you could review it. Determining whether the app crashed or not is another ball of wax you'd have to solve. Another thing that could give you some insight is the PlatformInfo plugin. The information it provides is pretty limited but you could also have that sent back to a server to at least know what OS the user is running.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for replying and the info...

    I found this in forums... https://www.construct.net/en/forum/construct-3/general-discussion-7/debug-apk-135635

    can i track down the crash error at start of the app?

  • AFAIK there's no way to determine if an app crashed or the user simply closed it normally, ended the task or exited normally. And, the console log doesn't keep a history that I know of, it's created as the app is running.

    If I really wanted to track down a specific cause I'd have a 'hidden' debug mode which sets a boolean to true if the user selects it and stores that as a local variable.

    I'd use the Browser plugin to write various events in my app to the log (if debug is true) to keep track of what the app is doing. I'd use the JS code above to try to constantly capture that log and store it locally as well. The next time the app is run, I'd check to see if the debug is true and if so, either send that entire log off to a server somewhere or have a 'developer' layout where you can pull that previous run log up and examine it.

    Using that basic method, you could at least determine where the app crashed and possibly the cause.

    You could test your app on your phone in developer mode as that post suggests but more than likely, if your app runs fine in preview without errors, any errors generated on your phone are likely going to be a result of that platform's hardware/drivers/etc and not bad code.

    Again, all of these ideas are just theories, nothing I've actually done or tested.

  • If users are complaining about crashes, normally I would expect that to be an "app closed unexpectedly" type of crash, in which case I'm afraid little of what Fengist mentioned is relevant. It would mean the browser engine or OS crashed, in which case nothing you can do in Construct, JavaScript or dev tools will help you. However the Play Store dashboard should have reports about any crashes that happened in your app with more details about them.

    This is why it's critical to get more information about the exact problem - without clear information about exactly what people mean and what they are seeing, all anyone can do is throw out wild guesses.

  • If users are complaining about crashes, normally I would expect that to be an "app closed unexpectedly" type of crash

    Yes they complained about the "app closed unexpectedly" crash.

    the Play Store dashboard should have reports about any crashes that happened in your app with more details about them.

    Currently playstore shows that there were crashes

    But there are no reports to download (may be because it says that it "collects data from Android devices whose users have opted in to automatically share usage and diagnostics data")

    I will share here if i get any reports.

    Meanwhile thank you both for sharing info.

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