【问题标题】:XNA graphicsdevice.present crashes on "value does not fall within the expected range"XNA graphicsdevice.present 在“值不在预期范围内”崩溃
【发布时间】:2011-11-18 19:39:19
【问题描述】:

我有一个 XNA 应用程序,在某台笔记本电脑(戴尔、Win 7 64 位)上运行时会崩溃。
有时几分钟后崩溃,有时需要几个小时,但最终总是崩溃。
该应用程序是用XNA4.0 VS2010编写的
我必须向 AppDomain.CurrentDomain.UnhandledException 添加一个事件才能捕获此异常,
这是堆栈跟踪:

System.ArgumentException: Value does not fall within the expected range.
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Present(tagRECT* pSource, tagRECT* pDest, HWND__* hOverride)
   at Microsoft.Xna.Framework.GraphicsDeviceManager.Microsoft.Xna.Framework.IGraphicsDeviceManager.EndDraw()
   at Microsoft.Xna.Framework.Game.EndDraw()
   at Microsoft.Xna.Framework.Game.DrawFrame()
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
   at Microsoft.Xna.Framework.GameHost.OnIdle()
   at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
   at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
   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 Microsoft.Xna.Framework.WindowsGameHost.Run()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at Moof.Moof.Run()
   at Moof.Program.Main(String[] args)

有什么想法吗?
谢谢。

【问题讨论】:

标签: graphics error-handling xna


【解决方案1】:

尝试更新您的图形驱动程序,链接如下。

英特尔:http://downloadcenter.intel.com/

AMD/ATI:http://support.amd.com/us/gpudownload/Pages/index.aspx

英伟达:http://www.nvidia.com/Download/index.aspx?lang=en-us

【讨论】:

  • 这是我尝试的第一件事,它是 nVidia 卡,驱动程序是最新的。
猜你喜欢
  • 1970-01-01
  • 2011-08-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多