因为触发了异常,所以下限停止。在线程0中被异常停止? [英] The inferior stopped because it triggered an exception. Stopped in thread 0 by Exception...?

查看:4562
本文介绍了因为触发了异常,所以下限停止。在线程0中被异常停止?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调试器中完成错误消息:

Complete Error Message in Debugger:

由于触发了异常,下限停止,由线程0中的异常
0xfbdeba,代码:0xc0000005:0x0读取访问冲突,flags = 0x0

我可以编译我的代码没有任何错误,但是当我运行它或调试,当我使用QMessagebox显示一条消息时,如果我注释掉这个消息程序正常运行,则会崩溃,

I can compile my code without any error, but when I run it or debug, It crashes,

我尝试将QMessagebox放在main.cpp中,只是在初始化QApplication之后存在相同的错误。

this error thrown when I used A QMessagebox to show a message, if I comment out this message program runs normally. I try to place QMessagebox in main.cpp just after Initializing of the QApplication the same error exist.

我不明白这个错误的原因是什么?

I can't understand what is the reason for this error???

请指导我。
我使用了具有msvc 2010编译器的 QT 4.8.1。

我试图做什么:我尝试改变一个开放源应用程序名为Open-sankore(源代码 here .. ),并尝试检查用户是否填写了注册表?如果没有向用户显示一个消息框。

And what I try to do: I try to change an open source application named Open-sankore (source-code here... ) and try to check that if user completed the registration form? if not show a messagebox to user.

我将代码部分添加到UBApplication :: exec(..)的第一行。

I add a code part to UBApplication::exec(..)'s first line.

int UBApplication::exec(const QString& pFileToImport)
{

if(CheckLock() == -1)
{
   QMessageBox myBox;
   myBox.setText("Please Complete The Registration form to continue!");
   myBox.setWindowTitle("Warning!");
   myBox.exec();
}

发生错误后,调试cursur进入UBBoardController.h并在



After the error occurs debug cursur goes to UBBoardController.h and function below

UBBoardView* controlView()
    {
        **return mControlView;**
    }


推荐答案

我发现这个错误大多发生在尝试使用变量未启动。

I found that this error mostly happen when try using a variable that is not initiated.

这篇关于因为触发了异常,所以下限停止。在线程0中被异常停止?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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