代码在编译并通过调试器运行时崩溃,但在将解决方案编译为.exe时运行正常 [英] Code crashes when compiled and run through debugger, but runs fine when the solution is compiled into a .exe

查看:90
本文介绍了代码在编译并通过调试器运行时崩溃,但在将解决方案编译为.exe时运行正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xbox 360 Kinect和Kinect SDK Beta 2开发一个应用程序。出于某种原因,代码将通过他的Visual Studio运行得很好,但是当我通过Visual运行它时对我不起作用Studio,但是我能够运行SDK附带的捆绑的
Sample .exe fies。代码不断崩溃,并说有一个"AccessViolationException"那是未经处理的。有没有人有任何建议? 

I am developing an application using the Xbox 360 Kinect and the Kinect SDK Beta 2. For some reason, the code will run through his Visual Studio just fine, but will not work for me when I run it through Visual Studio, however I am able to run the bundled Sample .exe fies that come with the SDK. The code keeps crashing and saying that there was an "AccessViolationException" that was unhandled. Does anyone have any advice? 

提前致谢!




推荐答案

鉴于Kinect for Windows v2与Xbox 360 / Kinect for Window v1硬件/ SDK无法兼容,你的申请到底有没有?无论您是从Visual Studio调试应用程序还是运行预编译的
应用程序,它们都是.exe的。代码被编译成二进制文件。如果您没有正确使用应用程序中的api,如果您没有检查以确保您拥有数据,则可能会在代码中出现错误。

Given Kinect for Windows v2 has no compatibility to work with Xbox 360/Kinect for Window v1 hardware/SDK, what exactly does your application do? It doesn't matter whether you Debug an application from Visual Studio or run the pre-compiled application they are all .exe's. The code is compiled into a binary file. If you are not correctly using the api's in the application you can have errors in your code if you are not checking to ensure you have the data.

您可以通过使用获取v2的示例代码SDK浏览器并单击"安装"按钮按钮将代码的副本复制到计算机上的文件夹中。从那里,您可以在Visual Studio中加载解决方案文件并运行该应用程序。如果你需要一个
的手,我们已经在
http://aka.ms/k4wv2jumpstart <上提供了一套视频。 / a>

You can get sample code for v2 by using the SDK Browser and clicking the "Install" button to make a copy of the code to a folder on your computer. From there, you can load the solution file in Visual Studio and run that application. If you need a hand getting started we have provided a set a videos at http://aka.ms/k4wv2jumpstart


这篇关于代码在编译并通过调试器运行时崩溃,但在将解决方案编译为.exe时运行正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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