Qt Creator错误代码-1073741819 [英] Qt Creator error code -1073741819

查看:1212
本文介绍了Qt Creator错误代码-1073741819的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,Qt Creator也是如此,我尝试在Projects-> Applications-> Qt Gui Applications下创建最基本的应用程序.该项目已成功创建.此外,当我编译它时,它似乎可以正常工作.

Ok, so have Qt Creator and I tried creating just the most basic application, under Projects->Applications->Qt Gui Applications. The project was successfully created. Furthermore, when I compiled it, it appeared to work just fine.

11:07:38: Running steps for project Test1...
11:07:38: Configuration unchanged, skipping qmake step.
11:07:38: Starting: "C:\MinGW\bin\mingw32-make.exe" 
C:/MinGW/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/User/CProjects/Test1-build-Windows7Desktop-Debug'
mingw32-make[1]: Nothing to be done for 'first'.
mingw32-make[1]: Leaving directory 'C:/Users/User/CProjects/Test1-build-Windows7Desktop-Debug'
11:07:39: The process "C:\MinGW\bin\mingw32-make.exe" exited normally.

但是,当我尝试运行它时,我得到了:

However, when I attempt to run it, I get this:

Starting C:\Users\User\CProjects\Test1-build-Windows7Desktop-Debug\debug\Test1.exe...
The program has unexpectedly finished.
C:\Users\Hunter\User\Test1-build-Windows7Desktop-Debug\debug\Test1.exe exited with code -1073741819

每次.我开始一个新项目,不管做什么,但都会收到该错误.现在,我还以调试模式运行.我收到此错误:

Every time. I start a new project, I do whatever, but I get that error. Now, I have also run in debug mode. I get this error:

The inferior stopped because it received a signal from the Operating System.
Signal name: SIGSEGV
Signal meaning: Segmentation fault

在第132行处,有问题的文件为qatomici386.h,特定功能为QBasicAtomicInt::deref,其中指出:

The offending file is qatomici386.h at line 132, and the specific function is QBasicAtomicInt::deref which states:

inline bool QBasicAtomicInt::deref()
{
        unsigned char ret;
    asm volatile("lock\n"
                 "decl %0\n"
                 "setne %1"
                 : "=m" (_q_value), "=qm" (ret)
                 : "m" (_q_value)
    -->          : "memory");
    return ret != 0;
}

我有箭头1​​32行. 我正在运行64位计算机,但是我相信我安装了32位MinGW ...但是老实说,我什至不知道这是否是真正的问题,更不用说如何解决了.我是C ++和Qt的新手.

I have arrowed line 132. I am running a 64 bit machine, but I believe I installed a 32 bit MinGW... but honestly I don't even know if that is the real problem, let alone how to fix it if it is. I am very new to C++ and Qt.

根据要求,这是我的代码: mainwindow.cpp:

As requested, here is my code: mainwindow.cpp:

#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

main.cpp:

#include "mainwindow.h"
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}

Test1.pro:

Test1.pro:

#-------------------------------------------------
#
# Project created by QtCreator 2012-12-17T23:06:31
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Test1
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui

mainwindow.h

mainwindow.h

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H

如果需要其他任何东西,只需问问.

If anything else is needed, just ask.

这是完整的调试回溯记录:

Here is the complete debugging backtrace:

0   QBasicAtomicInt::deref  qatomic_i386.h  132 0x402774    
1   QString::~QString   qstring.h   880 0x402805    
2   WinMain@16  qtmain_win.cpp  93  0x401eab    
3   main            0x402e6b    

更新:我运行了示例toy clock,它运行良好.但是,当我运行calculator form时,它导致了完全相同的错误.我注意到calculator form处于正常项目形式:它具有.pro,以及Header,Sources和Forms文件夹.另一方面,toy clock仅具有.qmlproject文件和qml文件夹.它还在具有相同回溯的相同位置处失败.我实际上对这些事情都不了解,但是希望它将有助于找到解决方案.

Update: I ran the example toy clock, and it worked fine. However, when I ran the calculator form, it resulted in the exact same error. I notice that the calculator form is in the normal project form: it has a .pro, and Header, Sources, and Forms folders. The toy clock on the other hand just has a .qmlproject file and a qml folder. It also fails at the same location with the same backtrace. I don't actually know much about any of these things, but hopefully it will help find a solution.

推荐答案

在安装了整个环境之后,我遇到了同样的问题.

I've been having the same problem, after just installing this whole environment.

我一直在搜索,并且Qt bug跟踪器上似乎有一个bug,位于: https://bugreports.qt.io/browse/QTCREATORBUG-7653

I have been searching around, and there appears to be a bug on the Qt bug tracker at: https://bugreports.qt.io/browse/QTCREATORBUG-7653

从页面上:

有多个不兼容的mingw二进制版本.您需要为qt和程序使用相同的[1] mingw> version.这意味着要么使用那个> mingw版本自己编译qt,要么使用与编译二进制qt软件包所使用的版本相同的方式.(我不确定,但是可能比 [1]就ABI而言相同

[1] same in the sense of ABI

这篇关于Qt Creator错误代码-1073741819的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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