OFFICIAL GMS2 2.3.2 Stable Release

Status
Not open for further replies.

ZigZag

Member
Hi @ZigZag. Did you figure anything out or log a ticket for this? I haven't moved to the update yet, but iOS not working would be a major problem for us.
Hi @clee2005, sorry I have been busy with other things, I got it working by installing GMS2 on the mac, exporting from windows then importing on the mac and then building from there. This worked without any issue and was sufficient for me at the moment, but I will get back to it right now and make an official bug report so YoYo can have a look at it. I have not gotten direct mac/ios export/build from windows to work.

UPDATE: After submitting a bug report, the bug has been officially confirmed, so crossing my fingers for a fast fix.

Sincerely
 
Last edited:

rwkay

GameMaker Staff
GameMaker Dev.
@ZigZag @clee2005 we have fixed the issue internally here - you can create executables on the mac itself the issue arises when using a windows machine to build on the mac, so there is a work around. We are considering an update, but it would be next week at the earliest.

Russell
 

FrostyCat

Redemption Seeker
YoYo Marketplace seems to be instantly rejecting all asset updates from GMS 2.3.2.556 (Marketplace > Update Asset Package), and getting stuck forever on "processing" when trying to update by an uploaded YYMPS file. I have put in a ticket for this last week, but there has been no response to date. Is the web development team aware of this?
 

mimusic

Member
So regarding this change:
As part of this change, each individual static variable in a given script/function are now handled first when compiling that script/event, so that their value can be used by the rest of your code
So this means that it's no longer possible to use non-static variables when initially declaring a static variable? Previous versions of 2.3 allowed this behavior, which is definitely convenient when having to statically declare something that requires some calculation/function calls beforehand.

For example:
GML:
test_func = function() {
    var _array = [0,1];
    static _array_copy = [ _array[0], _array[1] ];
    return _array_copy;
};
test_func();


This works fine prior to 2.3.2, but now gets an error about accessing something that isnt an array (understandably so, given the new changes). To get this working in 2.3.2, it seems the 2 easiest approaches are the following:
  • Declare _array statically as well
  • Initially declare _array_copy as a throwaway value (like undefined), and properly assign within an if-statement:
GML:
var _array = [0,1];
static _array_copy = undefined;
if (_array_copy == undefined) {
    _array_copy = [ _array[0], _array[1] ];  
};
return _array_copy;

Obviously both of these fixes are a little messier than the previously-working approach, since one of them puts more stuff into memory 'permanently' and the other requires more code + a per-call condition check that (to me) feels less intuitive. Logically it makes sense given the changes, so I'm mostly asking this for peace of mind before I go changing a bunch of this kinda thing in my projects:

in this type of situation, is this the intended behavior?
 

FoxyOfJungle

Kazan Games
Edit:
Summary: GMS 2 modified the code when importing into the new version.
Forget it, I really don't know how it worked before and then it stopped working on the update, honestly.
I'm 100% sure that it worked before, because I had the project open and working the last time, see it working on my profile (inspector).

--------------------------------------

Hello.

This new update broke something related to arrays apparently (I think there is apparently a problem with converting string to real and vice versa. Or maybe it's related to structs, I don't know how it works internally)...
It's returning an error saying I need a number, but it is impossible, as I am explicitly sending a string:





Attention, even if I change from "12345" to "test", it still gives the same error.


Before the update I am 100% sure it was working.

Thank you.
 
Last edited:

Alice

Darts addict
Forum Staff
Moderator
@FoxyOfJungle It's because it's array_length(gui_index) instead of what probably should be array_length(_array). What you were passing to array_length wasn't an array, but apparently a struct/instance?
If this kind of code passed earlier but now shows an error, then it's probably an improvement because array_length of struct shouldn't be a valid insert index. The way it "worked" so far would likely lead to some inexplicable bugs further down the road.

On a side note, I think array_push(_array, _item) will be better in your case, since you just want to add an item to the end of an array (considering the index is always array length), not at an arbitrary index.
 

FoxyOfJungle

Kazan Games
@FoxyOfJungle It's because it's array_length(gui_index) instead of what probably should be array_length(_array). What you were passing to array_length wasn't an array, but apparently a struct/instance?
If this kind of code passed earlier but now shows an error, then it's probably an improvement because array_length of struct shouldn't be a valid insert index. The way it "worked" so far would likely lead to some inexplicable bugs further down the road.
I think that I am accessing the array correctly šŸ¤”, it "takes" this empty array from the first function and adds it to the end of the array:



