在IDE外部运行时程序崩溃 [英] Program crashes when run outside IDE

查看:147
本文介绍了在IDE外部运行时程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用一个在Windows XP中处理大量数据的C ++程序。我们最大的输入文件导致程序意外终止,没有任何错误消息。有趣的是,当程序从我们的IDE(Code :: Blocks)运行时,该文件被处理时没有任何这样的问题。

I'm currently working on a C++ program in Windows XP that processes large sets of data. Our largest input file causes the program to terminate unexpectedly with no sort of error message. Interestingly, when the program is run from our IDE (Code::Blocks), the file is processed without any such issues.

当数据被处理时,进入树结构。在我们完成计算之后,数据在被发送出来以在OpenGL中渲染之前被移入C ++ STL向量。

As the data is being processed, it's placed into a tree structure. After we finish our computations, the data is moved into a C++ STL vector before being sent off to be rendered in OpenGL.

我希望获得一些洞见,导致此崩溃。我已经签出了另一篇文章,我不能发布一个链接,因为我是一个新用户。该帖子中的问题与我的很相似,并且是由一个数组超出边界索引。但是,我确定没有发生这样的超出界限的错误。

I was hoping to gain some insight into what might be causing this crash. I've already checked out another post which I can't post a link to since I'm a new user. The issue in the post was quite similar to mine and resulted from an out of bounds index to an array. However, I'm quite sure no such out-of-bounds error is occurring.

我想知道,如果,或许,数据集的大小导致为向量分配空间时出现问题。我已经测试程序的系统理论上应该有足够的内存来处理数据(2GB的RAM,数据集占用大约1GB)。当然,如果内存服务,当它们的容量到达时,STL向量只是将它们的分配空间加倍。

I'm wondering if, perhaps, the size of the data set is leading to issues when allocating space for the vector. The systems I've been testing the program on should, in theory, have adequate memory to handle the data (2GB of RAM with the data set taking up approx. 1GB). Of course, if memory serves, the STL vectors simply double their allocated space when their capacity is reached.

谢谢,

推荐答案

结果是,我们的硬件达到了极限。该程序正在击中系统的内存限制,并失败凄惨。我们甚至不能看到生成的错误语句,直到我将cerr从命令行挂钩到一个文件(感谢starko)。感谢所有有用的建议!

As it turns out, our hardware is reaching its limit. The program was hitting the system's memory limit and failing miserably. We couldn't even see the error statements being produced until I hooked cerr into a file from the command line (thanks starko). Thanks for all the helpful suggestions!

这篇关于在IDE外部运行时程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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