PDA

View Full Version : How can i debug the following ?



mmg123
16th October 2006, 14:14
Can any one tell me how to debug the following error: :confused:

http://mmgeg.jeeran.com/error.JPG

wysota
16th October 2006, 14:20
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.

Byngl
16th October 2006, 15:13
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-programming-2/t-qtreewidget-double-clicks-and-assertion-errors-3644.html

jpn
16th October 2006, 16:06
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.. :)

mmg123
22nd October 2006, 09:45
QtCored4.dll!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * buf=0x0012ce84) Line 1920 C++

jpn
22nd October 2006, 09:51
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.

mmg123
22nd October 2006, 13:29
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>::operator[](int i=1) Line 217 + 0x34 bytes C++
Q_ASSERT_X(i >= 0 && i < d->size, "QVector<T>::operator[]", "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();

jpn
22nd October 2006, 13:40
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?

mmg123
22nd October 2006, 15:59
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.

mmg123
22nd October 2006, 16:01
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.