• 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!

Attempting to set gamepadcount to 12... then out of memory (Not Solved)

obscene

Member
After the update (v1.4.1767) my project fails to run. The last line in the compiler is...

Attempting to set gamepadcount to 12
Sometimes it simply hangs there and othertimes I get an Out of Memory message.

I have no idea what that means or where it's coming from.

Despite the error, I believe it has nothing at all to do with a gamepad. I still get the error when I comment out all my gamepad scripts and unplug the gamepad.


EDIT: Made a blank project and I still get this error, though the game actually runs. So who even knows if this is related to why my game doesn't run. Sigh...

executing C:\Orphan\Temp\gm_ttt_45484\gm_ttt_87274\Project2.win
-----------------------------------------------------------
Attempting to set gamepadcount to 12
Total memory used = 294012(0x00047c7c) bytes
Attempting to set gamepadcount to 0
---------------------------------------------------------------
minFPS, maxFPS, avgFPS
1984, 3144, 2339
---------------------------------------------------------------
Compile finished: 10:55:58 PM
 
Last edited:
M

Monsi

Guest
You are not alone, I have experienced this too (v1.99.551). I haven't received the out of memory error, but the project did hang for a good 30-40 seconds before each compile. It was in a project that used gamepads, but blank projects work instantly.
 

obscene

Member
I'm really distressed over it. Not sure what to do other than start deleting mass amounts of code until I can narrow down what could be causing this. Or revert back to 1763 until the next patch.
 

obscene

Member
Yeah, but I can comment out every line of gamepad code and get the same results. I can remove every object and bit of code from my first room so there is literally nothing for GM to do but open a blank room and it still hangs though it at least doesn't seem to run out of memory in that case.

Doing some testing I've noticed if I enable fullscreen from the GGS the screen does go black before the freeze, but does not appear in the taskbar.

This is probably some idiotic Windows 10 problem. The OS has been nothing but trash since day 1.

upload_2017-7-12_17-55-47.png

Running... but where is it? No sound, no video.

Simple show_debug_message("test") in first room creation code with no objects yields no results.
 
Last edited:
J

JealousOfCrows

Guest
This is why I don't update. I stick with a stable version that works for me. I had an issue with some strange bug that would say some resource was missing even though it wasnt and it seemed impossible to fix (this happened a few years ago). The next upgrade I make is to GM2.
 
M

Monsi

Guest
I use 7 so I don't think it's windows 10.

Did you comment out every single line of gamepad related code? Because if not, that could be it. Also have you tried restarting your controller module (the actual hardware unit)?
This is why I don't update. I stick with a stable version that works for me. I had an issue with some strange bug that would say some resource was missing even though it wasnt and it seemed impossible to fix (this happened a few years ago). The next upgrade I make is to GM2.
But eventually you find something wrong with the version you've cherished for so long. For me, I unearthed a horrendous array leak bug (through debugging my 8 month project for the first time) that had no fix until at least 5 versions ahead, so I just had to take the leap.
 

obscene

Member
This is disappointing. I really wanted to get the latest fixes in as I'm a few months from releasing my game. I need the taskbar fix and hopefully the scissor testing fix will make the game finally playable on a Mac. I really need this update but I'm at a loss as to what to do. :(

Been messing around with various combinations of settings in the GGS. Considering I can't get the game to run the very first line of code in the first rooms creation event there doesn't seem to be a bug I can look for.
 

obscene

Member
I use 7 so I don't think it's windows 10.

Did you comment out every single line of gamepad related code? Because if not, that could be it. Also have you tried restarting your controller module (the actual hardware unit)?


But eventually you find something wrong with the version you've cherished for so long. For me, I unearthed a horrendous array leak bug (through debugging my 8 month project for the first time) that had no fix until at least 5 versions ahead, so I just had to take the leap.
Well when I try to run a room with no objects and no code, it wouldn't seem to matter if I have gamepad code or not...
 
M

Monsi

Guest
Do it in reverse. Start with a blank project and slowly re-import your assets one by one
 
M

Monsi

Guest
Well when I try to run a room with no objects and no code, it wouldn't seem to matter if I have gamepad code or not...
No, but the compiler knows that your code references gamepads, and therefore might include a special (broken) module that it otherwise would not include with the build, even if that code never gets run
 
M

Monsi

Guest
Wow! I wish I had that kind of commitment to a project. What about more than 1 at a time? Say, 10? They don't need to be organized into 87 tidy folders, it's just to test where it breaks. It also doesn't matter if the assets are dependant on others, because if it actually gets to a code error you haven't found the problem yet.
 
M

Monsi

Guest
I honestly think it has zilch to do with the gamepad, that compiler line is just the last thing that DOES work correctly.
Except it says "attempting to set gamepad count to 12" not "set gamepad count to 12"
 
S

Shadowblitz16

Guest
does gamemaker even support gamepads up to 12? I thought it was 8
 

obscene

Member
I dunno, but when I have 0 plugged in I have to wonder what exactly it is GM is trying to do...


But oh well, this is life in the Beta channel. :p I reinstalled the last version and will continue to read up on this to see what people figure out.
 
Z

zaraza

Guest
That's what I got this error:
for (iy=0; iy<massW; iy+=1)
for (ix=0; ix<massW; iy+=1)
{
....
}
 
M

MishMash

Guest
Any solutions to this (aside from downgrading)? Updated as I also wanted some of the other fixes, however my game wont even open anymore. The runner is there in task manager, but no window pops up.

Asset Compile finished: 19:52:46
-----------------------------------------------------------
executing D:\GameMaker Studio Directory\Temp\gm_ttt_67787\gm_ttt_59091\VitalityGMS_156.win
-----------------------------------------------------------
"C:\Users\Michael\AppData\Roaming\GameMaker-Studio\Runner.exe" -game "D:\GameMaker Studio Directory\Temp\gm_ttt_67787\gm_ttt_59091\VitalityGMS_156.win"

Attempting to set gamepadcount to 12
.. and nothing. Had the out of memory pop-up once, but since then haven't seen it. It just says attempting to set gamepadcount to 12 in the console. Note, we don't even use gamepads or support them in any way.
 
The runner is there in task manager, but no window pops up.
.. and nothing. Had the out of memory pop-up once, but since then haven't seen it
That definitely sounds like an infinite loop that you have somewhere that is stopping anything from happening. The gamepad output line I think is nothing - another one of those debug sort of lines like that one about the missing ini file - so I think that might just be a red herring. Check that none of your rooms, objects, etc have any loops and if they do make sure there aren't any mistakes like in @zaraza's code.
 
M

MishMash

Guest
That definitely sounds like an infinite loop that you have somewhere that is stopping anything from happening. The gamepad output line I think is nothing - another one of those debug sort of lines like that one about the missing ini file - so I think that might just be a red herring. Check that none of your rooms, objects, etc have any loops and if they do make sure there aren't any mistakes like in @zaraza's code.
The first room in the game is super simple, its just a menu, nothing happening. The issue only appeared after updating. I'd understand it if the window actually showed, but given the game doesn't even open, I feel that the issue is somewhere else.
 
I'd understand it if the window actually showed, but given the game doesn't even open, I feel that the issue is somewhere else.
But in all other cases I have seen, this is exactly what happens when you have an infinite loop in the start of your game. It will not be able to open (although you say the runner is in the taskbar) fully as the loop takes all of the processing and nothing else can get done while it is looping infinitely.

Have you tried using an earlier runtime to confirm that it is in fact only in the current runtime that the problem happens?
 
M

MishMash

Guest
But in all other cases I have seen, this is exactly what happens when you have an infinite loop in the start of your game. It will not be able to open (although you say the runner is in the taskbar) fully as the loop takes all of the processing and nothing else can get done while it is looping infinitely.

Have you tried using an earlier runtime to confirm that it is in fact only in the current runtime that the problem happens?
Yeah don't worry, i've been programming for 11 years, I stopped complaining about those mistakes a long time ago :p. Can confirm the game works fine in v1.4.1757. (With no additional changes).
 

obscene

Member
I can also confirm this is not your normal run-of-the-day infinite loop. My first room is an empty room with no objects or code and I still have the same problem.
 

JaimitoEs

Member
Same problem here!:(

Attempting to set gamepadcount to 12
Start debug server
Creating Debugger server port:6502
Out of Memory allocating zu bytes
Compile finished: 22:26:34

Edit: Ok! I´m 90% sure is an issue with spine sprites, is very dificult to re-import all Spine assets with the correct export version (at the moment 3.4.0.2). I´m telling this because cleaning the target sometimes the project run correctly, showing a compiler message of " error : unknow skinnedmesh blah blah"


Edit2: yep! problem solved, Attempting to set gamepadcount to 12 is informative, the real problem is not showed on compiler, just an out of memory, but is related with Spine json files, be sure to re-import all spine sprites, hard work if you have a lot of those....
 
Last edited:

obscene

Member
Yeah, I've tried to run all my spine files through a search and replace changing skinnedmesh to mesh or whatever it's called now (I forget) and it didn't help. Only thing I can think to do is search through all of project, delete all spine sprites and see if it compiles. At some point I'll do that but it's probably a week-long project at this point.
 

JaimitoEs

Member
You don´t must to change manually the json. files, the only way is re-export all spine projects with the 3.4.0.2 version, it works with 3.5 too but stay in 3.4.0.2, i know is a lot of extra work, you don´t need to delete sprites, just replace sprites loading this with the new json files.

The reason about your project does not work with a blank room is because Spine sprites are loaded internally in the memory, same result if you don´t put nothing in room... default Spine sprites are loaded...
 
Last edited:
M

Monsi

Guest
Sorry to revive a very dead post, but this issue has happened to me without any spine files in my project
 
C

ChaosX2

Guest
Sucks to see this wasn't resolved. I get a similar error in my project and I don't have any gamepad code. My error says "Attempting to set gamepadcount to 0" Before that, it says resizing swap chain...not sure if that's part of an error though.
 

rwkay

GameMaker Staff
GameMaker Dev.
OK 2 things here to help you

1) Spine re-exporting - perhaps this is not well known but Spine does allow you to script the exporting of the JSON files see - http://esotericsoftware.com/spine-export#Command-line (see the Command Line section) , you could keep a batch file that simplifies the exporting of all your spine files that you can run when an update happens.

2) If you can get more logging from the GameMaker runner using the -output and -debugoutput command line options on our Runner see https://www.yoyogames.com/blog/37/command-line-parameters-for-gamemaker-studio for more info if you use the same output file for both parameters then it will contain a lot more information on what is happening and it may let you know where the issue is happening.

Russell
 
C

ChaosX2

Guest
OK 2 things here to help you

1) Spine re-exporting - perhaps this is not well known but Spine does allow you to script the exporting of the JSON files see - http://esotericsoftware.com/spine-export#Command-line (see the Command Line section) , you could keep a batch file that simplifies the exporting of all your spine files that you can run when an update happens.

2) If you can get more logging from the GameMaker runner using the -output and -debugoutput command line options on our Runner see https://www.yoyogames.com/blog/37/command-line-parameters-for-gamemaker-studio for more info if you use the same output file for both parameters then it will contain a lot more information on what is happening and it may let you know where the issue is happening.

Russell
I got the following when I did the debug command. One thing that sticks out to me is -6134 for minfps...


Create Error Form

***************************************
* YoYo Games Runner v1.0(999)[r32908] *
***************************************
RunnerLoadGame: C:\Users\Ian\Desktop\deity\data.win
#########################################################################
####!!!!$$$$$$ pwd - C:\Users\Ian\Desktop\deity\
#########################################################################
RunnerLoadGame() - C:\Users\Ian\Desktop\deity\data.win
YYG Game launching. Game file: C:\Users\Ian\Desktop\deity\data.win. From player: false
Checking if INIFile exists at C:\Users\Ian\Desktop\deity/options.ini
Reading File C:\Users\Ian\Desktop\deity\data.win
Loaded File C:\Users\Ian\Desktop\deity\data.win(2088508)
IFF wad found
Get Resolution
Get Header Information
InitGMLFunctions
HighScore..SavePrePend = C:\Users\Ian\AppData\Local\dotf\
Game..Math..Graphic..Action..File..Resource..Interaction..3D..Particle..Misc..DS..Sound..Physics..Gamepad..Buffers..Networking..Shaders..InitPushFunctions...YoYo..Fini
Code_Load()
VARI_Load()
got 116 global variables
got 116 instance variables
got 13 local variables
ID_STRG
Create Window
GAMEPAD: 40 axis values (last) at 0x2d1fe00
GAMEPAD: 40 axis values (last) at 0x2d1fc00
GAMEPAD: 40 axis values (last) at 0x2d1fa00
GAMEPAD: 40 axis values (last) at 0x2d1f800
GAMEPAD: 40 axis values (last) at 0x2d1f600
GAMEPAD: 40 axis values (last) at 0x2d1f400
GAMEPAD: 40 axis values (last) at 0x2d1f200
GAMEPAD: 40 axis values (last) at 0x2d1f000
AdjustWindowRectEx
RegisterClassEx
CreateWindowEx
GAMEPAD: 4 axis values (last) at 0xe516c0
GAMEPAD: 4 axis values (last) at 0xe516a0
GAMEPAD: 4 axis values (last) at 0xe51680
GAMEPAD: 4 axis values (last) at 0xe51660
Init Graphics
GR_D3D_Init()
Enable DwmEnableMMCSS
DirectX11: Using hardware device
Background_InitTextures()
Sprite_InitTextures()
Font_InitTextures()
IO Init
Process Messages
Splash!
Start Frame
Part Create Textures
Debug Init Remote Interface
VM Init
Create Score Form
Create Load Form
Do The Work
LoadGameData()
initialise everything!
Process Chunk: GEN8 232
Process Chunk: OPTN 80
Process Chunk: LANG 12
Process Chunk: EXTN 4
Process Chunk: SOND 4
Audio_Load()
Process Chunk: AGRP 12
AudioGroup_Load()
Process Chunk: SPRT 364116
Process Chunk: BGND 16532
Process Chunk: PATH 4
Process Chunk: SCPT 964
Process Chunk: GLOB 12
Process Chunk: SHDR 4
Process Chunk: FONT 2464
Process Chunk: TMLN 4
Process Chunk: OBJT 12404
Process Chunk: ROOM 290396
Process Chunk: DAFL 0
Process Chunk: EMBI 8
Process Chunk: TPAG 3540
Process Chunk: CODE 49304
Process Chunk: VARI 10972
Process Chunk: FUNC 6720
Process Chunk: STRG 29348
Process Chunk: TXTR 1301160
Process Chunk: AUDO 4
Audio_WAVs()
PrepareGame()
Extension_Prepare()
Code_Constant_Prepare()
Script_Prepare()
TimeLine_Prepare()
Object_Prepare()
Preparing 35 objects:
Objects 0: player
Objects 1: kyte
Objects 2: ilene
Objects 3: fenix
Objects 4: iselia
Objects 5: hazel
Objects 6: kenja
Objects 7: naix
Objects 8: npc_townsfolk
Objects 9: npc_merchant
Objects 10: merchantMenu
Objects 11: ctrl_viewInit_gui
Objects 12: ctrl_viewInit_game
Objects 13: ctrl_gameStateMachine
Objects 14: ctrl_debug
Objects 15: ctrl_JSON_initFiles
Objects 16: ctrl_storyValues
Objects 17: ctrl_mainMenu
Objects 18: ctrl_pixelCollision
Objects 19: enemy_field
Objects 20: enemy_wanderTarget
Objects 21: transition_battle_00
Objects 22: transition_fade_01
Objects 23: transition_fade_02
Objects 24: saveButton
Objects 25: loadButton
Objects 26: savePoint
Objects 27: barrier
Objects 28: npc_wanderTarget
Objects 29: signpost
Objects 30: treasureChest
Objects 31: carrots_ground
Objects 32: door_0
Objects 33: door_1
Objects 34: mapPortal_0
Room_Prepare()
Sound_Prepare()
InitGraphics()
Finished PrepareGame()
Run_Start
Total memory used = 6335885(0x0060ad8d) bytes
**********************************.
Entering main loop.
**********************************.
Resizing fullscreen window...Resizing swap chain...---------------------------------------------------------------
minFPS, maxFPS, avgFPS
-6134, 827, -2827
---------------------------------------------------------------
---------------------------------------------------------------
minFPS, maxFPS, avgFPS
-6134, 827, -2827
---------------------------------------------------------------
 
S

signal

Guest
After updating to 1.4.1772, I'm seeing the following in the compile window pertaining to gamepads:

Windows
Code:
Attempting to set gamepadcount to 12
...
Attempting to set gamepadcount to 0
Android
Code:
I/yoyo    (23856): iCade Support in "Global Game Settings/Android" not selected
D/yoyo    (23856): ****** Found API level 12 function! Joysticks supported
I/yoyo    (23856): GAMEPAD: Enumeration complete
I/yoyo    (23856): Attempting to set gamepadcount to 1
The project does not use any gamepad functions. An empty project only shows the first message "Attempting to set gamepadcount to 12"

@rwkay Is this just normal behavior as of 1.4.1772? On both platforms, the project runs without any errors.
 
N

Niklas

Guest
I have the same problem.
No matter which test I run it always shows the message:

Attempting to set gamepadcount to 12
Compile finished: 11:25:11

and nothing else happens
 
A

Andrew Knox

Guest
I had this issue with GMS 2.x.
Every time I ran a game from the IDE or after I compiled the game it would hang when starting up. It would hang right here.


C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.1.4.203/windows/Runner.exe -game "C:\Users\Andrew\AppData\Local\GameMakerStudio2\GMS2TEMP\2DDemo_79922E26_VM\2DDemo.win"
---------------About 30 seconds or longer to go to the next line
Attempting to set gamepadcount to 12

