PDA

View Full Version : Works well on Windows but fails on Linux



utkuaydin
10th January 2010, 14:52
Hello guys. I'm developing a Qt applicaton with a friend of mine. He can compile and run the app on his Windows. But when I try to debug it on Linux, the OS sends SIGABRT and Qt says:



&"warning: GDB: Failed to set controlling terminal: Invaild argument"
ASSERT: "!isEmpty()" in file /opt/qtsdk/qt/include/QtCore/qlist.h, line 267


and app fails. If I try to run, it says:



Starting /home/utku/project/project...
ASSERT: "!isEmpty()" in file /opt/qtsdk/qt/include/QtCore/qlist.h, line 267
The program has unexpectedly finished.
/home/utku/project/project exited with code 0


I'm using Qt 4.6 released with SDK 2009.05 not 4.5.3 in the path.

Sorry, I don't know which detail I should provide, please tell me about it.

tsp
10th January 2010, 15:17
Line 267 of qlist.h in my environment (Qt 4.5.3):

const T& last() const { Q_ASSERT(!isEmpty()); return *(--end()); }
Maybe you are calling QList::last to empty list?

utkuaydin
10th January 2010, 15:27
I've never used QList in my project and Line 267 of qlist.h is


inline void removeFirst() { Q_ASSERT(!isEmpty()); erase(begin());

It must be a problem with environment, not wtih the code I think.

utkuaydin
11th January 2010, 13:22
Sorry guys (especially tsp), my bad. I couldn't realized that QStringList is inherited from QList. :)