Game crashes (SOMETIMES) on layout starts

0 favourites
  • 14 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 :)
  • Hi All,

    I unfortunately can't post my capx here, but I'm wondering what could possibly cause my game to crash every so often on the start of new layouts. In each level my CPU never really goes over 50-60%, memory has never been over 60-70 mbs. Object count can be upwards of 1000, but I have another game that has well over 5k-6k and that has never crashed like this. The game just closes and gives no warning why. It even crashes on boss levels where there are no enemies that have behaviors or any of that.

    When I tried to run it in Chrome, it finally gave an error saying "Chrome ran out of memory". I know that's not the case, because the other game that had thousands of objects has over 200-300 mbs of image memory per level and it runs fine.

    Has anyone else encountered anything like this? I'm kind of stuck and don't know how to test this since it doesn't happen every single time...

    *EDIT* It shouldn't matter, but I do have a tilemap with squares that has the solid behavior on it - is that a bad approach?

  • Try clear the game memory on your phone and see if that help.

    If not try rebuild it again from start export to a new folder.

    If not run over your code again and i bet, you'll find a line of code that when it trigger it cause the game to crash speaking form experience when i was making Sudoku Nano

  • wizdigitech - that's the kicker. I'm running this on my 64 gb of RAM i7 octocore nvidia 1080 gtx machine. This will be a NW game for steam.

    Also to get my fps down I have to enable code that does a collision check 10,000 times every TICK for testing. That's why I'm so confused

  • It sure sounds like a memory issue to me. Have you tried checking task manager as the game runs? There is probably something in your events that you haven't caught in the debugger yet. It's near impossible to tell without a capx though.

  • Burvey - I can't use the debugger because the game shuts down when it normally would. I'll check the debugger but in theory there shouldn't be a limit (and I don't even know how you can create more memory with objects you're already using)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • All you need to do is make a mistake on one event that creates an object, forget to add trigger once while true or accidentally put it in a loop and within a few minutes you have a million objects that look like just one if you're not in the debugger. (That's just an example, it's likely not your issue, but I'm just trying to say that one little mistake can lead to big problems.)

  • Burvey - I've looked through my events like a hawk - I couldn't find anything that could even remotely cause an issue like this. I'm starting to think actually my capx is just corrupt. It's all pixel art and has around 48.9 mb used in the most intensive layout, yet saving can take upwards of 2 minutes, and even opening takes a minute or so. I have much bigger projects that don't take that much (and no audio is loaded into the capx yet, either).

    I did have a level editor that I copied from his capx into mine, so I'm wondering if something got screwed up there (as well as loading xml files from Tiled). I might try creating a new project and copying everything into that to see if it breaks anything.

  • Yeah, I was going to say you should start a new project, import all your images etc and copy your event sheets over and see if that fixes it for you (don't forget to make sure you set up all the object properties etc again as well or you wont be able to copy the event sheets). If you would like a fresh pair of eyes to take a look at the capx feel free to PM me. I will delete it afterwards and I won't share it with anyone. Either way, good luck.

  • Burvey - I'll let you know. Thanks for the help!!

  • You have an open loop somewhere in your events. Start undoing one at a time until you find the culprit.

    I would guess it is in your ON TICK event.

  • lamar

    I can't think of any loop events that would blatantly crash the game like that without an error message. And 3000 events is a lot to go through

    It's only happening on one stage, too (2 if you count the boss stage, but they're using the same resources) - and it's not consistent, either.

  • Well if it wasn't happening before and now it is then it is some recent event you added or changed.

    I use a test text on big games when that happens. Just set a text to a global variable you suspect and have it post to the screen while you play and watch for the culprit.

    Good luck!

  • lamar - all stages are using the same exact code, so the fact that it only crashes on a specific stage to ME means something has to be corrupt. I could be crazy (and I wish I was!!)

  • I know I'm going to jinx it, but I created a new layout and recopied everything into that layout - so far it hasn't crashed once. More of an FYI

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