• 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 Attempting to set gamepadcount to 12... followed by a failed program run [SOLVED]

Hello,

I've been running into this error message more and more frequently, and today, 95% of the time I can't seem to run my game successfully without receiving this error:

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

Attempting to set gamepadcount to 12



X://windows/Runner.exe exited with non-zero status (-1073741571)

elapsed time 00:00:09.2368011s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.1.5.246/bin/Igor.exe" -options="C:\Users\MYNAME\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -- Windows Run started at 08/26/2018 15:28:40

"cmd" /c subst Z: /d


elapsed time 00:00:00.0229769s for command "cmd" /c subst Z: /d started at 08/26/2018 15:28:49

"cmd" /c subst Y: /d


elapsed time 00:00:00.0239862s for command "cmd" /c subst Y: /d started at 08/26/2018 15:28:49

"cmd" /c subst X: /d


elapsed time 00:00:00.0279841s for command "cmd" /c subst X: /d started at 08/26/2018 15:28:49

FAILED: Run Program Complete

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

When I click Run, everything seems to be compiling and working well, until I get to the "Attempting to set gamepadcount to 12" line. At this point, the program hangs up for a second or two, and then the rest of the above-posted message quickly appears and the program fails to run.

I searched to see if anyone else had this particular problem, but there didn't seem to be any successful solutions. Sometime mentioned removing USB devices, but even after doing that I still received the message.


Does anyone have any ideas what the problem is?

I'd appreciate any feedback.

Cheers.
 

MarceloP

Member
Hello @TheCheeseMaster,

What version of the Runtime and IDE are you using?
From what I know (which is not much), those cases are usually one of the following two things:

Possibility 1 - You have something in your start room that is not letting you game run correctly. - Try testing by creating an empty project and running a clean/empty code. If that runs, your runtime is possibly fine and you should check your starting code/initial object code.

Possibility 2 - You have a corrupted runtime (not so common but it happens). Try going in to the preferences of GM and Runtimes. Try installing the latest one and if it's already the latest one, try to remove it and install it again.

You can check a bit more about it here.
I hope one of those 2 things help you =X
 
Thanks for the message @MarceloP,

It looks like I'm using IDE v2.1.5.322 and Runtime v2.1.5.246
Here's a screenshot of the error I get:

upload_2018-8-27_20-58-45.png

It's odd because it works sometimes but not always. Before, I would occasionally run into the problem where it didn't run, but that wasn't very often. Now, most of the time it fails to run.
I created a new blank project and it seemed to run fine every time, which leads me to wonder if it's something in the room.
Do you have any ideas of what could be stopping the game from running (but not every time)?

Thanks very much.
 
I just did a test where I unchecked every instance in my room (it's just an empty room with tiles) and I still run into the problem:

upload_2018-8-27_21-11-15.png

So it doesn't seem to be related to anything I've put into the room.
Sorry, not trying to spam. I just wanted to post to provide more information.
 

abeldev

Member
Exact same thing has been happening to me over the past week and I cannot figure out why. Randomly at the start of a room the game will just crash. The thing is - I cannot replicate the crash at all. I just know that sometime in my 20 or so minute long demo, the game will crash upon entering a room. It could even happen within the first room and I will retrace my exact steps to make the crash occur but nothing happens. it has been driving me crazy.

My error message is identical too.
 
Last edited:

MarceloP

Member
Hello again @TheCheeseMaster,

Last runtime had a extremely strange bug when dealing with "unchecked" objects in the room. I'd say the best option is actually to create a new empty project in the same runtime and check if it works, without objects or anything in the room, but simply an empty project with an empty room.

~~~ If a completely new and empty project works ~~~
Then post for us what you're doing in your first script/code that runs. Try also running it in Debug mode and selecting the first line of your code, and then going line by line to see if it works and if it crashes somewhere in the very start.

~~~ If if doesn't ~~~
Re-download the Runtime, or try to make a completely fresh install of GMS2, and always remember to run it with administrative Privileges.
 
Thanks for the responses @MarceloP,

I created a new empty project without anything in the room, and the project seems to run perfectly fine, every time.
It doesn't seem to matter which room I set as my starting room in my project. I still receive the same error. However, currently, I have a testing room set as my startup room, and I guess the very first code that would run would be the room creation code, right?
For me that would be:
------------------------------------------------------------------------------------------------------
randomize(); //ensures all random functions give proper random numbers

window_set_fullscreen(true);
------------------------------------------------------------------------------------------------------
However even if I comment these two lines out, I still run into the error. It seems I run into it no matter which room is the starting room, and even if there are no checked instances or code being run.

I tried re-downloading and re-installing the most recent runtime, and even used the older version to see if it worked, but no luck.

I was wondering if it would have anything to do with DirectX? Because when it does randomly successfully run, the line after "Attempting to set gamepad count..." involves DirectX:
------------------------------------------------------------------------------------------------------
C:\WINDOWS\system32\cmd.exe DONE (0)
DoSteam
Igor complete.
[Run] Run game
Options: Z:/Operation _F399F3EF_A89DE5C\MainOptions.json
X://windows/Runner.exe -game "Y:/Operation Cell_4F6F64AF_VM\Operation Cell.win"
Attempting to set gamepadcount to 12
DirectX11: Using hardware device
Total memory used = 25640791(0x01873f57) bytes
Resizing fullscreen window...Resizing swap chain...Pause event has been registered for this frame
Pause event has been unregistered
------------------------------------------------------------------------------------------------------
It's just a random thought though.
I think tomorrow I'll try doing a complete re-install of gamemaker studio 2, as simply redownloading the runtimes didn't seem to help.

Please let me know if you have any other ideas! I'd really like to solve this so I can get back to working on the game itself, lol.
 

MarceloP

Member
You're welcome.

Well, is even more related to the case that I linked in my previous posts... This DirectX message and using hardware device doesn't seem to have anything to do with the problem, since the output usually outputs in this order, but the problem is surely the runtime.

Let me ask you, I've just noticed that GMS2 is executing: X://windows/Runner.exe -game "Y:/Operation Cell_4F6F64AF_VM\Operation Cell.win"
This tells me that you have GMS2 installed in a specific driver (X:) and that you have your project in another driver (Z:). Now, that should be fine. But another thing I noticed is that your Runner is actually in a very strange path and also has a pretty strange name. You see, the normal/expected would be something like: "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.1.4.218/windows/Runner.exe".

Another thing to mention, is that to do something like that, it would be better for you to have access to write and change files in those folders / mounted disk drivers. Therefore I'd say you should guarantee that you have privileges to do that in both paths/drivers/folders.

Just pointing that out, since I've never seen a "X://windows/Runner.exe" before, and that called my attention.
 
@abeldev : Reverting back to an older runtime fixed your problem? I thought I tried that and still had the issue...I"ll try again.

@MarceloP : Really? The "X://windows/Runner.exe" is strange? I have no idea what drive that would be, because I only have the following drives on my computer:

upload_2018-8-28_17-38-5.png

I figured the X drive was just something game maker was creating to launch my game?
I don't think I've changed any of the default run settings since installing game maker, so it's not a matter of me tweaking things to run oddly...strange...
Is there a way/setting to change where the game is run from?

PS Thanks for the help
 
@TheCheeseMaster Yup, went back to 2.1.4.218 and haven't encountered it today at all. Hopefully it stays that way.
I'm just now trying to revert back, and even delete the newer runtime, but if I exit Game Maker Studio and open it again it automatically downloads and installs the latest runtime and I can't seem to find any options to stop it from doing this :(
 
@abeldev right, thanks Abeldev. I knew you could adjust settings there, but I discovered if you revert to an older runtime and delete the newest one, Game Maker Studio would automatically download and install the newest one the next time you start up the program. But I found out if you don't delete the newest runtime after you've reverted to an older one, it doesn't automatically install the newest one. Interesting.

Anyway, even on the second-most-recent runtime I still run into the error (here's the output information):
___________________________________________________________________________
"cmd" /c subst Z: "C:\Users\Dan Beckerton\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE"

elapsed time 00:00:00.0239870s for command "cmd" /c subst Z: "C:\Users\Dan Beckerton\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE" started at 08/28/2018 18:56:52
"cmd" /c subst Y: "C:\Users\Dan Beckerton\AppData\Local\GameMakerStudio2\GMS2TEMP"

elapsed time 00:00:00.0239867s for command "cmd" /c subst Y: "C:\Users\Dan Beckerton\AppData\Local\GameMakerStudio2\GMS2TEMP" started at 08/28/2018 18:56:52
"cmd" /c subst X: "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.1.4.218"

elapsed time 00:00:00.0239858s for command "cmd" /c subst X: "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.1.4.218" started at 08/28/2018 18:56:52
Saving project to: C:\Users\Dan Beckerton\Documents\GameMakerStudio2\Operation Cell\Operation Cell\Operation Cell.yyp
"C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.1.4.218/bin/Igor.exe" -options="C:\Users\Dan Beckerton\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -- Windows Run

Loaded Macros from C:\Users\Dan Beckerton\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\Operation _F399F3EF_A89DE5C\macros.json
Options: X:/bin\platform_setting_defaults.json
Options: C:\Users\Dan Beckerton\AppData\Roaming/GameMakerStudio2\dbeckert_1263133\local_settings.json
Options: C:\Users\Dan Beckerton\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\Operation _F399F3EF_A89DE5C\targetoptions.json
X://bin/GMAssetCompiler.exe /c /zpex /mv=1 /iv=0 /rv=0 /bv=0 /j=8 /gn="Operation Cell" /td="Y:/" /cd="Z:/Operation _F399F3EF_A89DE5C" /zpuf="C:\Users\Dan Beckerton\AppData\Roaming/GameMakerStudio2\dbeckert_1263133" /m=windows /tgt=64 /nodnd /cfg="default" /o="Y:/Operation Cell_607EEEDD_VM" /sh=True /optionsini="Y:/Operation Cell_607EEEDD_VM\options.ini" /cvm /baseproject="X:/BaseProject\BaseProject.yyp" "C:\Users\Dan Beckerton\Documents\GameMakerStudio2\Operation Cell\Operation Cell\Operation Cell.yyp" /preprocess="Z:/Operation _F399F3EF_A89DE5C"
Reading project file....C:\Users\Dan Beckerton\Documents\GameMakerStudio2\Operation Cell\Operation Cell
Reading project file....X:\BaseProject
Reading config delta 'C:\Users\Dan Beckerton\Documents\GameMakerStudio2\Operation Cell\Operation Cell\options\main\inherited\options_main.inherited.yy'
finished.


X://bin/GMAssetCompiler.exe DONE (0)
Release build
OptionsIni
Options: Z:/Operation _F399F3EF_A89DE5C\PlatformOptions.json
[Compile] Run asset compiler
C:\WINDOWS\system32\cmd.exe /c ""X://bin/GMAssetCompiler.exe" /c /zpex /mv=1 /iv=0 /rv=0 /bv=0 /j=8 /gn="Operation Cell" /td="Y:/" /cd="Z:/Operation _F399F3EF_A89DE5C" /zpuf="C:\Users\Dan Beckerton\AppData\Roaming/GameMakerStudio2\dbeckert_1263133" /m=windows /tgt=64 /nodnd /cfg="default" /o="Y:/Operation Cell_607EEEDD_VM" /sh=True /optionsini="Y:/Operation Cell_607EEEDD_VM\options.ini" /cvm /baseproject="X:/BaseProject\BaseProject.yyp" "C:\Users\Dan Beckerton\Documents\GameMakerStudio2\Operation Cell\Operation Cell\Operation Cell.yyp" /bt=run"
Reading project file....C:\Users\Dan Beckerton\Documents\GameMakerStudio2\Operation Cell\Operation Cell
Reading project file....X:\BaseProject
Reading config delta 'C:\Users\Dan Beckerton\Documents\GameMakerStudio2\Operation Cell\Operation Cell\options\main\inherited\options_main.inherited.yy'
finished.
Compile Constants...finished.
Remove DnD...finished.
Compile Scripts...finished.
Compile Objects...finished.
Compile Timelines...finished.
Compile Triggers...finished.
Compile Rooms...finished.
Compile Extensions...finished.
Global scripts...finished.
Final Compile...finished.
Saving IFF file... Y:/Operation Cell_607EEEDD_VM\Operation Cell.win
Writing Chunk... GEN8
option_game_speed=60
Writing Chunk... OPTN
Writing Chunk... LANG
Writing Chunk... EXTN
Writing Chunk... SOND
Writing Chunk... AGRP
Writing Chunk... SPRT
Writing Chunk... BGND
Writing Chunk... PATH
Writing Chunk... SCPT
Writing Chunk... GLOB
Writing Chunk... SHDR
Writing Chunk... FONT
Writing Chunk... TMLN
Writing Chunk... OBJT
Writing Chunk... ROOM
Writing Chunk... DAFL
Writing Chunk... EMBI
Writing Chunk... TPAGE
Texture Group - Default
Writing Chunk... CODE
Writing Chunk... VARI
Writing Chunk... FUNC
Writing Chunk... STRG
Writing Chunk... TXTR
0 Compressing texture... writing texture texture_0.png...
1 Compressing texture... writing texture texture_1.png...
2 Compressing texture... writing texture texture_2.png...
Writing Chunk... AUDO
Writing Chunk... SCPT
Writing Chunk... DBGI
Writing Chunk... INST
Writing Chunk... LOCL
Writing Chunk... STRG
Stats : GMA : Elapsed=1406.9725
Stats : GMA : sp=507,au=19,bk=13,pt=0,sc=37,sh=0,fo=2,tl=0,ob=308,ro=25,da=0,ex=0,ma=1675,fm=0xB21C6CEC2AA4


C:\WINDOWS\system32\cmd.exe DONE (0)
DoSteam
Igor complete.
[Run] Run game
Options: Z:/Operation _F399F3EF_A89DE5C\MainOptions.json
X://windows/Runner.exe -game "Y:/Operation Cell_607EEEDD_VM\Operation Cell.win"
Attempting to set gamepadcount to 12


X://windows/Runner.exe exited with non-zero status (-1073741571)
elapsed time 00:00:06.9934023s for command "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.1.4.218/bin/Igor.exe" -options="C:\Users\Dan Beckerton\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -- Windows Run started at 08/28/2018 18:56:52
"cmd" /c subst Z: /d
___________________________________________________________________________

I'm really not sure what the problem is...I guess it's not a runtime issue. I suppose my next step would be to uninstall and reinstall game maker studio. I need to search what is involved with that, so I don't lose any of my work.
 
After completely following this guide to a clean un/re-install of gamemaker:

https://help.yoyogames.com/hc/en-us/articles/216753708-How-to-perform-a-fresh-install

I loaded the project up and haven't run into the problem...yet. I tried it about 10 times and the error didn't occur, so I'm hopeful it was just a matter of something becoming corrupted in the program somewhere along the year I was working on the project. In any case, it seems to be working okay now. If it acts up again I will leave a message in this forum. To anyone else who encounters this problem, perhaps a clean re-install is all that is needed.

Thanks very much to @abeldev and @MarceloP for their support :) You guys rock!
 

MarceloP

Member
Great @TheCheeseMaster!

Just a side note here, the X: drivers that I asked about is probably because you were compiling for Android or Mobile. GMS2 creates then and drops the runner inside those emulated drivers. It was probably something related to the runtime being corrupted or any support executable that drops them inside those drivers... Reinstalling may be the only way to fix it for now, although no error codes or infos about the failure when compiling is something really bad.

Cheers!
 
For sure. It would be nice to have a more specific error message indicating at least the ballpark area where the program is failing. Well, for now it's working....fingers crossed!
 
Just an update a few days later:
The error is still occurring, even with the fresh install, but seems to be happening much less often. It seems we haven't solved the base problem just yet.
 
Update: I sent YoYo Games an error submission in hopes that they can help me solve this issue. The project is back to failing to run 80 - 90% of the time once more. Does anyone have any other ideas?
 

Dan

YoYo Games Staff
YYG Staff
I'm just now trying to revert back, and even delete the newer runtime, but if I exit Game Maker Studio and open it again it automatically downloads and installs the latest runtime and I can't seem to find any options to stop it from doing this :(
As you mentioned in a later comment, don't delete the newer one - the IDE will always restore the runtime it shipped with. This has actually been fixed for future releases so that it will exclude the runtime that the IDE shipped with from the automatic removal of runtimes when installing other runtimes, so then you won't have the issue of the IDE starting the download again next time you start up.

For the actual issue, that it works reliably for a while and then stops implies the issue is caused by something on your machine, like an antivirus client, drive permissions, or a device driver. Will respond further on your ticket.
 
Thanks @Dan . I just replied to your ticket. And the program runs perfectly if it is able to build and run in the first place. It doesn't fail or stop working once you've successfully run the project. It's a matter of not being able to reliably run it in the first place. Thanks for the response
 
@Dan was able to help me figure out this problem (just for anyone else who might run into it). Essentially a pre-installed piece of software (common on MSI laptops apparently) called Nahimic was interfering with the program's run attempt. This software is related to boosting sound quality, but can easily (and harmlessly as far as I can tell) be uninstalled. Since removing it from my system I haven't run into a failed run (yet). Fingers crossed! And thanks again @Dan !
 
Top