What's happening is that the GMS is wanting the name argument to be a real value, but that doesn't make sense...
I tested using array_length(_array) and gave an error too...

Now I don't remember or don't know if GMS may have modified the code when I imported it in the new version, but before it worked.

On a side note, I think array_push(_array, _item) will be better in your case, since you just want to add an item to the end of an array (considering the index is always array length), not at an arbitrary index.
Yes, this is literally what I was doing using array_insert, I am going to test using array_push().
Thanks!



Edit:

array_push() works!
Thank you. Well, that was weird lol


Edit2:

I came to the conclusion that GMS changed my code :oops:, I had just put array_length(_array) and it worked after I deactivated the other functions that were modified too! o_O

 
Last edited:

Alice

Darts addict
Forum Staff
Moderator
No, if you do array_length(gui_index), you pass the new gui_main() { gui_item_list: [] } struct, not gui_item_list array.

Just to make sure: what does the array_length(gui_index) return? What about array_length(_array) or even _array itself?
Could you print these out with show_debug_message and see what happens?

Going by the error message, it seems like array_insert is receiving an undefined value instead of a number; the string has nothing to do with it. Also, it happens for argument 2 which can be either the index argument (which is 2nd in 1-based count) or the value argument (which is 2nd in 0-based count).
The _item variable seems to be defined properly, so whatever is this "undefined" value the code is receiving, it seems like it's the index argument.
 

FoxyOfJungle

Kazan Games
No, if you do array_length(gui_index), you pass the new gui_main() { gui_item_list: [] } struct, not gui_item_list array.

Just to make sure: what does the array_length(gui_index) return? What about array_length(_array) or even _array itself?
Could you print these out with show_debug_message and see what happens?

Going by the error message, it seems like array_insert is receiving an undefined value instead of a number; the string has nothing to do with it. Also, it happens for argument 2 which can be either the index argument (which is 2nd in 1-based count) or the value argument (which is 2nd in 0-based count).
The _item variable seems to be defined properly, so whatever is this "undefined" value the code is receiving, it seems like it's the index argument.
Yes, you are absolutely right, the mistake was that for some reason, after the update, GMS modified this part of the code, so much so that I have two projects that use the same functions and both presented this error, and before it was normal, how did this happen? I don't know, but that's when I opened it today. So I didn't even notice that this part had been modified šŸ˜ (this explains the array_insert didnā€™t work)


Just to make sure: what does the array_length(gui_index) return? What about array_length(_array) or even _array itself?
Could you print these out with show_debug_message and see what happens?
Do not need. I already know what will return, but if you want to:

1617869781020.png

1617869771764.png
 
Last edited:

Alice

Darts addict
Forum Staff
Moderator
Ah, alright, so array_length(_array) fix did work after all (then again, as we established array_push will suffice here)? Good to know.

And everything was fine with array_insert once again...
 

FoxyOfJungle

Kazan Games
Ah, alright, so array_length(_array) fix did work after all (then again, as we established array_push will suffice here)? Good to know.

And everything was fine with array_insert once again...
Yes...
Basically only one variable was modified and caused the disorder lol
I'm sure I didn't make that reference because it doesn't make sense for me to use the id of a struct within the size function of an array.

Now I don't know how it happened, to be honest. Sorry for the inconvenience. And thanks for mentioning array_push, I haven't tested it yet before.

--------------------

Edit:
Well, I think there is something very wrong, the whole system I made is broken (really)... Apart from this problem, now there is another one, it is drawing all the items inverted, and if I add more items to the array (which are of different types), will give an out of bounds error. And I have a backup of the old project, this drawing code part has not been modified...

1617875380502.png


Edit:
I managed to solve this by inverting the order of the loop and adding items from position 0, not from the last position, as I was doing with array_insert... But it is strange because it did not happen before.

 
Last edited:

drandula

Member
About try-catch blocks, how their memory usage should behave? Do they create some kind of reserve for later uses?

My code uses try-catch blocks (also nested), and executing it makes memory usage grow. If you make it execute long enough, it will rise pretty high.
After execution has been finished, and garbage collector can kick in, gc cleans only half the memory used. So if memory usage was 10MB before executing code, and it grew to 400MB during execution, it will drop around to 200MB. Calling code again will make memory usage grow to same 400MB as before, and dropping back to 200MB, therefore memory usage isn't cumulative.

This extra memory usage will not be clean if you try manually use gc, or change room. The code uses only structs and arrays, so they should be garbage collected. I am pretty sure it is try-catch blocks which causes strange memory usage, though I am not certain.
 

Slyddar

Member
After updating to this version, I opened a previous project and custom order showed nothing in the assets browser. I select A-Z or Z-A and everything is back, but not in the order I had them since I was using custom. Anyone else find their custom order assets vanished when moving to this version?

So I can't even use custom anymore, as nothing is there. No groups, no assets, just the Quick Access menu. Guess I'll file a bug, as working on the project going forward without custom order will test my patience too much.

EDIT : I closed GMS2 and restarted, and this time the custom order showed all the items as they were pre 2.3.2. On opening the project earlier in 2.3.2 the first time, the standard warning message appeared about opening a previous version, while this time it didn't as it had saved and updated. Possibly something was different due to this.
 
Last edited:

rwkay

GameMaker Staff
GameMaker Dev.
About try-catch blocks, how their memory usage should behave? Do they create some kind of reserve for later uses?

My code uses try-catch blocks (also nested), and executing it makes memory usage grow. If you make it execute long enough, it will rise pretty high.
After execution has been finished, and garbage collector can kick in, gc cleans only half the memory used. So if memory usage was 10MB before executing code, and it grew to 400MB during execution, it will drop around to 200MB. Calling code again will make memory usage grow to same 400MB as before, and dropping back to 200MB, therefore memory usage isn't cumulative.

This extra memory usage will not be clean if you try manually use gc, or change room. The code uses only structs and arrays, so they should be garbage collected. I am pretty sure it is try-catch blocks which causes strange memory usage, though I am not certain.
OK this is misreporting from the memory usage as when structs are freed they are merely returned to the object memory pool and the size of these free objects are not being subtracted from the total memory usage, we will fix this in a future update.

All structs that are free will get recycled when a new struct/instance is required - it just avoids the overhead of reallocating memory in the first place - but the memory is regarded as free. If a new struct is created then it will reuse the ones in the free list.

Russell
 

drandula

Member
OK this is misreporting from the memory usage as...
Thanks for the reply :) so it's just how debugger shows memory usage, not actual memory leak?
For example this piece of code causes it to previously mentioned behaviour.
1617892124274.png

As you were speaking of structs which cause misreport, in this case the catch "_e" is only struct and it gets misreported, correct?
 

gnysek

Member
How it looks compared to what Task Manager shows?

Also it seems that compiler could get some optimization, that if catch block is empty, then no struct is created (however I'm not sure if it's possible to do a catch without creating struct - or maybe one global struct should be reserved for catches, instead dynamically creating new one every time). Definitely there's a field for optimization here.
 
I don't know if this has been mentioned or not, but I'm experiencing 2 really annoying situation, adding unnecessary steps in my progress;
  1. when I replace a sprite in the sprite editor (import button) , the changes isn't immediately reflected in the room editor. it'd still be showing the old image. When run on the emulator, it shows the correct new image. To fix it, I've to manually delete and replace the effected sprite/object which is showing the old image from the room editor in order to have it show the new updated image, alternatively I've to close the IDE and rerun.
  2. when I replace a sprite which is being use as tileset, the changes is correctly shown in the room editor, but when I run the emulator, those tiles goes missing. To fix, I've to reassign the sprite in the tileset and have to untick and retick the "disable source sprite export" box in the tileset editor in order to make the emulator show the tiles on screen.
 

rwkay

GameMaker Staff
GameMaker Dev.
Thanks for the reply :) so it's just how debugger shows memory usage, not actual memory leak?
For example this piece of code causes it to previously mentioned behaviour.
View attachment 39390
As you were speaking of structs which cause misreport, in this case the catch "_e" is only struct and it gets misreported, correct?
Yes the exception is a struct in this case as it is the internally created Exception struct, you are creating a million of them at this point, the memory for the variables on the struct is recycled (and accounted for in the memory drop) but the amount of memory for the structs themselves is being left in the pool for recycling.

We will modify this behaviour in the future and in general usage the structs would be continually recycling themselves - we will add something that recycles a proportion of the oldest objects each frame (during the game_speed sync time)

Russell
 

rwkay

