ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.59k stars 598 forks source link

Fatal Error = Failed to create SDL Window #406

Closed HGRUNT closed 11 years ago

HGRUNT commented 11 years ago

Hello,

I can't launch Half-Life and any of it's mod in OpenGL since the last update.

"Fatal Error = Failed to create SDL Window" appears and the game won't launch.

Actually, it works on my laptop but, when i switch to my CRT screen (which i'm used to play on), it's crashing. I tried to update my videocard driver (Nvidia Geforce 330m); reinstalling Half-Life and some other things like add -gl -nofbo in launch settings (https://github.com/ValveSoftware/halflife/issues/109) and it does not change anything. Thanks for your help. If you need any further information, feel free to ask. Best regards

PS : I know this issue has been discussed in the topic i linked in the description of my problem but the fact it works on my laptop's screen and not on the CRT linked to my laptop looks strange.

alfred-valve commented 11 years ago

What OS are you running this on? How are you connecting your CRT to your laptop? Right now we only support running on your first monitor.

HGRUNT commented 11 years ago

WIndows seven 32; the CRT is connected via the VGA port.

alfred-valve commented 11 years ago

If you configure windows to have the CRT as your first monitor (use the video properties dialog in windows to order them) does that fix the issue?

HGRUNT commented 11 years ago

No, it does not fix the issue.

HGRUNT commented 11 years ago

Ok, if i use another desktop resolution than 640_480, the game is launching correclty (even with 640_480 ingame resolution). If you want me to do some tests, feel free to ask.

alfred-valve commented 11 years ago

What in game resolution were you using? Do you still have a problem if your desktop is @ 640x480?

zehel1610 commented 11 years ago

Hey Alfred,

Thanks for helping us all with this. I too have this issue, and I tried everything I could find including your suggestions.

1) My problem is this "Fatal Error = Failed to create SDL Window" - which only happens if I run CZ in OpenGL mode.

2) The game will work in Software mode, windowed-mode, with any resolution. I did this by putting this command into the Launch Options: -soft -sw -w 640 -h 480

So there seems to be some kind of issue between the game, and how it is using OpenGL. My Specs are:

Lenovo Thinkpad T61p Laptop WinXP-32 bit Duo Core Intel 2.2 Ghz CPU NVidia Quadro FX 570M - with 512 MB DDR memory Using External monitor ONLY, with native resolution of 1920x1080 (i usually run the game with this resolution too - Full screen).

Let me know if you'd like me to try any settings.

-EEK!

ghost commented 11 years ago

@zehel1610 What color depth are you using? If I set it to 16bit I get this error

zehel1610 commented 11 years ago

I just realized I am using 16-bit. I wonder what happens if i change it to 32-bit... colodep1

zehel1610 commented 11 years ago

I don't believe it. It freaking works now! Back to normal! Full screen, OpenGL, 1920x1080. Thanks Max!

Strange though, I wonder if it was the Steam update that changed it, or if it was like that the entire time.

ghost commented 11 years ago

@zehel1610 The update no longer allows to use 16-bit in the game, but it can't change it to 32-bit if system runs on 16-bit By the way, could you tell me your nvidia driver version? In NVIDIA Control Panel go to "System Information" (this button is in the lower left corner, under menu). It doesn't seem like your version is the latest :)

zehel1610 commented 11 years ago

Yea, that totally makes sense. Thanks again good sir, I will see if my friends are also having this issue and spread the word. Here's my dxdiag output:

dxdiag-mar13

ghost commented 11 years ago

It looks like you're using an old video driver. You can find a new one here: http://www.nvidia.com/Download/index.aspx?lang=en-us If you're not sure about "Download type", check this: http://www.nvidia.com/Download/Help.aspx?lang=en-us The latest version is from 2013, your version is from 2009.

Sorry for offtopic :) glad you fixed the issue

zehel1610 commented 11 years ago

Yea, I usually don't upgrade unless i have to. When I used to be Desktop I.T., every time i would upgrade machines' video drivers, i'd get a BSOD very often. I almost upgraded today though :)

alfred-valve commented 11 years ago

Ahh, 16-bit desktop is causing a problem, good detective work guys, let me see if I can reproduce this and then make the game behave better in this situation.

alfred-valve commented 11 years ago

Someone here deserves a big hug, I've found the problem and we will have a fix out shortly!

ghost commented 11 years ago

@alfred-valve The latest update allows to play in 16-bit. What's the point of removing controlling the Color Depth then? 32-bit smoke: 16-bit smoke:

AnAkkk commented 11 years ago

People shouldn't be allowed to run the game in 16bit due to the smoke issue.

ghost commented 11 years ago

Something strange happens. After this update, sometimes, I don't experience FPS drop with MSAA: smoke+nightvision+detail textures+MSAA = 100FPS. After some testing I found out that FPS drops when in NVIDIA Control Panel I choose "Adjust image settings to Quality" (Perfomance or Balance don't cause fps drop) I think it's related to https://github.com/ValveSoftware/halflife/issues/681#issuecomment-14446986

To found out what exactly causes FPS drop, in NVIDIA Control Panel I chose Use the advanced 3D image settings and in "Half-Life settings" I tested a variety of settings and found out that only two parameters are causing fps drop:

or

No other setting is causing this problem! Antialiasing - Setting: 2x, 4x, 8x CSAA, 8x, 16x CSAA = 100FPS! Antialiasing - Setting 16xQ CSAA = 40-65FPS!

Antialiasing - Transparency: Multisample don't cause fps drop. Supersample does.

Also

DON'T cause fps drop.

P.S. In CS:Source I get 100fps with any setting.

After I reboot my PC fps drop appeared again, but after another reboot, everything went back to normal.

alfred-valve commented 11 years ago

It turns out a large enough proportion of users legitimately use 16-bit desktops and their video cards refuse to make 32-bit OGL contexts to render into, so we can't push as hard on the 16-bit requirement. The lack of FPS changes is due to the beta code change that is giving the video card more latitude to pick an appropriate video mode for the game (fixing the launch problem).

AnAkkk commented 11 years ago

Can anything be done about the 16bit smoke then?

alfred-valve commented 11 years ago

I don't know of a good smoke solution right now.