SharpDX exception when calling Texture2D.GetData

I am calling GetData on a Texture2D and i get an exception stating:

"HRESULT: [0x887A0005], Module: [SharpDX.DXGI], ApiCode: [DXGI_ERROR_DEVICE_REMOVED/DeviceRemoved], Message: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.

This does not happen if I try the same code in XNA 4.0. This is running on Windows with a DirectX game. I am using the latest version of MonoGame. Here is a stack trace

   at SharpDX.Result.CheckError()
   at SharpDX.Direct3D11.Device.CreateTexture2D(Texture2DDescription& descRef, DataBox[] initialDataRef, Texture2D texture2DOut)
   at SharpDX.Direct3D11.Texture2D..ctor(Device device, Texture2DDescription description)
   at Microsoft.Xna.Framework.Graphics.Texture2D.PlatformGetData[T](Int32 level, Nullable`1 rect, T[] data, Int32 startIndex, Int32 elementCount)
   at Microsoft.Xna.Framework.Graphics.Texture2D.GetData[T](Int32 level, Nullable`1 rect, T[] data, Int32 startIndex, Int32 elementCount)
   at GLX.SpriteSheet.GetFrameColorData(Rectangle sourceRect) in c:\Users\Sanders\OneDrive\Projects\GLX\GLX\SpriteSheet.cs:line 48
   at GLX.Sprite.UpdateTexAndColorData(SpriteSheet spriteSheet, GraphicsDevice graphicsDevice) in c:\Users\Sanders\OneDrive\Projects\GLX\GLX\Sprite.cs:line 181
   at GLX.Sprite.UpdateAnimation(GameTime gameTime, GraphicsDevice graphicsDevice) in c:\Users\Sanders\OneDrive\Projects\GLX\GLX\Sprite.cs:line 121
   at GLX.Sprite.Update(GameTime gameTime, GraphicsDevice graphicsDevice) in c:\Users\Sanders\OneDrive\Projects\GLX\GLX\Sprite.cs:line 86
   at TimeGame.Game1.Update(GameTime gameTime) in c:\Users\Sanders\OneDrive\Projects\TimeGame\TimeGame\Game1.cs:line 94
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at MonoGame.Framework.WinFormsGameWindow.OnIdle(Object sender, EventArgs eventArgs)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at MonoGame.Framework.WinFormsGameWindow.RunLoop()
   at MonoGame.Framework.WinFormsGamePlatform.RunLoop()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Microsoft.Xna.Framework.Game.Run()
   at TimeGame.Program.Main() in c:\Users\Sanders\OneDrive\Projects\TimeGame\TimeGame\Program.cs:line 22
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

I don’t know if this is related, but the crash seems to be happening in CreateTexture2D.

I’ve been receiving lots of crashes from the same function when I updated monogame to the latest version the last week.

Hello,

do you have any new info about this problem? I have the same error as the guy who started the topic.