• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • 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 Game throwing Win32 Function Failure when run.

D

deciduous

Guest
I am super frustrated and baffled by a new issue I started having with a project today. All of the sudden, after running fine for the year I've been working on it, it now crashes on start. The issue, according to the popup, is a Win32 function failure that has something to do with the "Graphics_DisplayM.cpp" file. I have absolutely no idea what that file is or what it's trying to do, but there are several popups in a row that reference it. Here are some screenshots:

01.PNG 02.PNG 03.PNG 04.PNG 05.PNG

The last image is a screenshot of what's going on in the log. It looks like it gets stuck in some loop with "Resizing swap chain...Resizing window...etc"

I have an initialization room whose creation code calls an initialization script from to setup all my global properties, load the savedata, set display properties like anti-aliasing, and then moves to the title screen. It's getting hung up before it reaches the title screen.

I've spent the last hour or so searching for a solution to no avail. My OS and drivers are all up to date, I'm not using any canvases or viewports, and my rooms are not set to 0x0.

Please please help if you can. This is totally devastating and breaks my entire game that I am currently wrapping up to ship!

Thanks in advance!

[EDIT]
Tried a couple things that produced some interesting results:

-I added a debug message at the end of the initialization script. It gets called over and over and over which is very strange because the script should only be run once from the creation code of my initialization room.
-I commented out all the display related code like draw_enable_swf_aa(), display_reset(), etc, and the Win32 function failure is no longer thrown, but an even stranger issue emerges. I have debug messages in the creation code of the initialization room and the title screen, and they are BOTH printed over and over and the title screen never loads.
 
Last edited by a moderator:
I

icuurd12b42

Guest
You should not be doing any graphic related stuff for a few steps when the game starts. have a splash/boot room that does nothing but show you logo or something for a second before proceeding onward to the actual game...
 
D

deciduous

Guest
Good to know! I'll change that up. However, that was working for the longest time so I'm not really convinced that was the issue.

IN FACT, I found a solution that I absolutely am confused by but it seems to be working for now. My players state machine was formatted like this in his step event; script_execute(state) where state is updated to different scripts under certain conditions. I changed it to be formatted like this in the step event; event_user(state) where now state is an enum and I'm using separate user events to hold the state logic. This seems totally illogical to me though! The runtime error seems to be related to graphics, and my previous state machine format was working for over a year! I'm so confused...
 
I

icuurd12b42

Guest
the first time I found you can't mess with the graphics stuff unless you wait a bit I was dumbfounded too. I had stuff that worked fine (making a surface and copying it and getting to data onto a buffer)... then it stopped... got me going for 4 hours for my 3d heightmap from grayscale image was turning things flat all of a sudden...
 
Top