As of version 2.3.6 GameMaker now determines all of this automatically for you and so you no longer need to follow this guide. The page remains for anyone still on older versions.
If you get crashes very shortly after opening GameMaker or the IDE won't start at all, then it's worth checking if this is because your GPU doesn't support the hardware acceleration GameMaker uses.
This is often required in some remote desktop or VM setups also, depending on the hardware involved and the settings of the remote/VM software.
It's worth noting that if you have just updated your GPU drivers but not yet rebooted you may also be in this state, so do reboot your PC first to rule out any temporary driver issues.
Note that this FAQ only applies to versions of GameMaker up to 2.3.3
2.3.4 Betas (and all future releases) now use newer drivers, so if you do have this issue, please consider simply updating your GameMaker install as a first step.
Confirming the Issue
If you open GameMaker's ui.log file you'll see a crash message like the following is the last thing written:
[10:43:42:931(8fae)] --------------------------------------------------------------------------------
[10:43:42:931(8fae)] Main Exception Handler: System.AccessViolationException
[10:43:42:931(8fae)] Exception message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
[10:43:42:936(8fae)] Exception stack: at OpenTK.Graphics.OpenGL.GL.DeleteFramebuffer(UInt32 framebuffers)
at YoYoStudio.Graphics.Texture.DestroyRenderTarget()
at YoYoStudio.Graphics.Texture.Destroy()
at YoYoStudio.Graphics.TextureManager.DestroyReleasedTextures()
at YoYoStudio.IDE.Run()
at YoYoStudio.IDE.Execute(String[] _args, Int32 _initialWidth, Int32 _initialHeight)
at YoYoStudio.Program.Main(String[] _main_args)
[10:43:42:936(8fae)] --------------------------------------------------------------------------------
Installing the "mesa" Driver
Open Explorer/My Computer and navigate to your GameMaker install folder (yours will likely differ from mine shown below - the default is C:\Program Files\GameMakerStudio2\):
Then go into the "mesa" subfolder, as shown above.
You'll see a file in here. Copy/drag this opengl32.dll file up one level so it goes into your main GameMaker install folder.
Then try running the IDE again, and all should be working now.
Please note that as this is a software renderer it will use your CPU and so your CPU usage figure in Task Manager might well be higher than you'd expect.
If this still doesn't fix, please open a new Helpdesk ticket and include the ui.log file mentioned above, plus a DXDiag report. (Windows key + R, type "dxdiag", OK. Wait for the progress bar to finish, then click Save All Information, give it a save name.)
Attach the text file you've just saved to the Helpdesk ticket, rather than pasting in its contents, please.