GameMaker Staff
GameMaker Dev.
I don't know if this has been mentioned or not, but I'm experiencing 2 really annoying situation, adding unnecessary steps in my progress;
  1. when I replace a sprite in the sprite editor (import button) , the changes isn't immediately reflected in the room editor. it'd still be showing the old image. When run on the emulator, it shows the correct new image. To fix it, I've to manually delete and replace the effected sprite/object which is showing the old image from the room editor in order to have it show the new updated image, alternatively I've to close the IDE and rerun.
  2. when I replace a sprite which is being use as tileset, the changes is correctly shown in the room editor, but when I run the emulator, those tiles goes missing. To fix, I've to reassign the sprite in the tileset and have to untick and retick the "disable source sprite export" box in the tileset editor in order to make the emulator show the tiles on screen.
Please file a bug about this and we will take a look and get a fix into the next version

Russell
 

gnysek

Member
During beta I've got some issue, that when new sprite was added, it was showing sprite on same texture page which starts in 0,0, coordinates, instead of this sprite. But that always was working ok in second and further runs. Maybe problem with tileset is somehow connected.
 
S

Sam (Deleted User)

Guest
Mac extensions now work running from the IDE in VM mode, there used to be a code signature conflict but it appears you guys have fixed that in this version. This was a problem ever since you guys first added support to Catalina a year or two ago. Really happy to see this is finally fixed!


The issue forced users to either use YYC on test runs or do complete builds if they needed to test with the VM export in specific and that was a real pain because a lot of people just thought it was my extensions that were broken on mac and not a problem with GMS. Thank you so much for fixing this! I tested and verified this works not just in the Mac IDE but also the Window IDE when you ssh into your macOS machine to test run on mac. You guys have made my day!
 

xDGameStudios

GameMaker Staff
GameMaker Dev.
So regarding this change:


So this means that it's no longer possible to use non-static variables when initially declaring a static variable? Previous versions of 2.3 allowed this behavior, which is definitely convenient when having to statically declare something that requires some calculation/function calls beforehand.

For example:
GML:
test_func = function() {
    var _array = [0,1];
    static _array_copy = [ _array[0], _array[1] ];
    return _array_copy;
};
test_func();


This works fine prior to 2.3.2, but now gets an error about accessing something that isnt an array (understandably so, given the new changes). To get this working in 2.3.2, it seems the 2 easiest approaches are the following:
  • Declare _array statically as well
  • Initially declare _array_copy as a throwaway value (like undefined), and properly assign within an if-statement:
GML:
var _array = [0,1];
static _array_copy = undefined;
if (_array_copy == undefined) {
    _array_copy = [ _array[0], _array[1] ]; 
};
return _array_copy;

Obviously both of these fixes are a little messier than the previously-working approach, since one of them puts more stuff into memory 'permanently' and the other requires more code + a per-call condition check that (to me) feels less intuitive. Logically it makes sense given the changes, so I'm mostly asking this for peace of mind before I go changing a bunch of this kinda thing in my projects:

in this type of situation, is this the intended behavior?
I wrote a tutorial on that:
[TEXT TUTORIAL] Keyword "static" Explained (Part 2 - Execution Order)
 

Shut

Member
I don't know if this has been mentioned or not, but I'm experiencing 2 really annoying situation, adding unnecessary steps in my progress;
  1. when I replace a sprite in the sprite editor (import button) , the changes isn't immediately reflected in the room editor. it'd still be showing the old image. When run on the emulator, it shows the correct new image. To fix it, I've to manually delete and replace the effected sprite/object which is showing the old image from the room editor in order to have it show the new updated image, alternatively I've to close the IDE and rerun.
  2. when I replace a sprite which is being use as tileset, the changes is correctly shown in the room editor, but when I run the emulator, those tiles goes missing. To fix, I've to reassign the sprite in the tileset and have to untick and retick the "disable source sprite export" box in the tileset editor in order to make the emulator show the tiles on screen.
Please file a bug about this and we will take a look and get a fix into the next version

Russell
I've submitted the bug regarding tilesets about 4 months ago, included the project, videos and all the other details needed. It's been confirmed by your QA support, however no updates about it..
 
Has anyone else's projects or even PC's went black and couldn't close or exist the project or GameMaker Studio 2 if went into fullscreen while the game was running and the only other option was to resart the PC? Ctrl + Alt + Delete doesn't even work.

