You are not logged in.

BikerCorny

Beginner

  • "BikerCorny" is male
  • "BikerCorny" started this thread

Posts: 1

Location: Ridgecrest California

Occupation: Project Analyst

  • Send private message

1

Monday, November 14th 2016, 7:44pm

Unexpected finish

I recently upgraded to 5.7.0 from Qt 4.7.4 and I was having some problems. I did not remove 4.7.4 prior to installing 5.7 so I thought that might be causing the problem. I uninstalled both versions and then re-installed version 5.7. This is the environment I'm now attempting to run in...

OS: Windows 7 – Service Pack 1
System: 64 bit Operating System
IDE: Qt Creator 4.1.0
Qt Version: Qt 5.7.0
Compiler: MinGW 5.3.0 32 bit
nMake: Using jom instead of nMake

I attempted to build a quick bare-bones program from Qt Creator to test the install. It built just fine but when I went to run it, or run a debug version, the program would crash immediately. In debug I set several breakpoints, including the first line and execution wasn't even reaching the first line of code. Running several of the provided example programs gave the same result.

I have searched the internet extensively and have not found a solution, or any one else experiencing a similar problem.

Thank you in advance if anyone can provide some insight on this problem.

Following are the details along with the bare-bones code that I first experienced the problem with.

Debugger

0x401a8055push%ebp
0x401a81<+0x0001> b920584000mov$0x405820,%ecx
0x401a86<+0x0006> 89e5mov %esp,%ebp
0x401a88<+0x0008> eb14jmp 0x401a9e<_pei386_runtime_relocator+30>
0x401a8a<+0x000a> 8db600000000lea0x0(%esi),%esi
0x401a90<+0x0010> 8b5104mov0x4(%ecx),%edx
0x401a93<+0x0013> 8b01mov (%ecx),%eax
0x401a95<+0x0015> 83c108add$0x8,%ecx
0x401a98 <+0x0018> 01 82 00 00 40 00 add %eax,0x400000(%edx)
0x401a9e<+0x001e> 81f968584000cmp$0x405868,%ecx
0x401aa4<+0x0024> 72eajb0x401a90<_pei386_runtime_relocator+16>
0x401aa6<+0x0026> 5dpop%ebp
0x401aa7<+0x0027> c3ret
0x401aa8<+0x0028> 90nop
0x401aa9<+0x0029> 90nop
0x401aaa<+0x002a> 90nop
0x401aab<+0x002b> 90nop
0x401aac<+0x002c> 90nop
0x401aad<+0x002d> 90nop
0x401aae<+0x002e> 90nop
0x401aaf <+0x002f> 90 nop

Compile Output:
08:06:24: Running steps for project WhatTheHell...
08:06:24: Configuration unchanged, skipping qmake step.
08:06:24: Starting: "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe"
C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/..path…/build-WhatTheHell-Desktop_Qt_5_7_0_MinGW_32bit-Debug'
mingw32-make[1]: Nothing to be done for 'first'.
mingw32-make[1]: Leaving directory 'C:/…path…/build-WhatTheHell-Desktop_Qt_5_7_0_MinGW_32bit-Debug'
08:06:24: The process "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
08:06:24: Elapsed time: 00:01.

Stack:

1 _pei386_runtime_relocator 0x4018d4
2 __mingw_CRTStartup 0x401212
3 WinMainCRTStartup 0x4012a8

Application Output:

Starting C:\...path…\debug\WhatTheHell.exe...
C:\...path…\WhatTheHell.exe exited with code 255
_____________________________________________
Code
Main.cpp

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

intmain(intargc,char*argv[])
{
QApplication a(argc,argv);

HellWindow w;
w.show();
return a.exec();
}
_____________________________________________
Hellwindow.h
#ifndefHELLWINDOW_H
#defineHELLWINDOW_H

#include<QMainWindow>
#include<QStandardItem>

namespaceUi {
classHellWindow;
}
_____________________________________________
classHellWindow:publicQMainWindow
{
Q_OBJECT

public:
explicitHellWindow(QWidget*parent=0);
~HellWindow();

privateslots:
voidon_hellBtn_clicked();

private:
Ui::HellWindow*ui;
};
#endif//HELLWINDOW_H
_____________________________________________
hellwindow.cpp
#include"hellwindow.h"
#include"ui_hellwindow.h"

HellWindow::HellWindow(QWidget*parent) :
QMainWindow(parent), ui(newUi::HellWindow)
{
ui->setupUi(this);
}

HellWindow::~HellWindow()
{
deleteui;
}

voidHellWindow::on_hellBtn_clicked()
{
ui->hellViewWidget->addItem("GoToHell");
}
_____________________________________________
WhatTheHell.pro
#-------------------------------------------------
#
#ProjectcreatedbyQtCreator####-##-#####:##:##
#
#-------------------------------------------------
QT += coregui
greaterThan(QT_MAJOR_VERSION, 4) : QT += widgets
TARGET = WhatTheHell
TEMPLATE = app
SOURCES += main.cpp\
hellwindow.cpp
HEADERS += hellwindow.h
FORMS += hellwindow.ui

2

Wednesday, November 16th 2016, 3:02pm

Helo.

Quoted


Compiler: MinGW 5.3.0 32 bit
Thats not the compiler, go to Tools/options/Build & Run, just high light "MinGW 5.3.0 32".
Should show something like "C:\Qt\Tools\mingw530_32\bin\g++.exe" in the drop down box, g++ is the compiler.

Do you have something against spaces?

#include"hellwindow.h" should be #include "hellwindow.h"
intmain(intargc,char*argv[]) should be int main(int argc, char *argv[]).
explicitHellWindow(QWidget*parent=0); should be explicit HellWindow(QWidget*parent=0);
Similar errors in lots of places.

I can't even compile with intmain(intargc,char*argv[]), throws an error, I don't know how you managed to.
I didn't check for other errors.

Regards

This post has been edited 1 times, last edit by "mad-hatter" (Nov 16th 2016, 3:14pm)