Skip to content

Control crashes when no display is connected #155

@xhuan8

Description

@xhuan8
var settings = new GLWpfControlSettings
        {
            MajorVersion = 2,
            MinorVersion = 1
        };
        OpenTkControl.Start(settings);

After upgrade from 4.2.3 to 4.3.3, I got AccessViolationException at startup randomly, which crashes my application.
The version is related to GLWpfControl or anything else? Should I change it to MajorVersion = 4?

Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is ofter an indication that other memory is corrupt.
Stack:
at OpenTK.Windowing.GraphicsLibraryFramework.GLFWNative.glfwGetVideoMode(OpenTK.Windowing.GraphicsLibraryFramework.Monitor*)
at OpenTK.Windowing.GraphicsLibraryFramework.GLFWNative.glfwGetVideoMode(OpenTK.Windowing.GraphicsLibraryFramework.Monitor*)
at OpenTK.Windowing.GraphicsLibraryFramework.GetVideoMode(OpenTK.Windowing.GraphicsLibraryFramework.Monitor*)
at OpenTK.Windowing.Desktop.NativeWindow..ctor(OpenTK.Windowing.Desktop.NativeWindowsSettings)
at OpenTK.Wpf.DDxGlContext..ctor(OpenTK.Wpf.GLWpfControlSettings)
at OpenTK.Wpf.GLWpfControlRenderer..ctor(OpenTK.Wpf.GLWpfControlSettings)

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.0bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions