#Game randomly not starting up on the executable.

151 messages · Page 1 of 1 (latest)

inland gazelle
#

I'll try to be quick yet descriptive about my issue because I'm as confused as you reading the title.

I'm creating a video game and the development is going very nice, however, for some reason in the executable version (not when in the IDE) of the game, it gets stuck at starting up around 2 out of 3 times I try to run it. This happens on Windows (as far as I remember, using Proton on Linux worked perfectly fine), happens on both YYC and VM versions.

I've checked and its nothing about my own code afaik, because I tried to put checks at the most initial GML code and it doesn't get to run when this happens. I've tried to search on Google and nothing useful.

The game doesn't crash or anything, it can run forever (I'm not sure if at some point I kept the game running stuck and ended up opening completely but when it runs properly at first it lasts no longer than 1 second to open)

And yes, it happens on almost all PCs with Windows I've tested it.

GameMaker Version

  • IDE: 2023.6.0.89
  • Runtime: 2023.6.0.137
    Still, this issue has been happening for various months now.
    Windows
  • Windows 10 Pro 21H2 (For my PC at least, but happens on any other with Windows)

Anyone has idea of why this happens? Thanks in advance 🫂

icy mica
#

Do you know if this happens in 2023.4?

inland gazelle
#

I don't really know, how can I check?

#

What I can tell you is that the issue has been happening on all versions since beginning of March more or less

icy mica
#

Hmm, might be better to actually check something else then before we try 2023.4

#

because we'd have to download an older runtime

inland gazelle
#

Probably my game already uses newer stuff so I'm not sure if that's possible

icy mica
#

Could you run your game in debug mode (bug icon, or F6)

inland gazelle
#

Yes

icy mica
#

And when your game gets stuck, goto the debugger tab and press the "pause" button

#

That'll drop us wherever script it's stuck in

inland gazelle
#

I mean, it only happens on executable, in the IDE works fine

#

And as I said, my very first code isn't even ran when it gets stuck

#

I tried to log to the latest.log of my game at first, then delete the latest latest.log and when it gets stuck, the file isn't even created.

icy mica
#

I'm guessing your latest.log is made from file_text_*?

inland gazelle
#

yes

icy mica
#

Yeah that'll make sense. The file doesn't get created until it's opened/closed

#

Or it might've been happening sooner than later

#

shakes hand I definitely do smell some kind of infinite loop going on though

inland gazelle
#

I think thats a possibility but... why happens some times and some others not?

icy mica
#

Down to the code

#

There's barely any information to determine anything here

#

But my guesses are either:
A. You've got some value that gets fed into the infinite loop at random, that causes it to loop forever
B. Some library/addon has done some witchcraft and caused an infinite loop

inland gazelle
#

I would say the B is more likely

#

But I don't really know how to fix

icy mica
#

How many libraries/addons do you have?

#

And what are they?

inland gazelle
#

Steamworks and Scribble, just those. I added Discord Extension once but that was like... yesterday, and not months ago like this issue has been happening

icy mica
#

I'm instantly ruling those two out

#

Cause I know neither of them cause an issue like that

inland gazelle
#

That's the thing

icy mica
#

Well, Scribble especially. Steamworks, there's a smidge chance

inland gazelle
#

Sure?

icy mica
#

But then again, they're also made by YYG

#

And I don't think they'd do anything to cause an infinite loop in their own test

#

But shakes hand there's always exceptions!

inland gazelle
#

Do you know any function or something that can be used quickly and as-is on the top of the code so I can test if my code is even reached?

icy mica
#

show_debug_message

inland gazelle
#

Yeah, but on executable

#

Something I can debug

#

on exe

icy mica
#

That will work on executable

inland gazelle
#

And how do I check?

icy mica
#

You just need to pass in a command line parameter

#

Lemme get it

inland gazelle
#

Ahh, fine

icy mica
#

-output <filename>

inland gazelle
#

Good

#

If the message is actually sent then I will be putting a lot so I can see exactly when it happens

icy mica
#

🤞

inland gazelle
#

How could I pass command line parameters through file?

icy mica
#

You can either do it as a shortcut, or I do a terminal

#

Powershell or CMD will do

inland gazelle
#

Ah true

#

I changed the name of the game bcs I want to keep it private, this should work?
"D:\Game Dev\Game\game-testy\game.exe" -output testy.log

icy mica
#

Give it a shot

inland gazelle
#

I did, but no file

icy mica
#

Theoritically it should but shakes hand I can't say

#

Welp

#

tbh you don't really need to show me the game file name anyway

#

We just need the output

inland gazelle
#

I know but I was asking if the command was correct, because it didn't generate anything

icy mica
#

The commands correct

#

Since you're using cmd

#

I imagine your current directory might be C:\Users\Username

#

So it might be storing it in your user profile

inland gazelle
#

I was using the shortcut

icy mica
#

Hmm

inland gazelle
#

XD

#

Let me try on cmd so

icy mica
#

You might have to enter a location for the text file as well

inland gazelle
#

Powershell gives me error with that command

icy mica
#

Gotta do .\path_to_exe

#

Or if the terminal is in the same directory as your game

inland gazelle
#

Ah fine

#

Let me see

#

Same result

#

Like, no file at all is created

icy mica
#

Hmm

inland gazelle
#

Btw, for now all of the tries of running the game it got stuck, until the 5th one

icy mica
#

For the terminal, where's the directory set to at?

#

(the directory is the one that's on the left)

inland gazelle
#

I literally did Open with Visual Studio Code on the folder and used it there, cuz, idk why Windows doesn't include an open with terminal like on Linux

icy mica
#

It does?

inland gazelle
#

Not my case

icy mica
#

Actually no wait, I think that was via something else

#

lol

#

This should be available via File subcontext... but I never really use it

inland gazelle
#

wait

#

I'm dum

#

Okay, let me do a few more tests

#

Okay, done with the tests

#

I was doing something wrong but the result is the same

#

I was trying to open the game on file but it was calling Steam and opening that, I replaced the game files on Steam to test and now it is opening the correct version, but still no log

icy mica
#

Ah

#

Steamworks hijacking is fun

inland gazelle
#

Yes

#

I mean, there's no log when it gets stuck

#

but when it actually works, the log is fine

icy mica
#

Do me a favour

inland gazelle
#

Tell me

icy mica
#

Disable steamworks in your project and build that out

inland gazelle
#

Fine

#

How can I just disable steamworks?

#

Wait a sec

icy mica
#

You can disable the extension by unchecking the platforms it Copies to in the extension editor...

inland gazelle
#

I had an idea, I'll try it and if it does not work, I'll try that instead

#

I think... I think I've fixed it?

icy mica
#

Hmm?

#

What was the issue?

inland gazelle
#

Well, I just didn't notice there was an update on Steamworks extension. I don't really know cuz its random but I've ran the game 6 times and every of them launched correctly

#

Another one

#

Maybe that was the problem...

#

How the heck I didn't got into that

#

Anyways

#

Thanks for the help :D

#

Sorry for my stupidity if that's the name for this lol

icy mica
#

Honestly, I'm just confused that was even an issue

#

2023.6 has had some overall weirdness

inland gazelle
#

Yeah but this was happening for all over this year almost

icy mica
#

How old was your steamworks version?

inland gazelle
#

I think from the beginning of this year or past december as that was when I started this project

#

I'll submit a build and ask my friends if they see any issues going around

#

And the issue started happening around March

#

I remember my PC broke the 7th of February and I was doing steam stuff, then I submitted the first build barely as I could around the end of february, first of march and thats when it was starting to happen

#

Maybe I updated GameMaker but the extension wasn't updated so something broke there?

icy mica
#

¯_(ツ)_/¯

#

I just know the extension gets updated like every now and then

#

Sometimes between GM versions

inland gazelle
#

I guess. at least this could serve as precedent for similar issues in the future

#

Like, asking if the extensions are updated lol

icy mica
#

I mean, there's a bazillion factors involved tbh

inland gazelle
#

Yes

icy mica
#

It's not always an easy thing to hit a bunch of common answers

#

I just knew off by heart that both Steamworks and Scribble don't cause these issues (nor have I ever seen those being issues before)

inland gazelle
#

Do you know how I noticed it was outdated? I was helping another guy on other forum post and I tested on a new project the extension and the new version has a setting for log level, my version didn't

icy mica
inland gazelle
#

Yes XDD

icy mica
#

It's happened to me a few times so XD

inland gazelle
icy mica
icy mica
# inland gazelle How peculiar

But yeah, I say this because

  1. I work with other people on projects using Steamworks, and we never ran into anything like this.
  2. I help maintain Scribble here and there, or add things to it. In the past 2 years, I haven't come across anything problematic
#

All sorts of other bugs, but never an infinite loop

#

So the fact that Steamworks not being up to date caused it... It's quite interesting

#

Also scary

inland gazelle
#

Yes