Game crashes (SOMETIMES) on layout starts

Discussion and feedback on Construct 2

Post » Thu Jan 19, 2017 7:20 pm

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?
Last edited by ome6a1717 on Thu Jan 19, 2017 7:33 pm, edited 1 time in total.
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

Post » Thu Jan 19, 2017 7:29 pm

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
Image
B
36
S
11
G
2
Posts: 312
Reputation: 3,739

Post » Thu Jan 19, 2017 7:34 pm

@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 :P
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

Post » Thu Jan 19, 2017 10:34 pm

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.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Thu Jan 19, 2017 11:16 pm

@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)
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

Post » Fri Jan 20, 2017 4:10 am

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.)
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Sun Jan 22, 2017 11:08 pm

@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.
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

Post » Sun Jan 22, 2017 11:29 pm

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.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Mon Jan 23, 2017 12:31 am

@Burvey - I'll let you know. Thanks for the help!!
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

Post » Mon Jan 23, 2017 12:43 am

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.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Next

Return to Construct 2 General

Who is online

Users browsing this forum: digitalsoapbox, jobel, mhls, tarek2 and 6 guests