Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Unable to set the pixel format. #5

Closed
Kromster80 opened this issue Sep 9, 2016 · 1 comment
Closed

Exception: Unable to set the pixel format. #5

Kromster80 opened this issue Sep 9, 2016 · 1 comment

Comments

@Kromster80
Copy link
Owner

From(http://www.knightsandmerchants.net/forum/viewtopic.php?p=47333#p47333)

I don't experience crashes at start, but I do get an Exception if I'm switching between windowed and FullScfeen mode and changing the Antialiasing setting at the same time. If I change these separately there is no exception raised.
So I assume the bug lies in code used to reinitialize renderer. My guess is that at certain point during this process there is no valid handle either to game window (I noticed it gets recreated every time) or there is no valid handle to the underlying API (OpenGL or DirectX). The later would also cause such exceptions on computers which are automatically switching between integrated and dedicated graphics card since rendering handles get recreated.
Here is part of the long indicating what is happening at the time:
CODE: SELECT ALL
04:53:05.406 6,393s 5136ms gMain.ReinitRender
04:53:06.089 7,076s 682ms Init render at: 1936x1056
04:53:06.243 7,230s 154ms Exception occured: Exception: Unable to set the pixel format.
04:53:08.113 9,100s 1869ms gMain.ReinitRender
04:53:08.144 9,131s 30ms Init render at: 1936x1056
OpenGL Vendor: ATI Technologies Inc.
OpenGL Renderer: AMD Radeon (TM) R9 200 Series
OpenGL Version: 4.5.13416 Compatibility Profile Context 15.300.1025.0

And some info on my graphics card logged by game
CODE: SELECT ALL
04:52:59.323 0,311s 6ms Init render at: 1366x788
OpenGL Vendor: ATI Technologies Inc.
OpenGL Renderer: AMD Radeon (TM) R9 200 Series
OpenGL Version: 4.5.13416 Compatibility Profile Context 15.300.1025.0

@Kromster80
Copy link
Owner Author

Fixed in r4348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant