VB Express调试执行不起作用. [英] VB Express Debug Execution does not work.

查看:72
本文介绍了VB Express调试执行不起作用.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到其他人也遇到了同样的问题,但是还没有找到解决方案.

I've seen that others are experiencing this same problem, but have yet to find a solution.

我有一个非常简单的应用程序.  这只是一个带有DirectX渲染的表单,其中显示了一个三角形和FPS.我已经在其他IDE中多次编写了相同的应用程序(对于DirectX来说是一个"hello world").  但是 在VB.NET应用程序的Visual Studio Express 2012中,我遇到了这个奇怪的错误:

I have an exceedingly simple application.  It's simply a form with a DirectX render showing a single triangle and the FPS.  I've written this same application a dozen times (sort of a "hello world" for DirectX) in other IDEs.  But in Visual Studio Express 2012 for VB.NET applications, I've run into this odd bug:

通常,当我按开始"按钮,或按F5键,则无效.  有时输出窗口什么也不显示,有时输出窗口显示:

USUALLY when I press the "Start" button, or press F5, it doesn't work.  Sometimes the output window shows nothing at all, at other times the output window shows:

----------构建开始:项目:GameTest,配置:调试任何CPU ------
  GameTest-> B:\ VB \ GameTest \ GameTest \ bin \ Debug \ GameTest.exe
===========构建:1成功,0失败,0最新,跳过0 ==========

------ Build started: Project: GameTest, Configuration: Debug Any CPU ------
  GameTest -> B:\VB\GameTest\GameTest\bin\Debug\GameTest.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

但是没有其他.  该应用程序无法运行.  但是,也许20次中的1次,该应用程序就可以正常运行了.  如果我从调试"更改了下拉菜单, 发布"它会每次启动一次,但当我使用时不会启动 调试模式.即使将断点放在应用程序的第一行,也表明根本没有执行任何操作.  该应用程序正在构建.EXE,但根本没有运行它.

But nothing further.  The application doesn't run.  But 1 out of maybe 20 times, the app will run just fine.  If I change the dropdown from "Debug" to "Release" it'll fire right up every single time, but not when I use debug mode.  Even putting a breakpoint on the very first line in the application shows that nothing gets executed at all.  The application is building the .EXE, but simply not running it.

最后,大约每100次执行一次,就会出现此错误:

Finally, once in about every 100 executions, I get this error:

--------------------------------------------------- -------------------------------------------------- ---

----------------------------------------------------------------------------------------------------

托管调试助手'LoaderLock'在'B:\ VB \ GameTest \ GameTest \ bin \ Debug \ GameTest.exe'中检测到问题.

附加信息:DLL'C:\ Windows \ assembly \ GAC \ Microsoft.DirectX.Direct3D \ 1.0.2902.0__31bf3856ad364e35 \ Microsoft.DirectX.Direct3D.dll'尝试在OS Loader锁内进行托管执行.不要尝试在DllMain或映像中运行托管代码 初始化函数,因为这样做会导致应用程序挂起.

Managed Debugging Assistant 'LoaderLock' has detected a problem in 'B:\VB\GameTest\GameTest\bin\Debug\GameTest.exe'.

Additional Information: DLL 'C:\Windows\assembly\GAC\Microsoft.DirectX.Direct3D\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.Direct3D.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.

--------------------------------------------------- -------------------------------------------------- ---

----------------------------------------------------------------------------------------------------

一旦出现此错误,每次尝试运行该应用程序时都会弹出该错误,直到我关闭IDE并重新打开它为止,此时它消失了,但是调试仍然无法可靠地运行,尽管发生错误后,应用程序将运行 我第一次尝试,但是之后没有.

Once this error pops up, it will pop up every single time I attempt to run the application until I shut down the IDE and reopen it, at which point it goes away, but the debug still won't run reliably, although after the error, the application will run the FIRST time I attempt it, but not afterwards.

我试图清洁"垃圾箱.构建,甚至进入工具菜单并重置IDE中的所有设置(尽管我没有做任何更改).  甚至完全重新安装了IDE也无法对其进行修复.

I've attempted to "clean" the build, and even go into the tools menu and reset all settings in the IDE (though I've not changed anything).  Even a full reinstallation of the IDE did nothing to fix it.

对于错误和缺乏执行力,绝对没有一致性,押韵或理由.  

There's absolutely no consistency, rhyme, or reason to the errors and lack of execution.  

-Javin

推荐答案

即使将断点放在应用程序的第一行,也表示根本没有执行任何操作."

您自己的Sub Main中的第一行是吗?如果没有,我会尝试.

Is the first line in your own Sub Main? If not, I'd try that.

此外,转到菜单Debug-> Exceptions.在MDA节点下,禁用"LoaderLock".

In addition, go to menu Debug->Exceptions. Under the MDA node, disable "LoaderLock".

只是尝试.


这篇关于VB Express调试执行不起作用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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