Project

General

Profile

Bug #827

[Win32] Fullscreen toggle access violation

Added by danij almost 15 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
2009-11-20
% Done:

100%


Description

On my dev system I have been able to reliably recreate a Win32 access violation which results after a call to SwapBuffers in the following specific test case:

  • Start Doomsday in a fullscreen video mode that is not that of the current desktop (e.g., desktop is 1920x1200 but launch Doomsday with -wh 1200 800).
  • Open the console and enter "togglefullscreen".
  • Start a new game from the menu.

Doomsday will then switch into busy mode while the map is loaded but during the first call to SwapBuffers after the busy thread is created, Windows will throw a Win32 access violation.

I have spent some time debugging the problem and it would seem that upon changing the video mode not only must the GL context be recreated (including a Doomsday GL subsystem restart) but so too the main Doomsday window. This is due to subtle differences in the pixel formats used vs those used for fullscreen video modes.

The upshot of this is that in order to correctly support toggling between fullscreen and windowed modes with Win32 we must destroy and recreate the main Doomsday window. This has the knock-on effect that due to the fact we are still using DirectX for input, the input subsystem must be restarted also.

Attached is a unidiff patch against the beta6 branch #9fb6340 which fixes this access violation but it should be considered a kludge rather than a real fix.

The question is though, should I bother to fix it all in the current architecture? (Win32 is using SDL video in the 2.0 architecture and hopefully the same issue will not present)

Labels: System

History

#1 Updated by danij almost 15 years ago

udiff patch to fix win32 access violation with togglefullscreen

Attachments:

Also available in: Atom PDF