• 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 Draw Functions Stopped Working in Every Object

S00T

Member
while working on my game today i ran it and suddenly everything that was supposed to be drawn to the screen stopped being drawn. objects still render and the code outside of the draw scripts run perfectly fine, but it's like the draw scripts aren't even running.

this happened at random to every object with a draw function, and despite cleaning the project the issue is still there.
the code and variables in these sprites weren't changed since i last ran the game.

is there any way i can fix this, or should i just transfer all my sprites and their code over to a new project and start from scratch?
(this is occurring in version 2.2.5)
 

TsukaYuriko

☄️
Forum Staff
Moderator
Does this also happen with the most recent backup or previous commit?

Have you tried restarting your device yet?

You might also want to try exporting your project and importing it back as a new project.
 
What happens if you put a debug message in your Draw Events? Do any of the messages get displayed in the console/output? If so, then the events are running so it would be something else in the events that are making them not draw. Perhaps you could show us the code in some of the Draw events in case there is something that is causing things not to render.
Have you also tried clearing the cache (broom icon) and then see if things work?
 

S00T

Member
What happens if you put a debug message in your Draw Events? Do any of the messages get displayed in the console/output? If so, then the events are running so it would be something else in the events that are making them not draw. Perhaps you could show us the code in some of the Draw events in case there is something that is causing things not to render.
Have you also tried clearing the cache (broom icon) and then see if things work?
i tried clearing the cache several times, but it did nothing
the draw script doesn't even run this debug message
there's nothing telling the sprite to delete itself, either
1621198459015.png



Does this also happen with the most recent backup or previous commit?

Have you tried restarting your device yet?

You might also want to try exporting your project and importing it back as a new project.
i tried restarting my laptop as well as exporting and re-importing the project, still nothing
 

TsukaYuriko

☄️
Forum Staff
Moderator
Did you also try loading the most recent backup or previous commit? Does the issue occur there?
 

TsukaYuriko

☄️
Forum Staff
Moderator
That's probably because there's no setting to enable backups... :)

It's your responsibility to keep the data you care about safe. I strongly recommend starting to use source control, or at the very least making regular backups. Cases like this is a prime example of why that's a good idea.


Are you 100% sure that you didn't change anything about the code? Not even a single line? A single draw_enable_drawevent or draw_set_alpha is all it takes to completely mess up all drawing.

To localize the issue: Does this only happen with this game, or also with an empty project?
 

S00T

Member
That's probably because there's no setting to enable backups... :)

It's your responsibility to keep the data you care about safe. I strongly recommend starting to use source control, or at the very least making regular backups. Cases like this is a prime example of why that's a good idea.


Are you 100% sure that you didn't change anything about the code? Not even a single line? A single draw_enable_drawevent or draw_set_alpha is all it takes to completely mess up all drawing.

To localize the issue: Does this only happen with this game, or also with an empty project?
ah, my mistake, sorry about the confusion about backups.
as for your questions, it seems that the only sprites with draw scripts when it first broke are affected. if i create new draw scripts in other sprites they work just fine, and it works in empty projects as well.

Update:
the game completely broke. it encountered a fatal error, forced me to save and close.
i took the files out of the game and put them into a new project one by one before replacing all the broken sprites with copies. everything seems to be working fine.
i'll definitely remember to make backups from now on. if i had realized that feature wasn't built in this probably wouldn't have even happened.
thanks for putting up with my complete lack of understanding of this program
 
Last edited:
Top