Results 1 to 12 of 12

Thread: Debug QT4 Gui Application

  1. #1
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Debug QT4 Gui Application

    Hi, i created an empty project (it only has a mainwindow invoqued on main.cpp) but i'm not able to debug it, the code of the main.cpp looks like this:
    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3. QApplication a(argc, argv);
    4. MainWindow w;
    5. w.show();
    6. return a.exec();
    7. }
    To copy to clipboard, switch view to plain text mode 

    But it stops at the QApplication a(argc, argv); line.

    And the message: Stopped: "signal-received"

    But when i decide to build a release and run it, it works without any problem

    Can any one help me?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Debug QT4 Gui Application

    What stops? What signal is received?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug QT4 Gui Application

    it doesnt say anything else, i leave here an screenshot of what happens

    http://www.megaupload.com/?d=Q3RM3RM6

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Debug QT4 Gui Application

    Sorry I can't download the file. Attach the screenshot to your post instead of using 3rd party sites for linking images.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug QT4 Gui Application


  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Debug QT4 Gui Application

    You have set a breakpoint on the line so it stops there. Isn't it what you expected?

    By the way, next time please at least provide info that you are debugging using Qt Creator on Windows.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug QT4 Gui Application

    Yes, i setted the breakpoint there to make sure it stopped on that line.... is when i step over that function when the debbug ends...

    any idea?

    QT Creator 1.2.1 and QT 4.5.3 on Windows XP SP3

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Debug QT4 Gui Application

    What happens if you don't put that breakpoint there?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug QT4 Gui Application

    same message, but i wouldent be able to know where is stopping

    i'm sure there has to be something wrong with the configuration because the program i'm trying to compile its clean, and made up by QT Creator....

    I checked Tools->Options and i haddnt installed the Cdb, i did it, and now i get a diferent message.... "Debugging helpers not found" (not bad)

    I went to Debugging helper tab and i have this path:
    C:\Qt\lib\qtcreator\DebuggingHelper.dll

    For GDB:
    C:\Qt\mingw\bin\gdb.exe

    And CDB:
    C:\Archivos de programa\Debugging Tools For Windows (x86)

    Finally i went to QT Versions and i rebuilt the debugging helper (or that is what i beleave):



    I'm sure it has something to do with this stuff......
    Last edited by cae; 22nd November 2009 at 12:30.

  10. #10
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug QT4 Gui Application

    This is the log after rebuilding Debugging helper:
    Qt Code:
    1. Building debugging helper library in C:/Qt/qt/qtc-debugging-helper/
    2.  
    3. Running C:/Qt/mingw/bin/mingw32-make.exe clean...
    4. C:/Qt/mingw/bin/mingw32-make -f Makefile.Debug clean
    5. mingw32-make[1]: Entering directory `C:/Qt/qt/qtc-debugging-helper'
    6. rm debug/gdbmacros.o
    7. rm debug/libgdbmacros.a
    8. mingw32-make[1]: Leaving directory `C:/Qt/qt/qtc-debugging-helper'
    9. C:/Qt/mingw/bin/mingw32-make -f Makefile.Release clean
    10. mingw32-make[1]: Entering directory `C:/Qt/qt/qtc-debugging-helper'
    11. rm release/gdbmacros.o
    12. rm: cannot remove `release/gdbmacros.o': No such file or directory
    13. mingw32-make[1]: [clean] Error 1 (ignored)
    14. rm release/libgdbmacros.a
    15. rm: cannot remove `release/libgdbmacros.a': No such file or directory
    16. mingw32-make[1]: [clean] Error 1 (ignored)
    17. mingw32-make[1]: Leaving directory `C:/Qt/qt/qtc-debugging-helper'
    18. rm libgdbmacros.a
    19. rm: cannot remove `libgdbmacros.a': No such file or directory
    20. mingw32-make: [clean] Error 1 (ignored)
    21.  
    22. Running C:/Qt/qt/bin/qmake.exe ...
    23.  
    24. Running C:/Qt/mingw/bin/mingw32-make.exe ...
    25. C:/Qt/mingw/bin/mingw32-make -f Makefile.Debug
    26. mingw32-make[1]: Entering directory `C:/Qt/qt/qtc-debugging-helper'
    27. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DUSE_QT_GUI=0 -DHAS_QOBJECT_P_H -DQT_DLL -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I'../include/QtCore' -I'../include' -I'../include/ActiveQt' -I'debug' -I'../mkspecs/win32-g++' -o debug/gdbmacros.o gdbmacros.cpp
    28. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -shared -mthreads -Wl -Wl,--out-implib,debug/libgdbmacros.a -o debug/gdbmacros.dll debug/gdbmacros.o -L'c:/Qt/qt/lib' -lQtCored4
    29. Creating library file: debug/libgdbmacros.a
    30. mingw32-make[1]: Leaving directory `C:/Qt/qt/qtc-debugging-helper'
    To copy to clipboard, switch view to plain text mode 

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Debug QT4 Gui Application

    What if you run your application without debugging? Does it run ok or does it crash?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #12
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug QT4 Gui Application

    It runs perfectly

    I'm going crazy

    Can anyone with windows compare my configuration with the one he has?

Similar Threads

  1. Application does not exist when I debug
    By learning_qt in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 23rd September 2008, 16:26
  2. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  3. qt4 application debug
    By tsemer in forum Qt Programming
    Replies: 5
    Last Post: 9th November 2007, 17:58
  4. Deploying debug Qt application - failed to load ODBC driver
    By sureshbabu in forum Installation and Deployment
    Replies: 1
    Last Post: 1st November 2007, 12:35
  5. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18: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.