• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows I'm Having Urgent, Severe Program-Breaking Issues I've Never Experienced Before [UPDATED]

J

JBonesy

Guest
Hello Everyone,

I've been working on a huge Game Maker project for almost 4 years now. Because of reasons detailed below, I've on version 1.4.1757 (STEAM). I've been using the YYC Compiler as well, because it's essentially needed for the scope of the project. Throughout the years, I've stayed up to date with versions, and although I've experienced minor problems, I've never truly experienced something which has completely broken everything for me. I've come to a point which is...near impassable to say the least and I'm not sure what to do.

For the last few weeks, everything had been working fine for the most part, but recently (and without updating strangely enough) things seem to have just broke. I don't know if there's a memory limit to game maker regarding assets/scripts and I've broken that limit or what. The project is absolutely massive, and unfortunately due to its commercial nature I cannot share the entire source or executable at this time.

The main problem is the fact that I can no longer access global variables once I change rooms. At all.
So for example, if I'm in Room A and declare this

Code:
global.myArray[0] = "test"
global.myArray[1] = "test"
and then switch rooms and try to access say, "characterName = global.myArray[1]", the game instantly crashes with no error message. The arable names are arbitrary; it doesn't matter what I use when, where/how, or in what room. Whenever I test this three-five consecutive times, the error changes to the point where I can't even load the initial room once my player object spawns. Oddly enough, if I add a "show_message(1)" as a debug, it'll override this error and I'll be able to access the room, but then I still can't access the global variables. It's absolutely bizarre.

Every so often with oddly placed "show_message(1)" debugs I'll get a glimpse at an error message which says "error: index 0 out of bounds" or "error: index 33 out of bounds" despite none of these being called by any objects in the room.

Furthermore, I can't upgrade to the next beta/version (or early access) because I get a weird error saying "sound_add" and "sound_replace" don't exist...even though I don't have them used in any script (or extension) in the game. I can't downgrade too far because of reliance on the UGC workshop functions, alarm_set, and also socket create ext commands.

This project has taken up thousands of hours...and I'm incredibly said that this may be the issue that finally forces me to give up. I would appreciate any, ANY help.

Thank you so much in advance.


EDITS:
Okay, so upon closer inspection, the actual issue seems to be Game Maker is running out of memory. My project, upon running a diagnostic, is over 84K lines of code. After doing some debugs, I've determined (from the only error message I've ever recieved as well saying "out of memory"), that I'm genuinely running out of memory. It can't be my PC though, I have a very high end machine. Any further ideas?

Edit 2: Yep, pretty much confirmed. Adding even 5 lines of code to the game seems to break it once leaving from a menu to the actual game itself. I'm stuck and incredibly frustrated.However, adding these lines only seem to matter when the "player" object exists, regardless of what it actually is. This is absolutely bizarre.
 
Last edited by a moderator:

zircher

Member
Don't have an answer, but I do have a question. If you set a break point there in the code and run it in debug mode, can you see the value before it crashes?
 
J

JBonesy

Guest
Don't have an answer, but I do have a question. If you set a break point there in the code and run it in debug mode, can you see the value before it crashes?
Because I use YYC Compiler, I can't actually use Debug to set a breakpoint. The closest I've done is with show_message() returning values relating to certain points in game.

Some other odd notes seem to be redeclaring the variable in a create event after the room change cause it to work, so changing rooms is somehow resetting all global variables for sure. From what it looks like, unconfirmed, it seems whenever i access a variable from the global array, the array then resets to undefined and must declared again each time it's accessed, which is absolutely bizarre.
The "instant crash on room start" only happens in fullscreen (which seems to be why show_message() circumvents it) despite there being no if statements to actually check or do anything different in fullscreen/windowed.

I've submitted a support ticket to YoYoGames as well given the type of issue. Very weird stuff.
 
J

JBonesy

Guest
Just a tip: you can use show_debug_message as well ;)

Also, why not run it without the yyc and use the debugger then? You should be able to get by without that extra fps boost, right?
I seem to get odd errors about "duplicates in code", and I'm not quite sure what the compiler means by that. :/
I only seem to get the error when running through the debugger too.
 

Rukola

Member
I seem to get odd errors about "duplicates in code", and I'm not quite sure what the compiler means by that. :/
I only seem to get the error when running through the debugger too.
It's hard to help without knowing more. I Googled your error message and came across a switch(variable) and this topic.

Your first post though describes a pretty serious but most likely solvable problem so keep at it. Even if it were GameMakers fault, you can pinpoint and work around it.
 
J

JBonesy

Guest
It's hard to help without knowing more. I Googled your error message and came across a switch(variable) and this topic.

Your first post though describes a pretty serious but most likely solvable problem so keep at it. Even if it were GameMakers fault, you can pinpoint and work around it.
You're certainly right, it's hard for me to tell exactly what's happening either, that's the problem. Tomorrow I'll try to do some more diagnostics and see if there's anything I can pinpoint.
 
J

JBonesy

Guest
EDITS:
Okay, so upon closer inspection, the actual issue seems to be Game Maker is running out of memory. My project, upon running a diagnostic, is over 84K lines of code. After doing some debugs, I've determined (from the only error message I've ever recieved as well saying "out of memory"), that I'm genuinely running out of memory. It can't be my PC though, I have a very high end machine. Any further ideas?
Updated OP with this, I seem to be making some progress with the issue although I have no idea how to solve it.

Edit 2: Yep, pretty much confirmed. Adding even 5 lines of code to the game seems to break it once leaving from a menu to the actual game itself. I'm stuck and incredibly frustrated. However, adding these lines only seem to matter when the "player" object exists, regardless of what it actually is. This is absolutely bizarre.
 
Last edited by a moderator:

Nocturne

Friendly Tyrant
Forum Staff
Admin
Okay, I've had a chat with YYG support about this and they have asked me to tell you to file a bug report and include the project that is giving you the issue (export it as a GMZ and host it somewhere then give them the link, and link to this topic too). So file it here: http://www.yoyogames.com/bug and they'll look into it with you.
 
J

JBonesy

Guest
Okay, I've had a chat with YYG support about this and they have asked me to tell you to file a bug report and include the project that is giving you the issue (export it as a GMZ and host it somewhere then give them the link, and link to this topic too). So file it here: http://www.yoyogames.com/bug and they'll look into it with you.
If I do so won't my project be public on the bug-tracker? Is there any way to avoid this? I don't want the entire code/project of a future commercial game to game public if it isn't needed.
 

FrostyCat

Member
File your bug anyway and ask for the ticket to be marked as private. There are provisions for that in Mantis for commercial projects.

Another better idea would be to try and reproduce the bug in a smaller demo, with just that part of the project's code in it. That way it is much easier for others to quickly test the code or offer workarounds.
 
Top