SlimDX Device.Reset崩溃了" D3DERR_INVALIDCALL:无效的调用(-2005530516)"错误 [英] SlimDX Device.Reset crashes with a "D3DERR_INVALIDCALL: Invalid call (-2005530516)" error

查看:2746
本文介绍了SlimDX Device.Reset崩溃了" D3DERR_INVALIDCALL:无效的调用(-2005530516)"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近从升级VS 2005 VS 2008 (Windows XP中)。我们使用 SlimDx 在我们的项目之一。所有正在确定在升级之后,除了我的恢复函数,它被调用的devicelost /设备复位它与

We recently upgraded from VS 2005 to VS 2008 (Windows XP). We use SlimDx in one of our projects. All was working ok after the upgrade, except my Recover function, which gets called on devicelost/device reset which crashes with

D3DERR_INVALIDCALL:无效的调用(-2005530516)

D3DERR_INVALIDCALL: Invalid call (-2005530516)

我用<大骨节病>控制 - <大骨节病>替代 - <大骨节病>删除,然后<大骨节病>逃生模拟设备丢失

I use Ctrl-Alt-Del and then Escape to simulate device lost.

void Recover()
{
  try
     {
         if (res.Code == D3DERR_DEVICENOTRESET)
         { 
           res = m_device.Reset(m_presentParams); //Crashes on this.
           if (res.IsSuccess)
           {
             m_deviceLost = false; 
            }
          }
     }
   catch(Exception e)
   {}
 }

这是与 VS 2008 ,因为它曾经与很好地工作,VS 2005

推荐答案

我发现的这个论坛帖子。需要注意的是论坛与VB的问题,但是这仍然是好消息。全部信贷西蒙·奥康纳

I found some helpful information in this forum post. Note the question on that forum related to VB but this is still good info. Full credit to Simon O'Connor.

格式化,略有修改。

INVALIDCALL通常意味着要么你已经传递到D3D参数是无效的,或者你所要求的操作是不可能的。

INVALIDCALL usually means that either a parameter you've passed to D3D is invalid or an operation you've requested isn't possible.

最简单的方法来找出为什么返回D3D调用的INVALIDCALL错误是让它告诉你:

The easiest way to find out why a D3D call returned an INVALIDCALL error is to let it tell you:

      
  1. 确保您使用的是D3D运行时的调试版本安装(如果你安装了SDK,你给予的选择)。
  2.   
  3. 确保了运行时的调试版本启用。进入了DirectX小程序在控制面板中,并期待Direct3D的标签下。
  4.   
  5. 虽然在DirectX控制面板小程序,增加至最大调试输出级别的Direct3D。   我没有用Visual Basic,为超过10年,所以我已经忘了调试支持是我不把它安装在本机上检查...如果VB确实有一个调试输出窗口:
  6.   
  7. 运行程序,让它与INVALIDCALL错误而失败。
  8.   
  9. 现在,看看你的调试输出窗口中的所有文本。 D3D将记录信息,警告和重要的误差来表示。它还会解释为什么一个D3D调用失败。
  10.   
  1. Make sure you're using the DEBUG version of the D3D runtime is installed (you were given the option when you installed the SDK).
  2. Make sure that the DEBUG version of the runtime is enabled. Go to the DirectX applet in the Control Panel and look under the Direct3D tab.
  3. Whilst in the DirectX control panel applet, increase the debug output level for Direct3D to maximum. I've not used Visual BASIC for over 10 years so I've forgotten what debugging support is available and I don't have it installed on this machine to check... If VB DOES have a debug output window:
  4. Run your program and let it fail with the INVALIDCALL error.
  5. Now look at all the text in your debug output window. D3D will log information, warnings, and importantly errors to that. It'll also explain the reason WHY a D3D call has failed.

如果VB不具有简单的调试输出窗口,下载和 http://www.sysinternals.com 运行的DebugView或使用自带的DirectX SDK中的命令行调试观众

If VB doesn't have a simple debug output window, download and run DebugView from http://www.sysinternals.com or use the command line debug viewer that comes with the DirectX SDK

这篇关于SlimDX Device.Reset崩溃了&QUOT; D3DERR_INVALIDCALL:无效的调用(-2005530516)&QUOT;错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