退出程序时抛出异常(Ogre3d)

发布于 2024-09-07 12:23:58 字数 1678 浏览 4 评论 0原文

当我退出程序时,我遇到了一个奇怪的异常。这件事从今天早上就开始了,我已经准备好拔头发了。当我退出程序时,Visual Studio 就会抛出异常并停止在文件 crt0dat.c 中的第 731 行(请参阅随附的屏幕截图),

我知道这没什么可继续的。我尝试了几种不同的方法:

  1. un 不执行任何操作的程序,即根本不初始化 Ogre Core。不会导致崩溃
  2. 运行程序,除了创建Ogre root(与Ogre本身相关,与我的代码无关)之外的所有内容都被注释掉,会导致相同的崩溃
  3. 运行以下程序,这是最基本的,仍然会导致崩溃。 当我的程序运行完成时,崩溃发生在 return 0 之后
#include "windows.h"

#include "OgreRoot.h"

/// --------------------------------------------

INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
{

    Ogre::Root* lRoot = new Ogre::Root();

    delete lRoot;
    lRoot = NULL;

    return 0;
}

/// --------------------------------------------

由于我在 SVN 上拥有所有内容,因此我在我的笔记本电脑上运行了相同的项目,它运行没有任何问题,并且退出也没有任何问题。这让我相信我的视觉工作室在某个地方被损坏了。我卸载了 Visual Studio,然后重新安装了它,但问题仍然存在(当 VS 安装时,它遍布我的系统。无法控制它。有谁知道完全破坏 Visual Studio 安装的万无一失的方法吗?)。我已经没有想法了,无法重新安装 Windows。我希望这里有人能提供帮助。

调用堆栈:

  048b0910() 
  ntdll.dll!775d9901()  
  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
  ntdll.dll!775edc30()  
  ntdll.dll!775edb7c()  
  kernel32.dll!76c67363()  
> msvcr90d.dll!__crtExitProcess(int status=0)  + 0x1b bytes C
  msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  + 0x1d1 bytes C
  msvcr90d.dll!exit(int code=0)  + 0x12 bytes C
  OgreFWGame.exe!__tmainCRTStartup()  + 0x2a2 bytes C
  OgreFWGame.exe!WinMainCRTStartup()  + 0xf bytes C
  kernel32.dll!76c63677()  
  ntdll.dll!775d9d42()  
  ntdll.dll!775d9d15()  

崩溃屏幕截图:
链接文本

I am getting a weird exception when I exit the program. This has started since today morning and I am ready to pull my hair out. As soon as I exit the program, visual studio gives an exception and stops at line 731 in the file crt0dat.c (see attached screenshot)

I know this is very little to go on. I have tried several different things:

  1. un the program without doing anything, that is, not initializing Ogre Core at all. Does not result in a crash
  2. Run the program with everything commented out except creating Ogre root (which is related to Ogre itself and has nothing to do with my code), results in the same crash
  3. Run the following program which is as basic as it gets, still results in the crash. The crash happens after return 0, when my program has finished running
#include "windows.h"

#include "OgreRoot.h"

/// --------------------------------------------

INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
{

    Ogre::Root* lRoot = new Ogre::Root();

    delete lRoot;
    lRoot = NULL;

    return 0;
}

/// --------------------------------------------

Since I have everything on the SVN, I ran the same project on my laptop and it worked without any problems, as well as exited without any problems. This led me to believe that somewhere along the line my visual studio got corrupted. I uninstalled Visual studio, then re-installed it, but the problem persists (When VS installs it goes all over my system. No way to contain it. Does anyone know a surefire way to completely destroy Visual Studio installation?). I am running out of ideas, short of re-installing windows. I hope someone here can be of help.

Callstack:

  048b0910() 
  ntdll.dll!775d9901()  
  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
  ntdll.dll!775edc30()  
  ntdll.dll!775edb7c()  
  kernel32.dll!76c67363()  
> msvcr90d.dll!__crtExitProcess(int status=0)  + 0x1b bytes C
  msvcr90d.dll!doexit(int code=0, int quick=0, int retcaller=0)  + 0x1d1 bytes C
  msvcr90d.dll!exit(int code=0)  + 0x12 bytes C
  OgreFWGame.exe!__tmainCRTStartup()  + 0x2a2 bytes C
  OgreFWGame.exe!WinMainCRTStartup()  + 0xf bytes C
  kernel32.dll!76c63677()  
  ntdll.dll!775d9d42()  
  ntdll.dll!775d9d15()  

Crash Screencapture:
link text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

小伙你站住 2024-09-14 12:23:59

我最近在 Visual Studio 2010 中设置了 ogre,但在复制正确的 DLL 之前它无法正常工作 - 我一直在 Visual studio 2008 中使用从稍旧版本的 ogre 编译的集合。听起来像是整个 ogre 编译或DLL 可能已通过 SVN 复制,这可能会导致奇怪的问题。

无论如何,希望它能有所帮助。

I recently set ogre up in Visual Studio 2010 and it refused to work right until I copied in the right DLLs - I had been using a set compiled from a slightly older version of ogre in Visual studio 2008. It sounds like the entire ogre compilation or the DLLs may have been copied over via the SVN which could cause strange problems.

Hope it helps, anyway.

一抹淡然 2024-09-14 12:23:58

这不是你应该如何初始化和使用 Ogre 的。最有可能的是缺少初始化工作导致了崩溃。

要开始使用 ogre,我强烈建议您遵循并学习教程

编辑:< /强>
可以在此处找到适用于 ogre 的 Visual Studio 项目模板:http://code.google.com /p/ogreappwizards/updates/list 快速入门。

That is not how you are supposed to initialize and use Ogre. Most likely the missing initialization work is what causing your crash.

To get started with ogre I highly recommend following and learning from the tutorials

Edit:
visual studio project templates for ogre can be found here: http://code.google.com/p/ogreappwizards/updates/list to get started quickly.

萌面超妹 2024-09-14 12:23:58

感谢大家对这个问题的帮助。我最终重新安装了 Windows(我尝试卸载 Visual Studio 并重新安装它,但是在卸载 VS 时出现问题 [我严格按照 Microsoft 的说明进行操作],并且它将拒绝再次安装 [安装程序会崩溃])。我希望他们能让卸载 Visual Studio 变得容易。

我浪费了大约三天的时间才决定重新安装Windows。我的建议是,如果您有另一台计算机可以继续完成您的工作,那么如果发生类似的情况,请执行相同的操作,而不是浪费时间。如果您确实找到解决问题的方法,请告诉我:)

Thanks for everybody's help on this problem. I ended up re-installing windows (I tried uninstalling Visual Studio and re-installing it, but something went wrong while uninstalling VS [I followed Microsoft's instructions to the letter] and it would refuse to install again [the setup would crash]). I wish they would make it easy to Uninstall Visual Studio.

I wasted about 3 days before I resorted to re-installing windows. My advice would be, if you have another computer to continue to do your work on, is to do the same if something like this happens rather than waste days. If you do find a way to fix the problem, please let me know :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文