How do I debug a seemingly random game crash? [Solved]

0 favourites
  • 6 posts
From the Asset Store
Minimalist Crash Balls is a game where the goal is to hit the ball on the portal, with 20 different levels :)
  • Hey folks,

    testing on android i noticed that sometimes my prototype crashes without an obvious reason. The loogic runns pretty much in a loop and nothing SHOULD change.

    Also it crashes completly, animation are still playing, but the playerbox is not moving anymore.

    here is what the browser console says from the one time i was able to reproduce this on pc:

    gyazo.com/ede4ef7e74ca3b67cb0dbccd0fc8b509

    function PickDistance(which,x,y){const sol=this.GetCurrentSol();const instances=sol.GetInstances();if(!instances.length)return false;let inst=instances[0];let wi=inst.GetWorldInfo();let pickme=inst;let dist2=C3.distanceSquared(wi.GetX(),wi.GetY(),x,y);for(let i=1,len=instances.length;i<len;++i){inst=instances;wi=inst.GetWorldInfo();const d2=C3.distanceSquared(wi.GetX(),wi.GetY(),x,y);if(which===0&&d2<dist2||which===1&&d2>dist2){dist2=d2;pickme=inst}}sol.PickOne(pickme);return true}

    Could anyone point me in the right direction to what this could be related?

    Normally when i have a problem i can always fix it in construct, but this somehow could be an engine bug maybe?

    Kind regards

    Update: I found out that it has something to to with the tap gesture. I read swipes left right up down. Also i have a action "on tab gesture" when i do a lot of tab gestures and start a swipe at the same time it crashes for some reason... I actually made a check that that the tap gesture can only fire when its not in touch, but that did not help. i somehow can make it crash...

    Seems to be a bit buggy, ill try to find a workarround...

    Tagged:

  • You should probably report that one on the issue tracker.

    github.com/Scirra/Construct-3-bugs

    I'd guess Construct attempts to get the coordinates of an instance that doesn't exist anymore based on that code.

  • HEy WackyToaster, thanks, you are actually right i think, i boiled it down to a "pick by comparrision" where the system trys to pick a Sprite (skin for a 3d Object) i dont know yet why it not exists tho. It was just by chance that it alyways happened while moving, also it seems to not happen when not moving... I am still on it.

    Should i still report it? Because even if it does not exist any more for any reason that should not crash the game? Or should it?

    I am facitnated how you found that from this code haha :D

    Thanks!

    Update: This is really a strange bug.

    It happens even if there is no event after the trigger, "On animation finished" so amybe an animation gets triggerd or something and then the object gets destroyed... But still this makes no sense. But it is this trigger that causes the problem.

  • I did not really found the issue in the end but by avoiding those triggers it now works for me...

  • Yeah you should absolutely report that still. Crashes like this shouldn't happen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Allright, thanks, i have to find a way to replicate the issue in a minimal capx... Problem is testing takes a very long time as the crash sometimes only happens after minutes... it took me like 8 hours to alone find the caus :(

    Ill try!

    Kind regards

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