Results 1 to 3 of 3

Thread: Imediate Program Crash

  1. #1
    Join Date
    Nov 2016
    Location
    Ridgecrest California
    Posts
    33
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Windows Android

    Default Imediate Program Crash

    I hope this is the correct forum for this subject. I believe that this is probably an installation problem.
    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
    _____________________________________________
    Main.cpp
    Qt Code:
    1. #include"hellwindow.h"
    2. #include<QApplication>
    3.  
    4. intmain(intargc,char*argv[])
    5. {
    6. QApplication a(argc,argv);
    7.  
    8. HellWindow w;
    9. w.show();
    10. return a.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 
    _____________________________________________
    Hellwindow.h

    Qt Code:
    1. #ifndefHELLWINDOW_H
    2. #defineHELLWINDOW_H
    3.  
    4. #include<QMainWindow>
    5. #include<QStandardItem>
    6.  
    7. namespaceUi {
    8. classHellWindow;
    9. }
    10.  
    11. classHellWindow:publicQMainWindow
    12. {
    13. Q_OBJECT
    14.  
    15. public:
    16. explicitHellWindow(QWidget*parent=0);
    17. ~HellWindow();
    18.  
    19. privateslots:
    20. voidon_hellBtn_clicked();
    21.  
    22. private:
    23. Ui::HellWindow*ui;
    24. };
    25. #endif//HELLWINDOW_H
    To copy to clipboard, switch view to plain text mode 
    _____________________________________________
    hellwindow.cpp

    Qt Code:
    1. #include"hellwindow.h"
    2. #include"ui_hellwindow.h"
    3.  
    4. HellWindow::HellWindow(QWidget*parent) :
    5. QMainWindow(parent), ui(newUi::HellWindow)
    6. {
    7. ui->setupUi(this);
    8. }
    9.  
    10. HellWindow::~HellWindow()
    11. {
    12. deleteui;
    13. }
    14.  
    15. voidHellWindow::on_hellBtn_clicked()
    16. {
    17. ui->hellViewWidget->addItem("GoToHell");
    18. }
    To copy to clipboard, switch view to plain text mode 
    _____________________________________________
    WhatTheHell.pro
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. #ProjectcreatedbyQtCreator####-##-#####:##:##
    4. #
    5. #-------------------------------------------------
    6. QT += coregui
    7. greaterThan(QT_MAJOR_VERSION, 4) : QT += widgets
    8. TARGET = WhatTheHell
    9. TEMPLATE = app
    10. SOURCES += main.cpp\
    11. hellwindow.cpp
    12. HEADERS += hellwindow.h
    13. FORMS += hellwindow.ui
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Imediate Program Crash

    ui->hellViewWidget->addItem("GoToHell");
    I guess the Qt runtime finds your program to be offensive.

    My other guess is that you don't have the Qt 5 and/or mingw DLLs in your system path so the runtime isn't finding them at startup.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Nov 2016
    Location
    Ridgecrest California
    Posts
    33
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Windows Android

    Default Re: Imediate Program Crash

    Thank you d_stranz for your reply.

    Your correct, perhaps the code may be offensive to some. So I burned some candles and performed some chants and deeply apologized to the Qt run-time.

    Actually I have since uninstalled all Qt items and reinstalled an older version (4.8.3) and I'm giving that a go. However as soon as I get past this little time critical issue, I'm planning on attempting another try at 5.7 and I will ensure that the Qt 5 and MinGW DLL's are in my system path.

    Thanks again for your assistance, I truly appreciate it.

Similar Threads

  1. Program crash with QwtPlotCurve
    By Julieng031 in forum Qwt
    Replies: 0
    Last Post: 26th August 2013, 21:53
  2. Qt 5 new a QThread crash the program
    By KKyang in forum Qt Programming
    Replies: 0
    Last Post: 3rd July 2013, 05:03
  3. program crash on signalMapping QList
    By wagmare in forum Qt Programming
    Replies: 4
    Last Post: 22nd July 2009, 16:23
  4. Program Crash
    By jonmatteo in forum Qt Programming
    Replies: 5
    Last Post: 17th June 2009, 14:47
  5. Program crash
    By Pragya in forum Qt Programming
    Replies: 7
    Last Post: 29th June 2007, 07:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.