Results 1 to 4 of 4

Thread: Works well on Windows but fails on Linux

  1. #1
    Join Date
    Jan 2010
    Location
    Ankara, Turkey
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Question Works well on Windows but fails on Linux

    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:

    Qt Code:
    1. &"warning: GDB: Failed to set controlling terminal: Invaild argument"
    2. ASSERT: "!isEmpty()" in file /opt/qtsdk/qt/include/QtCore/qlist.h, line 267
    To copy to clipboard, switch view to plain text mode 

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

    Qt Code:
    1. Starting /home/utku/project/project...
    2. ASSERT: "!isEmpty()" in file /opt/qtsdk/qt/include/QtCore/qlist.h, line 267
    3. The program has unexpectedly finished.
    4. /home/utku/project/project exited with code 0
    To copy to clipboard, switch view to plain text mode 

    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.

  2. #2
    Join Date
    Sep 2009
    Location
    Finland
    Posts
    63
    Thanks
    1
    Thanked 22 Times in 19 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Works well on Windows but fails on Linux

    Line 267 of qlist.h in my environment (Qt 4.5.3):
    Qt Code:
    1. const T& last() const { Q_ASSERT(!isEmpty()); return *(--end()); }
    To copy to clipboard, switch view to plain text mode 
    Maybe you are calling QList::last to empty list?

  3. The following user says thank you to tsp for this useful post:

    utkuaydin (11th January 2010)

  4. #3
    Join Date
    Jan 2010
    Location
    Ankara, Turkey
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Works well on Windows but fails on Linux

    I've never used QList in my project and Line 267 of qlist.h is

    Qt Code:
    1. inline void removeFirst() { Q_ASSERT(!isEmpty()); erase(begin());
    To copy to clipboard, switch view to plain text mode 

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

  5. #4
    Join Date
    Jan 2010
    Location
    Ankara, Turkey
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Works well on Windows but fails on Linux

    Sorry guys (especially tsp), my bad. I couldn't realized that QStringList is inherited from QList.
    A fan of Qt since November 2009.

Similar Threads

  1. Replies: 1
    Last Post: 4th November 2009, 23:14
  2. QPalette works differently on windows and linux
    By babu198649 in forum Newbie
    Replies: 3
    Last Post: 6th March 2008, 08:27
  3. Project won't compile under Windows (works under Linux)
    By philski in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2006, 16:29
  4. Qt 4 commercial with Visual C++ 2005 Express Edition: Works half, debug fails
    By axeljaeger in forum Installation and Deployment
    Replies: 4
    Last Post: 5th July 2006, 06:38
  5. gcc (linux) : ok ; g++ (windows) : fails
    By nouknouk in forum Qt Programming
    Replies: 1
    Last Post: 25th February 2006, 04:08

Tags for this Thread

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.