Jump to content


Photo

[SOLVED] display_set_size(w,h) crash/memory error


  • Please log in to reply
4 replies to this topic

#1 _260939

_260939

    GMC Member

  • New Member
  • 3 posts

Posted 24 April 2012 - 07:34 AM

Hello,

Earlier this morning I fired up my copy of Game Maker 8.1 (all up to date) to discover that I was getting a black screen with one of my projects. I hadn't edited the coding in a while, and the last time I did, it ran fine.

So, I booted up another project, ran it, and I got a critical error. Then the exe crashed. I have no idea what's going on. It's most likely not my computer, as I've tested the issue on two other computers and gotten the exact same results.

In one of my programs, for debug purposes, you select your monitor's resolution, which is then applied before you move to the next room. However, for some reason, when I select a resolution, the screen resolution does change, but everything goes black, and the game doesn't transition to the next room.

In the other program, I can't even get the .exe running. Right after it loads, I get two errors: this, followed by an "Unexpected error occurred when running the game." message. It's driving me crazy. It must have something to do with resolutions, but I don't know!

These are the two files I mentioned. I don't know what is going on. These files WORKED at one point. I haven't touched them since they last worked, and I don't know what else to do. Are the files corrupted? Even the backup files don't work!

Edited by _260939, 25 April 2012 - 05:35 AM.

  • 0

#2 NukeTheCat

NukeTheCat

    Isaiah 11:6

  • GMC Member
  • 533 posts
  • Version:GM:Studio

Posted 24 April 2012 - 11:39 AM

I once had that problem -- try deleting object, sprites, sounds one by one until it works. If one of them is too large (size or in pixels) it'll give that error. There are also other causes so don't think this is the only reason.
  • 1

#3 _260939

_260939

    GMC Member

  • New Member
  • 3 posts

Posted 24 April 2012 - 06:29 PM

Thanks for your help. I found out that something with the method display_set_size(w,h) triggers the error messages. The exe throws a fit when you configure the display size in the beginning, and shows a black screen later on. This person had a similar issue. Same here. It looks like something is broken with display_set_size. It USED to work, but I guess now it's returning errors. I suppose I could do some coding to work around this, so that the game simply goes with the monitor's native resolution instead of letting the user choose.
  • 0

#4 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16041 posts
  • Version:GM:Studio

Posted 24 April 2012 - 06:50 PM

Changing the display size is an absolute nono... leave it be and set the game full screen, let windows handle the resizing of the image to the user's current setting.

display_set_size is a late 1990's, early 2000's way of accelerating the display drawing which has always been an issue for many many PCs and it got worst when wider screens got popular. It is no longer relevant today now that the OS uses the hardware directly.
  • 0

#5 _260939

_260939

    GMC Member

  • New Member
  • 3 posts

Posted 25 April 2012 - 05:35 AM

Changing the display size is an absolute nono... leave it be and set the game full screen, let windows handle the resizing of the image to the user's current setting.

display_set_size is a late 1990's, early 2000's way of accelerating the display drawing which has always been an issue for many many PCs and it got worst when wider screens got popular. It is no longer relevant today now that the OS uses the hardware directly.

Ah, I see. I was mostly using it for debug reasons, so I could easily test different aspect ratios on the fly. Should be easy to work up an alternative.

Thank you guys for your help!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users