I had two instances where the player could switch from fullscreen to windowed during gameplay. But after recent updates, it just blacks out my PC and the only other option to fix it is to restart the PC. When this happened, all keyboard keys became useless. I'm reluctant to proceed further testing of it's behavior in case it actually crashes my PC or causes memory loss from all of the hard resets.

Since the screen goes black and I can't access GameMaker Studio 2 application, I can't access the Output log to file a bug report. It usually works the first time fullscreen is switched, but after a second or third (sometimes even on the first time), that's when it goes black. This had worked before no matter how many times I would switch back and forth to fullscreen and windowed.

These are the two places I have the fullscreen switch code at:

o_game (Main persistent Object) Step Event
GML:
if keyboard_check_pressed(vk_escape) {
    if window_get_fullscreen() {
        window_set_fullscreen(false);
    } else if !window_get_fullscreen() {
        window_set_fullscreen(true);
    }
}
In the o_pause_menu_ui Object Step Event using a switch statement.
GML:
case pause_menu_options.fullscreen:
        
            audio_play_sound(Start_SFX, 10, false);
        
            if window_get_fullscreen() {
                window_set_fullscreen(false);
            } else if !window_get_fullscreen() {
                window_set_fullscreen(true);
            }
        
        break;
 

Slyddar

Member
when I replace a sprite which is being use as tileset, the changes is correctly shown in the room editor, but when I run the emulator, those tiles goes missing. To fix, I've to reassign the sprite in the tileset and have to untick and retick the "disable source sprite export" box in the tileset editor in order to make the emulator show the tiles on screen.
Nice! I just spent a good couple of hours trying to work out why a tile layer was not drawing. Thought it was related to other work I was doing, so didn't even think 2.3.2 was to blame, but alas. To fix it all I did was untick "disable source sprite export" close the tileset resource, open it again and retick it. Seems the problem started after updating the tile sprite earlier on. Will log a bug report as well, but I can see that catching out many people.
 

rIKmAN

Member
Since the screen goes black and I can't access GameMaker Studio 2 application, I can't access the Output log to file a bug report.
You can try creating an executable and using command line parameters to log debug info to a file.
-debugoutput <filename>: Sends console output to the filename, excluding any custom debug messages, but including extra information from the runner for bug reporting.
The various parameters you can use can be found in the manual.
 

mbeytekin

Member
High CPU usage persists even in a still blank project. Isn't there really a solution to this? I am in a very difficult situation because most of our users complain about it on Steam. That's why there are refunds. Please I urgently need help with this.
I tried to research everything related to this topic in the forum. The only thing I can find is to set the sleep margin to 1. It only makes a difference of 3-5%. It is around 7-15% in a blank project. In a real project it rarely falls below 20%. I've done all the optimizations I know of, but nothing has changed. I don't remember having such a problem with previous versions, but it has been this way for a long time. If you can tell me if this is due to a bug or something I do not know, I will be very happy.
 

Attachments

Has anyone else's projects or even PC's went black and couldn't close or exist the project or GameMaker Studio 2 if went into fullscreen while the game was running and the only other option was to resart the PC? Ctrl + Alt + Delete doesn't even work.

I had two instances where the player could switch from fullscreen to windowed during gameplay. But after recent updates, it just blacks out my PC and the only other option to fix it is to restart the PC. When this happened, all keyboard keys became useless. I'm reluctant to proceed further testing of it's behavior in case it actually crashes my PC or causes memory loss from all of the hard resets.

Since the screen goes black and I can't access GameMaker Studio 2 application, I can't access the Output log to file a bug report. It usually works the first time fullscreen is switched, but after a second or third (sometimes even on the first time), that's when it goes black. This had worked before no matter how many times I would switch back and forth to fullscreen and windowed.

These are the two places I have the fullscreen switch code at:

o_game (Main persistent Object) Step Event
GML:
if keyboard_check_pressed(vk_escape) {
    if window_get_fullscreen() {
        window_set_fullscreen(false);
    } else if !window_get_fullscreen() {
        window_set_fullscreen(true);
    }
}
In the o_pause_menu_ui Object Step Event using a switch statement.
GML:
case pause_menu_options.fullscreen:
       
            audio_play_sound(Start_SFX, 10, false);
       
            if window_get_fullscreen() {
                window_set_fullscreen(false);
            } else if !window_get_fullscreen() {
                window_set_fullscreen(true);
            }
       
        break;

