Skip to content

Call to GraphicsDevice.Dispose() throws System.NullReferenceException #3

Description

@eulercircles

In a brand new project, when the window is closed and MonoGameGraphicsDeviceService.Dispose() calls GraphicsDevice.Dispose() it receives a System.NullReferenceException.

System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=SharpDX.DXGI
StackTrace:
at SharpDX.DXGI.SwapChain.GetFullscreenState(RawBool& fullscreenRef, Output& targetOut)
at SharpDX.DXGI.SwapChain.get_IsFullScreen()
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformDispose()
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Dispose(Boolean disposing)
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Dispose()
at MyLevelEditor.MonoGameControls.MonoGameGraphicsDeviceService.Dispose() in C:\Users...\Desktop\MyLevelEditor\MyLevelEditor\MonoGameControls\MonoGameGraphicsDeviceService.cs:line 31
at MyLevelEditor.MonoGameControls.MonoGameContentControl.Dispose(Boolean disposing) in C:\Users...\Desktop\MyLevelEditor\MyLevelEditor\MonoGameControls\MonoGameContentControl.cs:line 85
at MyLevelEditor.MonoGameControls.MonoGameContentControl.Finalize() in C:\Users...\Desktop\MyLevelEditor\MyLevelEditor\MonoGameControls\MonoGameContentControl.cs:line 92

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions