Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27

Thread: Reading from TCP Socket crashes program

  1. #21

    Default Re: Reading from TCP Socket crashes program

    and now it almost finishes compiling in debug mode... but MinGW comes up with some weird error I'm totally not responsible for:

    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot find -lqtmain

    But at least it still compiles in release mode. But it still crashes whenever the client trys to even do anything with the readyRead function.
    Last edited by OnionRingOfDoom; 27th January 2006 at 00:29.

  2. #22

    Default Re: Reading from TCP Socket crashes program

    Anyone else got any ideas?

  3. #23
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reading from TCP Socket crashes program

    Quote Originally Posted by OnionRingOfDoom
    but MinGW comes up with some weird error I'm totally not responsible for
    Did you compile Qt in debug mode? Do you have the libqtmain.a and libqtmaind.a files in %QTDIR%\lib directory?

    But it still crashes whenever the client trys to even do anything with the readyRead function.
    Does it crash with empty MainWindow::readSpeed()?

    Also add "CONFIG += console" to your .pro file and see whether your program outputs something to the console.

  4. #24

    Default Re: Reading from TCP Socket crashes program

    Quote Originally Posted by jacek
    Does it crash with empty MainWindow::readSpeed()?

    Also add "CONFIG += console" to your .pro file and see whether your program outputs something to the console.
    No, it does not crash when readSpeed() is empty.
    And no, it doesn't write anything to the console.

    I'm gonna try to reinstall Qt in debug mode this afternoon, after school

  5. #25
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reading from TCP Socket crashes program

    Quote Originally Posted by OnionRingOfDoom
    No, it does not crash when readSpeed() is empty.
    Could you post the line in which you initialize that label variable?

  6. #26

    Default Re: Reading from TCP Socket crashes program

    As for the label, it's initialized like so:

    Qt Code:
    1. QLabel *label = new QLabel("change");
    To copy to clipboard, switch view to plain text mode 

    ...............

    Wait a sec...... *checks the .h file*

    Oh....
    I initialised the label variable twice....
    **facepalms**
    problem solved....
    Last edited by OnionRingOfDoom; 27th January 2006 at 19:29.

  7. #27

    Default Re: Reading from TCP Socket crashes program

    Heh, thanks for your help through all this! I tend to have other people ask me some question and then I realise a stupid error I made...

Similar Threads

  1. wrong connection? program crashes altough it compiles
    By cbarmpar in forum Qt Programming
    Replies: 7
    Last Post: 30th September 2008, 12:48
  2. Socket Reading Advice
    By tntcoda in forum Qt Programming
    Replies: 3
    Last Post: 4th July 2008, 11:26
  3. Program crashes with assert error in xcb_lock.c
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2007, 19:56
  4. QWT 5, QT3, SuSE 10.2. Crash and burn
    By DrMcCleod in forum Qwt
    Replies: 8
    Last Post: 7th September 2007, 20:53
  5. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19

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
  •  
Qt is a trademark of The Qt Company.