I actually had the same issue with your PC not being able to be used when switching to full-screen and windowed often.
If I recall correctly, it had to do with something switching modes rapidly...

Check out this thread
 

rIKmAN

Member
I've submitted the bug regarding tilesets about 4 months ago, included the project, videos and all the other details needed. It's been confirmed by your QA support, however no updates about it..
Do you have a ticket number for your bug report?

I'm experiencing the same behaviour as @SnortySnoopy where tiles aren't being rendered on project run (or are still there when they've been deleted in the Room Editor) but I'm not replacing the tileset sprites at all - it happens even with the original sprite loaded when first creating the tileset.

I've reported it myself but if I could get yours and/or SnortySnoopy's ticket numbers I'll add them into my report as well which may help speed things up when they get around to testing/fixing it as they'll have more collated information from multiple reports.

It's a really annoying bug.
 

Shut

Member
Do you have a ticket number for your bug report?

I'm experiencing the same behaviour as @SnortySnoopy where tiles aren't being rendered on project run (or are still there when they've been deleted in the Room Editor) but I'm not replacing the tileset sprites at all - it happens even with the original sprite loaded when first creating the tileset.

I've reported it myself but if I could get yours and/or SnortySnoopy's ticket numbers I'll add them into my report as well which may help speed things up when they get around to testing/fixing it as they'll have more collated information from multiple reports.

It's a really annoying bug.
Here's the ticket id: #178027
 
Do you have a ticket number for your bug report?

I'm experiencing the same behaviour as @SnortySnoopy where tiles aren't being rendered on project run (or are still there when they've been deleted in the Room Editor) but I'm not replacing the tileset sprites at all - it happens even with the original sprite loaded when first creating the tileset.

I've reported it myself but if I could get yours and/or SnortySnoopy's ticket numbers I'll add them into my report as well which may help speed things up when they get around to testing/fixing it as they'll have more collated information from multiple reports.

It's a really annoying bug.
And here's mine : 181760
 

FoxyOfJungle

Kazan Games
Hi!

There is a problem with the runner's x64 YYC compiler, using GMS v2.3.2.556, Runtime: v2.3.2.420. Visual Studio Community 2017.
This is happening:



On YYC and VM it works normally, so it's a problem with x64, but I don't understand why it happens...


x64 error:




x86 working:




If I add string() to working_directory, it happens:





Thanks for listening.
 
Last edited:
I actually had the same issue with your PC not being able to be used when switching to full-screen and windowed often.
If I recall correctly, it had to do with something switching modes rapidly...

Check out this thread
Thank you for sharing this!

But what do they mean by a "10-frame delay before querying the new window dimensions after calling window_set_fullscreen()"?

Could someone share an example code?
 

xDGameStudios

GameMaker Staff
GameMaker Dev.
Hi!

There is a problem with the runner's x64 YYC compiler, using GMS v2.3.2.556, Runtime: v2.3.2.420. Visual Studio Community 2017.
This is happening:



On YYC and VM it works normally, so it's a problem with x64, but I don't understand why it happens...


x64 error:




x86 working:




If I add string() to working_directory, it happens:





Thanks for listening.
Already filed a bug on this :) actually 3 days before the last stable.. so it didn't make it on time.
But I think the problem was internally solved and should be corrected in the next beta release!

EDIT: The problem I filed was very similar to this but occurred on both x86 and x64 YYC
 
Has anyone else's projects or even PC's went black and couldn't close or exist the project or GameMaker Studio 2 if went into fullscreen while the game was running and the only other option was to resart the PC? Ctrl + Alt + Delete doesn't even work.

I had two instances where the player could switch from fullscreen to windowed during gameplay. But after recent updates, it just blacks out my PC and the only other option to fix it is to restart the PC. When this happened, all keyboard keys became useless. I'm reluctant to proceed further testing of it's behavior in case it actually crashes my PC or causes memory loss from all of the hard resets.

Since the screen goes black and I can't access GameMaker Studio 2 application, I can't access the Output log to file a bug report. It usually works the first time fullscreen is switched, but after a second or third (sometimes even on the first time), that's when it goes black. This had worked before no matter how many times I would switch back and forth to fullscreen and windowed.

These are the two places I have the fullscreen switch code at:

o_game (Main persistent Object) Step Event
GML:
if keyboard_check_pressed(vk_escape) {
    if window_get_fullscreen() {
        window_set_fullscreen(false);
    } else if !window_get_fullscreen() {
        window_set_fullscreen(true);
    }
}
In the o_pause_menu_ui Object Step Event using a switch statement.
GML:
case pause_menu_options.fullscreen:
      
            audio_play_sound(Start_SFX, 10, false);
      
            if window_get_fullscreen() {
                window_set_fullscreen(false);
            } else if !window_get_fullscreen() {
                window_set_fullscreen(true);
            }
      
        break;
Follow up.

I added the fullscreen code I have to work with an Alarm, which in a way, works since I read that there needs to be a "10-frame delay before querying the new window dimensions after calling window_set_fullscreen()". The code I changed it to, works if I set the Alarm to be 60. But if the Alarm is set to 20, then it does the black screen again and this time I tried the Shift+Ctrl+Win+B to restart the GPU, but nothing entered on the keyboard seemed to work.

I would just use the alarm[0] = 60; code but that takes 1 second to switch to fullscreen. I know that's not a lot, but some may not like it that way.

Here is the code I am now using with an Alarm
o_game (Main persistent Object) Step Event
GML:
if keyboard_check_pressed(vk_escape) {
    if window_get_fullscreen() {
        alarm[0] = 60;
    } else if !window_get_fullscreen() {
         alarm[0] = 60;
    }
}
Code in Alarm 0
GML:
if keyboard_check_pressed(vk_escape) {
   
if window_get_fullscreen() {
       
    window_set_fullscreen(false);
       
} else if !window_get_fullscreen() {
       
    window_set_fullscreen(true);
       
}
Like I said, I don't want to test out other code really, since when the screen goes black, the only method to fix it is to reset my PC, which takes time to do and the testing process would take time. Plus, I don't like constantly restarting my PC.
 
Last edited:
Well, The fullscreen code I just posted just did another black screen. At first it seemed to work, but I added it to a switch statement in a pause menu object and it went to a black screen.

This is the code I used
GML:
switch (index_) {
    case game_options_menu.fullscreen:

    if window_get_fullscreen() {
        alarm[0] = 60;
    } else if !window_get_fullscreen() {
        alarm[0] = 60;
    }

    break;
}
Again, this is what is in the alarm 0
GML:
if window_get_fullscreen() {
      
    window_set_fullscreen(false);
      
} else if !window_get_fullscreen() {
      
    window_set_fullscreen(true);
      
}
An Alarm with 60 is over 10 frames isn't it? I currently don't know what to do. Since I can't file a bug report of what the log files were since keyboard inputs don't work while it's a black screen. Currently, I had to disable the fullscreen option on a released game because of this.

The only fullscreen option that works is by clicking maximize on the game window, but for some reason that distorts the game a little and doesn't keep the aspect ratio even though I have keep aspect ratio checked.

If anyone else knows something that will work, or how to file a bug report please post.
 
Last edited:

rIKmAN

Member
If anyone else knows something that will work, or how to file a bug report please post.
What GPU are you using and is it discrete or onboard?

I just dropped in the code you posted to switch to fullscreen and back into my game in a Key Pressed event (Enter) and switched maybe 25-30 times without any issue at all and without any delay needed via alarms etc.

I'm using an Nvidia 1060 with latest drivers.
 
What GPU are you using and is it discrete or onboard?

I just dropped in the code you posted to switch to fullscreen and back into my game in a Key Pressed event (Enter) and switched maybe 25-30 times without any issue at all and without any delay needed via alarms etc.

I'm using an Nvidia 1060 with latest drivers.
It's an Nvidia GeForce GTX 1660 Ti 6GB

This is really the first time I've had trouble with scaling to fullscreen. The code I posted worked in versions before GMS 2.3.0. I didn't have the alarm either.
 
It's an Nvidia GeForce GTX 1660 Ti 6GB

This is really the first time I've had trouble with scaling to fullscreen. The code I posted worked in versions before GMS 2.3.0. I didn't have the alarm either.
I have the exact same bug. For the time being, I'm not bothering with the alarm stuff and will wait if they fix it, this is REALLY annoying. Seems a lot of things were working better in the beta, tbh...
Out of curiosity, did you update GeForce drivers with the march 30 update? (v. 465.89)
 

rIKmAN

Member
It's an Nvidia GeForce GTX 1660 Ti 6GB

This is really the first time I've had trouble with scaling to fullscreen. The code I posted worked in versions before GMS 2.3.0. I didn't have the alarm either.
Are you using the latest Stable or Beta version of GMS2?
Just trying to narrow down any possible differences other than the card and drivers.
Out of curiosity, did you update GeForce drivers with the march 30 update? (v. 465.89)
Are you running an Nvidia card too?

Also it seems I lied - didn't see there was update available and was actually not on the latest drivers.
I was on v461.40, so I just updated v465.89 and re-ran the same test and again it worked fine with ~30 switches between full screen and windowed mode.

I do get the 1 frame white flash when switching reported in this ticket but no other issues like both of you are having, even when switching quickly and hammering the Enter key it works as expected.

It does note in that ticket that only some GPU's are affected with the white flash, even cards closey related (GTX950 is and the GTX970 isn't) so it seems this may be a similar problem that only affects certain cards.

Have either of you filed tickets and if so, had any response?
 
Have either of you filed tickets and if so, had any response?
Yep same GPU. Filed a ticket about it but no response yet (# 181750).
As far as GMS goes, I use latest stable (didn't have this problem in the beta), and I realized I was also not on the latest GeForce driver. I just downloaded and installed it, but still scared to try, 'cause only cutting off the power is able to get me out of that darn black screen! Your attempt looks promising, tho! Will trying it before shutting down the PC for the night for sure and will let you know if this seems to fix it here too!
 

rIKmAN

Member
Yep same GPU. Filed a ticket about it but no response yet (# 181750).
As far as GMS goes, I use latest stable (didn't have this problem in the beta), and I realized I was also not on the latest GeForce driver. I just downloaded and installed it, but still scared to try, 'cause only cutting off the power is able to get me out of that darn black screen! Your attempt looks promising, tho! Will trying it before shutting down the PC for the night for sure and will let you know if this seems to fix it here too!
Stable is usually the same as the last Beta, but it's definitely possible some things were changed between versions.
I'll try v2.3 Stable when I get some time as it'll overwrite my v2.2 install which I need for supporting some older projects so will involve a bit of faffing around.
 
Stable is usually the same as the last Beta, but it's definitely possible some things were changed between versions.
I'll try v2.3 Stable when I get some time as it'll overwrite my v2.2 install which I need for supporting some older projects so will involve a bit of faffing around.
That fixed the black screen of death on my end, but now I have that epileptic-inducing-white flash. Not perfect, but much much better!
 
Are you using the latest Stable or Beta version of GMS2?
Using the latest stable GMS. Haven't filed a ticket since, I really don't have much evidence to back up what the problem is.
I'm not sure if I'm on the latest Nvidia driver. So I'm downloading it now. I'll give it a try and see what it does.
 
But really, the real question is, if it is a hit or miss switching to fullscreen with our PC's , what happens on the player's PC's who we don't know about? Would they just go to a black screen?
 

rIKmAN

Member
Using the latest stable GMS. Haven't filed a ticket since, I really don't have much evidence to back up what the problem is.
I'm not sure if I'm on the latest Nvidia driver. So I'm downloading it now. I'll give it a try and see what it does.
From what Slow Fingers has said it seems to be an issue with Stable and Beta doesn't black screen, but does give the white flash which I also get.
You should file a ticket, attach all the files it asks for (ui.log etc) and also additionally add your DXDiag report to the ticket so they have as much information as possible about your system to help them look into it.
 
But really, the real question is, if it is a hit or miss switching to fullscreen with our PC's , what happens on the player's PC's who we don't know about? Would they just go to a black screen?
No idea. I honestly put this on the ice pretty quick since it was ****** my PC, so I did not test to see if it also affected exported versions.
If you're comfortable with virtual machines, you could test it in one. But try to install v.565.89 in NVIDIA GeForce Experience panel (should be in the taskbar near the date-time), it did the trick for me.
 

rIKmAN

Member
No idea. I honestly put this on the ice pretty quick since it was ****** my PC, so I did not test to see if it also affected exported versions.
If you're comfortable with virtual machines, you could test it in one. But try to install v.565.89 in NVIDIA GeForce Experience panel (should be in the taskbar near the date-time), it did the trick for me.
Oh so changing drivers fixed it for you?
I thought you'd used the Beta and got different results than Stable - my bad.
 
Status
Not open for further replies.
Top