richardjmoss's picture

Windows 8 Support?

Hello,

I was testing a game I'd written on a Windows 8 VM, but when I start the game, it blows up as follows:

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException
Stack:
   at OpenTK.Graphics.GraphicsMode.get_Default()
   at OpenTK.GameWindow..ctor()

I've had a look in the static constructors for GraphicsMode and Platform but I can't see that would cause it to fail, unless it can't identify the OS (unlikely I'd have thought) or it doesn't have OpenGL drivers. I'm assuming Windows 8 has OpenGL drivers (I'm running under the latest version of VirtualBox, guest additions installed and 2D/3D acceleration enabled).

Has anyone else tried running OpenTK under Windows 8? The VM doesn't have any dev tools installed, it's just supposed to be for testing final builds, but I'll probably bang VS on and do some poking to see if I can figure out what's wrong.

Regards;
Richard Moss


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
puklaus's picture

Tested too, cant get otk work with w8 (in VM) either. Initializing doesnt work or so.

Just tested some random opengl demo (not using otk / .net), and it did work just fine (and fast).

Inertia's picture

I've tested an early windows 8 x64 with OpenTK and Catalyst, which worked flawless.
Now installed "build 8400" x64, with latest NV driver. Works too.

The only difference I can tell is, that build 8400 does not install .Net 3.5 (+older) by default, only 4.0+. But the OS recognized it and prompted whether I'd like to install and that seemed the only piece that was missing.

Please try to install .Net 3.5 see if that fixes it, else I'd assume some kind of incompatibility between win8 and your virtual HW? Is Windows 8 officially supported by your VM dev?

puklaus's picture

I have W8 build 8400 x32 in OracleVM VirtualBox.

Inertia wrote:

The only difference I can tell is, that build 8400 does not install .Net 3.5 (+older) by default, only 4.0+. But the OS recognized it and prompted whether I'd like to install and that seemed the only piece that was missing.
Please try to install .Net 3.5 see if that fixes it, else I'd assume some kind of incompatibility between win8 and your virtual HW?

Yes, it prompted that 3.5 was missing, installed it right away.

Inertia wrote:

Is Windows 8 officially supported by your VM dev?

VirtualBox supports W8, one will found it in the list when creating new VM.

Tried axiom 0.9 with opengl renderer:

Quote:

OpenGL Warning: Returning GetProcAddress:NULL for wglSetPixelFormatWINE

Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'OpenTK.Graphics.GraphicsMode' threw an exception. ---> System.AccessViolation
Exception: Attempted to read or write protected memory. This is often an indicat
ion that other memory is corrupt.
at OpenTK.Platform.Windows.Wgl.Imports.CreateContext(IntPtr hDc)
at OpenTK.Platform.Windows.WinGLContext..ctor(GraphicsMode format, WinWindowI
nfo window, IGraphicsContext sharedContext, Int32 major, Int32 minor, GraphicsCo
ntextFlags flags)
at OpenTK.Platform.Windows.WinFactory.CreateGLContext(GraphicsMode mode, IWin
dowInfo window, IGraphicsContext shareContext, Boolean directRendering, Int32 ma
jor, Int32 minor, GraphicsContextFlags flags)
at OpenTK.Graphics.GraphicsContext..ctor(GraphicsMode mode, IWindowInfo windo
w, Int32 major, Int32 minor, GraphicsContextFlags flags)
at OpenTK.Platform.Windows.WinGraphicsMode.d__10.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 c
ollection)
at OpenTK.Platform.Windows.WinGraphicsMode..ctor()
at OpenTK.Platform.Windows.WinFactory.CreateGraphicsMode()
at OpenTK.Graphics.GraphicsMode..cctor()
--- End of inner exception stack trace ---
at OpenTK.Graphics.GraphicsMode.get_Default()

Tried monogame:

Quote:

Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'OpenTK.Graphics.GraphicsMode' threw an exception. ---> System.AccessViolation
Exception: Attempted to read or write protected memory. This is often an indicat
ion that other memory is corrupt.
at OpenTK.Platform.Windows.Wgl.Imports.CreateContext(IntPtr hDc)
at OpenTK.Platform.Windows.WinGLContext..ctor(GraphicsMode format, WinWindowI
nfo window, IGraphicsContext sharedContext, Int32 major, Int32 minor, GraphicsCo
ntextFlags flags) in E:\cs\opentk\Source\OpenTK\Platform\Windows\WinGLContext.cs
:line 72
at OpenTK.Platform.Windows.WinFactory.CreateGLContext(GraphicsMode mode, IWin
dowInfo window, IGraphicsContext shareContext, Boolean directRendering, Int32 ma
jor, Int32 minor, GraphicsContextFlags flags) in E:\cs\opentk\Source\OpenTK\Plat
form\Windows\WinFactory.cs:line 56
at OpenTK.Graphics.GraphicsContext..ctor(GraphicsMode mode, IWindowInfo windo
w, Int32 major, Int32 minor, GraphicsContextFlags flags) in E:\cs\opentk\Source\
OpenTK\Graphics\GraphicsContext.cs:line 134
at OpenTK.Platform.Windows.WinGraphicsMode.d__10.MoveNext() in E
:\cs\opentk\Source\OpenTK\Platform\Windows\WinGraphicsMode.cs:line 181
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 c
ollection)
at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
at OpenTK.Platform.Windows.WinGraphicsMode..ctor() in E:\cs\opentk\Source\Ope
nTK\Platform\Windows\WinGraphicsMode.cs:line 55
at OpenTK.Platform.Windows.WinFactory.CreateGraphicsMode() in E:\cs\opentk\So
urce\OpenTK\Platform\Windows\WinFactory.cs:line 74
at OpenTK.Graphics.GraphicsMode..cctor() in E:\cs\opentk\Source\OpenTK\Graphi
cs\GraphicsMode.cs:line 36
--- End of inner exception stack trace ---