I slapped Process Monitor on my system and found it was all trying to enumerate everything in

HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\DirectInput

and

HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick

I had a lot of stale entries in here so as it was querying each key and all it's contents it was picking up a crap ton of NOT FOUND messages. Several Thousand in my case. This is what was causing the delay with the game starting.

To fix this issue I deleted everything under HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties and then rebooted my system to make sure if Windows needed anything in these keys it would put the entries back as the system started up. (******Make sure you export the key first before deleting it********)

Once I did this every time I start a game in GSM or from a compiled version of a game they start in seconds now rather then 30 - 40+ seconds.

Hope this will help anyone else who has this issue.


Update June 03 2018

I've figured out a few more culprits to this issue.

1. Xbox wireless receiver for Xbox 360 controllers. I had one plugged in via USB and it was causing a lot of problem with this issue. Unplugging it and getting rid of the above registry entries then rebooting has resolved it as well even more so.

Be aware of any USB devices that you have plugged in, especially controllers, a lot of third party ones report in constantly to windows an seem to cause this issue. Unplug your USB devices and reboot, leave them unplugged and see how things go.
 
Last edited by a moderator:
A

Almighty Cow

Guest
Andrew,

Thank you! I encountered this issue today. Turns out, unplugging my microsoft surface mouse and plugging it back in fixed the issue.

Cheers!
 
Top