csgo-osx-linux
csgo-osx-linux copied to clipboard
Assertion failure at SDL_GetDesktopDisplayMode_REAL
- System information from steam in a gist
- Have you checked for system updates?: Yes
When I try to start CS:GO I get an error message:
Assertion Failure at SDL_GetDesktopDisplayMode_REAL (/Users/buildbot/buildslave/sdl_osx/build/dev/src/video/SDL_video.c:869), triggered 1 time: 'displayIndex < = 0 && displayIndex < _this->num_displays'
I have tried reinstalling Steam and the game, restoring the entire Mac OS Big Sur operating system and even trying to run the game on Mac OS Catalina. This has never happened before and the problem arose after the last update of the CS:GO game. The problem exists for at least 3 weeks.
Steps for reproducing this issue:
- Open Steam
- Download Counter-Strike Global Offensive
- Run
Hello @emiladelen, this assertion has been seen before in #1601. Can you check if you have CS:GO installed on a case-sensitive filesystem like that issue report?
Hello @emiladelen, this assertion has been seen before in #1601. Can you check if you have CS:GO installed on a case-sensitive filesystem like that issue report?
@kisak-valve, my file system was APFS (a default one) and I got the mentioned error. I tried to reinstall everything on a case-insensitive volume and now I get another error.
«Steam requires that ‘/Users/emil/Library/Application Support/Steam/Steam.Appbundle/Steam/Contents/MacOS’ be on a case-insensitive file system»
Hi, did you find a solution?
Hi, did you find a solution?
Unfortunately not. Tested everything, still can’t play.
Hi @emiladelen. I am facing the same issue. Did you find a solution?
@MaharshSuryawala hi y saw a video and could play You must connect another screen, like a tv or something. The problem is a display bug on Macbook Check this, It was so helpfull, I did not think about playin with an SSD https://www.youtube.com/watch?v=bmuFl-SlV20
@rockstar-fak Thanks! This was helpful. The game launches fine when I connect another screen.
Adding an SDL dev in case this is of interest to them.
Just to be clear: this is failing on a MacBook that just has it's default MacBook screen, with no other screens attached, right? I'll try to reproduce it over here.
Actually, before I reproduce this: @kisak-valve, the assertion in SDL is this:
SDL_assert(displayIndex >= 0 && displayIndex < _this->num_displays);
Which is from here.
But the error message in this report says
displayIndex < = 0 && displayIndex < _this->num_displays
(It has "<=" instead of ">=")
Can someone at Valve go check the SDL sources that CS:Go uses and just sanity check that character didn't get flipped somehow? Maybe something wild happened and converting the bug report to HTML used <
instead of >
and this isn't the problem, but that's probably why the assertion is failing otherwise.
(Also, release builds of the game should probably disable assertions, and it's possible this is only happening on the Mac because SDL is accidentally built with assertions enabled on that platform? It's possible assertions are intentionally left in release builds, though, so I don't know for sure.)
Just to be clear: this is failing on a MacBook that just has it's default MacBook screen, with no other screens attached, right? I'll try to reproduce it over here.
@icculus Yes, the launch fails on a MacBook. I even tried setting the launch options through steam "-w 800 -h 600." Unfortunately, that doesn't work too. If I connect an external screen, the game launches just fine on either of the screens. On the other hand, everything works just fine on my Windows machine.
Also, I don't know if CS:GO replaces SDL's error message box with its own, which SDL allows, but: is there an "ignore" button on the message box? If so, click that and see if the game otherwise works.
If there isn't a button for that, and you're comfortable with the Terminal, you can try launching the game with this environment variable set...
SDL_ASSERT=always_ignore
...which tells SDL not to pop up a message box at all and just try to keep going...and see if that bypasses the problem. Sometimes this works, sometimes you just have a different disastrous crash right afterwards.
Otherwise, we'll wait to see what Valve says.
Also, I don't know if CS:GO replaces SDL's error message box with its own, which SDL allows, but: is there an "ignore" button on the message box? If so, click that and see if the game otherwise works.
If there isn't a button for that, and you're comfortable with the Terminal, you can try launching the game with this environment variable set...
SDL_ASSERT=always_ignore
...which tells SDL not to pop up a message box at all and just try to keep going...and see if that bypasses the problem. Sometimes this works, sometimes you just have a different disastrous crash right afterwards.
Otherwise, we'll wait to see what Valve says.
@icculus There were the following options on the box -> "Retry", "Break", "Abort", "Always Ignore", and "Ignore." Hitting the break button worked for me. I am not getting the error message. However, still cannot play without the external screen. If I try to launch the game on the default Mac display, it crashes.
Okay, I'm going to poke at this today while waiting to hear back from @kisak-valve
Friendly reminder that I'm a moderator for Valve's issue trackers, and not a Valve dev myself. Unfortunately, I don't have access to check into the SDL code bundled with the game.
Friendly reminder that I'm a moderator for Valve's issue trackers, and not a Valve dev myself. Unfortunately, I don't have access to check into the SDL code bundled with the game.
Whoops, my bad, I didn't know that! I'll follow up internally.
(I did reproduce this here on an Intel MacBook running Big Sur. Fwiw, clicking "Always Ignore" got me to the "Operation Broken Fang" intro movie, but then it seemed to hang. In any case, this definitely is a legit bug that needs to be fixed, so I'll follow up and report back.)
Hey Ryan,
The code correctly states SDL_assert(displayIndex >= 0 && displayIndex < _this->num_displays);
and hasn't changed for a long time. I think the copy paste from OP is just incorrect here.
Thanks, @TTimo!
I'm digging into this on the SDL side, hopefully today, and will report back with what I see. :)
Thanks @TTimo ! Please tell us if you could solve it, I really would like to play CS:GO only with my MacBook. Maybe this can help https://support.steampowered.com/kb_article.php?p_faqid=772
To follow up: this is on a Valve employee's radar now, but I don't have a timeline for when it will be fixed or when that fix will be public. I'm an outsider to this process as well.
IN THE MEANTIME, to mitigate this on your end, either:
- Add
sdl_displayindex "0"
to the game's config file (which tells CS:GO to use the primary display; on the Mac, that means the screen with the Dock, even if it's an external display and not the MacBook's built-in screen. You can try 1 for a secondary display, 2 for a third, etc). I think if you stumble into the game's video settings, it'll write this out to the config on your behalf (at least, I somehow got the game into a state where it stopped popping up the error at some point, and I think this was why). - Just click "Always ignore" in the error dialog when it pops up. You'll have to do this every time you start the game until Valve pushes a fix, but I think it's harmless otherwise. If this causes other problems, the config file fix will definitely remove the problem entirely.
To follow up: this is on a Valve employee's radar now, but I don't have a timeline for when it will be fixed or when that fix will be public. I'm an outsider to this process as well.
IN THE MEANTIME, to mitigate this on your end, either:
- Add
sdl_displayindex "0"
to the game's config file (which tells CS:GO to use the primary display; on the Mac, that means the screen with the Dock, even if it's an external display and not the MacBook's built-in screen. You can try 1 for a secondary display, 2 for a third, etc). I think if you stumble into the game's video settings, it'll write this out to the config on your behalf (at least, I somehow got the game into a state where it stopped popping up the error at some point, and I think this was why).- Just click "Always ignore" in the error dialog when it pops up. You'll have to do this every time you start the game until Valve pushes a fix, but I think it's harmless otherwise. If this causes other problems, the config file fix will definitely remove the problem entirely.
Sorry, but where is this config file located on the Mac drive? In ~/Library/Application Support/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg
, I don't see either config.cfg
or autoexec.cfg
(just installed the game for the first time).
I was getting the same displayIndex pop-up error when launching CSGO on Big Sur.
Above recommendation to attach an external monitor works - CSGO loads ok with monitor attached.
Another simpler solution is to ensure Preferences -> Display -> Display Tab -> Resolution is set to "Default for display".
Mine was initially set to "Scaled" which I think confused Valve. CSGO loads fine now.
I had the same issue, and none of the fixes suggested here worked for me. However, running "Verify files integrity" showed that 3 files needed to be reacquired, and after that my game run. The only other change I have is having -autoconfig
flag in launch options.
I saw this error for the first time today. I tried the following with no luck. The game runs but the player skin is messed up. Did a clean uninstall/reinstall verify integrity always shows 1 file failed to validate deleted folder under userdata
using Mac os Catalina
Hello @dtolj, your screenshot is the issue being tracked at #2871 and is unrelated to this issue report.
Its an issue with usb accessory adapter remove all the accessory or any connected device run the game and now you can reattach any usb device accessory/peripheral you want/need.
Thanks GG
I verified files integrity. Not sure if this was the reason. But my solution was to hover the mouse few pixels BELOW the actual Close button (and you can see the Close button highlighted). Click below that highlight (below the close button) and it worked!
Verifying local files in the Properties dialog fixed the Assertion failure for me.
@kisak-valve Thanks to you, I combined 2 of yours and 1 of @rockstar-fak's solutions which makes it run perfectly on my mac. FYI, I have the latest Macbook pro (2021) running 12.1, the latest OS at the time.
Solution for me:
Open Terminal
Type SDL_ASSERT=always_ignore
Find the CSGO installation location. Probably in /Users/{your_username}/Library/Application\ Support/Steam/steamapps/common/Counter-Strike\ Global\ Offensive/csgo.sh
Type the whole location or navigate to the file csgo.sh
Finally, type in /FULL/PATH/TO/csgo.sh -nojoy -h 600 -w 800
And voila, it should start up and you should be able to interact.
Finally, don't forget, go into settings and change the resolution as you see fit.
EDIT: Now this didn't allow me to play online, but I entered the options -h 600 -w 800
from steam > properties > startup command, restarted steam and ran the command open steam://run/730
and it started working perfectly for online too.