Results 1 to 10 of 10

Thread: How can i debug the following ?

  1. #1
    Join Date
    Sep 2006
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default How can i debug the following ?

    Can any one tell me how to debug the following error:


  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: How can i debug the following ?

    You are trying to access a non-existant item in some vector. Hard to say exactly where without seeing the stack trace. I suggest you make one and post it here.

  3. #3
    Join Date
    Mar 2006
    Posts
    26
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: How can i debug the following ?

    It would also be helpful to know what (if anything) you did just before the error occurred. This looks very similar to the message I was getting if I deleted the last entry in a QTreeWidget on a double-click.
    http://www.qtcentre.org/forum/f-qt-p...rors-3644.html

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How can i debug the following ?

    Press Retry, select something like Debug->Windows->Call Stack and you'll see exactly where it crashes. If you have problems interpreting the call stack, you're welcome to paste it here as wysota already suggested..
    J-P Nurmi

  5. #5
    Join Date
    Sep 2006
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can i debug the following ?

    QtCored4.dll!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * buf=0x0012ce84) Line 1920 C++

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How can i debug the following ?

    That's just some call caused by the Q_ASSERT macro and I assume that's the last call in the stack. But could you paste all lines shown in the call stack? The important line is the last call in your own code. You can double click the call stack lines to go exactly where each call occurs.
    J-P Nurmi

  7. #7
    Join Date
    Sep 2006
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can i debug the following ?

    note that, this error dosnt appear when i debug the same application in anouther machine
    here is each line in the stack followed by the specified line of code(blue font):


    QtCored4.dll!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * buf=0x0012ce84) Line 1920 C++
    _CrtDbgBreak();

    QtCored4.dll!qFatal(const char * msg=0x67156800, ...) Line 2140 + 0xe bytes C++
    qt_message_output(QtFatalMsg, buf);

    QtCored4.dll!qt_assert_x(const char * where=0x654ad1c4, const char * what=0x654abf2c, const char * file=0x654ad1e0, int line=217) Line 1697 + 0x1a bytes C++
    qFatal("ASSERT failure in %s: \"%s\", file %s, line %d", where, what, file, line);

    QtGuid4.dll!QVector<QLayoutStruct>:perator[](int i=1) Line 217 + 0x34 bytes C++
    Q_ASSERT_X(i >= 0 && i < d->size, "QVector<T>:perator[]", "index out of range");

    QtGuid4.dll!QBoxLayoutPrivate::setupGeom() Line 182 + 0x17 bytes C++
    a[i].sizeHint = hint.width();

    QtGuid4.dll!QBoxLayout::setGeometry(const QRect & r={...}) Line 593 C++
    QRect cr = alignment() ? alignmentRect(r) : r;

    QtGuid4.dll!QLayoutPrivate::doResize(const QSize & r={...}) Line 469 C++
    if (menubar)
    menubar->setGeometry(0,0,r.width(), mbh);

    QtGuid4.dll!QLayout::activate() Line 1008 C++
    if (md->extra)
    md->extra->explicitMinSize = explMin;

    SmartTrade.exe!main(int argc=1, char * * argv=0x00ba7678) Line 73 + 0x6 bytes C++
    return a.exec();

    SmartTrade.exe!WinMain(HINSTANCE__ * instance=0x00400000, HINSTANCE__ * prevInstance=0x00000000, char * __formal=0x00151f16, int cmdShow=1) Line 103 + 0x12 bytes C++
    int result = main(argc, argv.data());

    SmartTrade.exe!__tmainCRTStartup() Line 578 + 0x35 bytes C
    (HINSTANCE)&__ImageBase,
    NULL,
    lpszCommandLine,
    StartupInfo.dwFlags & STARTF_USESHOWWINDOW
    ? StartupInfo.wShowWindow
    : SW_SHOWDEFAULT
    );

    SmartTrade.exe!WinMainCRTStartup() Line 403 C
    return __tmainCRTStartup();

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How can i debug the following ?

    Quote Originally Posted by mmg123 View Post
    note that, this error dosnt appear when i debug the same application in anouther machine
    Does that another machine have a newer version of Qt? I just noticed from the error message that you are using Qt 4.1.1 so maybe it's a bug in 4.1.1?
    J-P Nurmi

  9. #9
    Join Date
    Sep 2006
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can i debug the following ?

    Actually no, i get this message from the new Version 4.2 then i tryied to uninstall it and install the older one Version 4.1 but i get the same error.

  10. #10
    Join Date
    Sep 2006
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Wink Re: How can i debug the following ?

    But somthing strange happen when i gust install the ver. 4.1, the application run with no error 2 times then start show me the error again.

Similar Threads

  1. qmake and debug output
    By mattie in forum Qt Programming
    Replies: 7
    Last Post: 18th September 2006, 22:33
  2. Problem with Debug mode in KDevelop
    By zlatko in forum KDE Forum
    Replies: 1
    Last Post: 16th June 2006, 09:10
  3. Unable to execute in Debug Mode
    By Kapil in forum Installation and Deployment
    Replies: 38
    Last Post: 5th April 2006, 07:27
  4. Replies: 11
    Last Post: 22nd March 2006, 19:06
  5. qt debug
    By tikismikis in forum Qt Programming
    Replies: 4
    Last Post: 13th March 2006, 11:59

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.