AccessViolationException 8.1

Hi.
I use MonoGame 3.2 for Windows Phone 8.1. Sometimes when my game is deactivated I get “An unhandled exception of type ‘System.AccessViolationException’ occurred in SharpDX.Direct3D11.DLL”. I couldn’t find which version of SharpDX monogame for wp8.1 uses but if it’s not SharpDX 2.6 that could be an issue: https://code.google.com/p/sharpdx/issues/detail?id=161 (fixed in sharpdx 2.6.0)

edit call stack:
     SharpDX.Direct3D11.DLL!SharpDX.Direct3D11.DeviceContext.Flush()    Unknown
     SharpDX.Direct3D11.DLL!SharpDX.Direct3D11.DeviceContext.Dispose(bool disposing)    Unknown
     SharpDX.DLL!SharpDX.DisposeBase.CheckAndDispose(bool disposing)    Unknown
     SharpDX.DLL!SharpDX.DisposeBase.Dispose()    Unknown
     SharpDX.Direct3D11.DLL!SharpDX.Direct3D11.Device.Dispose(bool disposing)    Unknown
     SharpDX.DLL!SharpDX.DisposeBase.CheckAndDispose(bool disposing)    Unknown
     SharpDX.DLL!SharpDX.DisposeBase.Dispose()    Unknown
     SharpDX.DLL!SharpDX.Utilities.Dispose<SharpDX.Direct3D11.Device>(ref SharpDX.Direct3D11.Device comObject)    Unknown
     MonoGame.Framework.DLL!Microsoft.Xna.Framework.Graphics.GraphicsDevice.UpdateDevice(SharpDX.Direct3D11.Device device, SharpDX.Direct3D11.DeviceContext context)    Unknown
    MonoGame.Framework.DLL!Microsoft.Xna.Framework.Graphics.GraphicsDevice.Initialize()    Unknown
     MonoGame.Framework.DLL!MonoGame.Framework.WindowsPhone.SurfaceUpdateHandler.Draw(SharpDX.Direct3D11.Device device, SharpDX.Direct3D11.DeviceContext context, SharpDX.Direct3D11.RenderTargetView renderTargetView)    Unknown
     MonoGame.Framework.DLL!MonoGame.Framework.WindowsPhone.XamlGame<SnakeDevelopment.Game.GameMain>.DrawingSurfaceBackgroundContentProvider.Draw(SharpDX.Direct3D11.Device device, SharpDX.Direct3D11.DeviceContext context, SharpDX.Direct3D11.RenderTargetView renderTargetView)    Unknown
     SharpDX.Direct3D11.DLL!SharpDX.Direct3D11.DrawingSurfaceBackgroundContentProviderShadow.DrawingSurfaceBackgroundContentProviderVtbl.Draw(System.IntPtr thisPtr, System.IntPtr hostDevice, System.IntPtr hostDeviceContext, System.IntPtr hostRenderTargetView)    Unknown

edit2: seems like the bug is connected with pixel shaders (or/and rendertargets) - when i removed post-processing effects I can’t “crash” game anymore

I have the same issue, are you trying to do a universal app?