
A first chance exception of type 'OpenTK.GameWindowExitException' occurred in OpenTK.dll ?
Posted Sunday, 24 May, 2009 - 10:49 by enablerbr ini noticed in my output window that this appeared. what does it mean? how can i track down and solve whats causing it? i have a sneaky feeling its the reason that sometimes my code will only run as far as this randomly.
public Game() : base(800, 600, new GraphicsMode(new ColorFormat(8, 8, 8, 8), 32, 8, 32, new ColorFormat(32), 2, false), "OpenTK Quick Start Sample", 0, DisplayDevice.Default, 3, 0, GraphicsContextFlags.Default) { VSync = VSyncMode.On; Window = this; }
and throw up this message.
An unhandled exception of type 'System.AccessViolationException' occurred in OpenTK.dll Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
it will break the code at VSync = VSyncMode.On; .


Comments
Re: A first chance exception of type ...
GameWindowExitException is harmless. It occurs when you call the
GameWindow.Exit()and is part of the normal shutdown process. I am redisigning this part of OpenTK, so it will probably go away in the future - in any case, the message is harmless (the exception is thrown and caught inside the OpenTK.dll)I am still trying to track where this AccessViolationException comes from. It only occurs on Nvidia/Windows systems - I haven't been able to reproduce it anywhere else. It is rather random, too, but once it happens you may have to close and reopen the IDE before it goes away. I hadn't linked this to GameWindow.VSync - I will check this shortly, this might give a clue as to what is going on.
Re: A first chance exception of type ...
i have had it happen without GameWindow.VSync . so it then does the same thing with
Window = this;.