Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

SharpDXException DeviceRemoved when using GetData()

$
0
0

@throbax wrote:

I post here because maybe someone can point me in the right direction.
I honestly don't have a clue what's going on.

Yesterday I talked to a customer:
This always happens when calling getData() on a texture2D.
The problem is that we have 600+ Installations out there and all of them are working.
Except this one...

The customers rig:
* Win 7
* NVIDIA GT 640 with 2G RAM

Currently used MG version: 3.6.0.1598

Things I found out:
* Can happen when an illegal command is sent to the card
* GetDeviceRemoveReason is DXGI_ERROR_DEVICE_REMOVED (hmmm)
* If I remove a getData() method it happens with the next one
* The customer re-installed his card-driver
* The customer installed an older version of the card-driver
no change...

Steps I will take the next days:
* Trying to deliver a debug build
* Update to newest MG develop build

One other thing strikes me as somewhat odd... The stacktrace further down shows like two traces... like it happened twice... both 'threads' originating from the programs main method... I have inserted comments to the stacktrace to emphasize what I mean:

Log:

SharpDX.SharpDXException: HRESULT: [0x887A0005], Module: [SharpDX.DXGI], ApiCode: [DXGI_ERROR_DEVICE_REMOVED/DeviceRemoved], Message: Unknown
   bei SharpDX.Result.CheckError()
   bei SharpDX.Direct3D11.DeviceContext.MapSubresource(Resource resourceRef, Int32 subresource, MapMode mapType, MapFlags mapFlags)
   bei SharpDX.Direct3D11.DeviceContext.MapSubresource(Texture2D resource, Int32 mipSlice, Int32 arraySlice, MapMode mode, MapFlags flags, DataStream& stream)
   bei SharpDX.Direct3D11.DeviceContext.MapSubresource(Resource resource, Int32 subresource, MapMode mode, MapFlags flags, DataStream& stream)
   bei Microsoft.Xna.Framework.Graphics.Texture2D.PlatformGetData[T](Int32 level, Int32 arraySlice, Rectangle rect, T[] data, Int32 startIndex, Int32 elementCount)
   bei Microsoft.Xna.Framework.Graphics.Texture2D.GetData[T](T[] data)
   bei Utilities.Utils.DrawFilledRectangle(GraphicsDevice graphicsDevice, Texture2D sourceTexture, Rectangle rectangle, Color color)
   bei Panels.ButtonPanel.Initialize()
   bei ScreenManagerLibrary.GameScreenBase.Initialize()
   bei ScreenManagerLibrary.ScreenManager.AddScreen(GameScreenBase screen)
   bei ScreenManagerLibrary.Screens.LoadingScreen.Update(GameTime gt, Boolean otherFocused, Boolean coveredByOtherScreen)
   bei ScreenManagerLibrary.ScreenManager.DoUpdates(GameTime gameTime, Boolean isDoScreenUpdateAndHandleInputs)
   bei ScreenManagerLibrary.ScreenManager.Update(GameTime gameTime)
   bei Microsoft.Xna.Framework.Game.<.cctor>b__19(IUpdateable updateable, GameTime gameTime)
   bei Microsoft.Xna.Framework.Game.SortingFilteringCollection`1.ForEachFilteredItem[TUserData](Action`2 action, TUserData userData)
   bei ThrobaxTD.TowerDefenseGame.Update(GameTime gameTime)
   bei Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
   bei Microsoft.Xna.Framework.Game.Tick()
   bei MonoGame.Framework.WinFormsGameWindow.RunLoop()
   bei MonoGame.Framework.WinFormsGamePlatform.RunLoop()
   bei Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   bei ThrobaxTD.Program.Main(String[] args)
// Seems to start over from here (re-starts with Main)
// Its the exact same stacktrace up to the exception itself...
   bei SharpDX.Result.CheckError()
   bei SharpDX.Direct3D11.DeviceContext.MapSubresource(Resource resourceRef, Int32 subresource, MapMode mapType, MapFlags mapFlags)
   bei SharpDX.Direct3D11.DeviceContext.MapSubresource(Texture2D resource, Int32 mipSlice, Int32 arraySlice, MapMode mode, MapFlags flags, DataStream& stream)
   bei SharpDX.Direct3D11.DeviceContext.MapSubresource(Resource resource, Int32 subresource, MapMode mode, MapFlags flags, DataStream& stream)
   bei Microsoft.Xna.Framework.Graphics.Texture2D.PlatformGetData[T](Int32 level, Int32 arraySlice, Rectangle rect, T[] data, Int32 startIndex, Int32 elementCount)
   bei Microsoft.Xna.Framework.Graphics.Texture2D.GetData[T](T[] data)
   bei Utilities.Utils.DrawFilledRectangle(GraphicsDevice graphicsDevice, Texture2D sourceTexture, Rectangle rectangle, Color color)
   bei Panels.ButtonPanel.Initialize()
   bei ScreenManagerLibrary.GameScreenBase.Initialize()
   bei ScreenManagerLibrary.ScreenManager.AddScreen(GameScreenBase screen)
   bei ScreenManagerLibrary.Screens.LoadingScreen.Update(GameTime gt, Boolean otherFocused, Boolean coveredByOtherScreen)
   bei ScreenManagerLibrary.ScreenManager.DoUpdates(GameTime gameTime, Boolean isDoScreenUpdateAndHandleInputs)
   bei ScreenManagerLibrary.ScreenManager.Update(GameTime gameTime)
   bei Microsoft.Xna.Framework.Game.<.cctor>b__19(IUpdateable updateable, GameTime gameTime)
   bei Microsoft.Xna.Framework.Game.SortingFilteringCollection`1.ForEachFilteredItem[TUserData](Action`2 action, TUserData userData)
   bei ThrobaxTD.TowerDefenseGame.Update(GameTime gameTime)
   bei Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
   bei Microsoft.Xna.Framework.Game.Tick()
   bei MonoGame.Framework.WinFormsGameWindow.RunLoop()
   bei MonoGame.Framework.WinFormsGamePlatform.RunLoop()
   bei Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   bei ThrobaxTD.Program.Main(String[] args)

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles