Results 1 to 20 of 50

Thread: Program crashes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Program crashes

    Quote Originally Posted by Fallen_ View Post
    because ur asking too many weird questions...
    I'm not asking weird questions. I just have to practically extract each piece of answer out of you because you are not eagar to surrender any information willingly.

    Let's go back to the beginning...

    Please modify your methods so that they contain the following pieces of code:

    Qt Code:
    1. Channel::printText(const QString& text) {
    2. qDebug() << Q_FUNC_INFO << text;
    3. read->append(text);
    4. }
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. void MainWindow::appendToWindow() {
    2. // ...
    3.  
    4. Channel* chan = new Channel(0, QString::fromStdString(channel), 0);
    5. chan->printText(QString::fromLatin1(tmp));
    6. qDebug() << Q_FUNC_INFO << tmp << QString::fromLocal8Bit(tmp);
    7. read->append(tmp);
    8.  
    9. // ...
    10. }
    To copy to clipboard, switch view to plain text mode 

    Please show us the output and the relevant pieces of sourcecode after the changes.

    Also, if you are using Qt Creator, please right click on your "read" variable from the "Channel" class, choose "Rename symbol under cursor" (or something like that) and enter "channelText". Do the same for MainWindow::read and rename it to "serverText". Then we won't be confusing the two variables anymore...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Aug 2010
    Posts
    58
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Program crashes

    Qt Code:
    1. void MainWindow::appendToWindow()8‘|ÿÿÿÿ8?|????
    2. 8‘|ÿÿÿÿ
    3. :wineasy1.se.quakenet.org 376 Fallen_ :End of /MOTD command.
    4.  
    5. void MainWindow::appendToWindow()8‘|ÿÿÿÿ8?|????
    6. 8‘|ÿÿÿÿ
    7. void MainWindow::appendToWindow()[03:07:13] Notice from: Message: on 2 ca 1(4) ft 20(20) tr
    8. [03:07:13] Notice from: Message: on 2 ca 1(4) ft 20(20) tr
    9.  
    10. [03:07:13] Notice from: Message: on 2 ca 1(4) ft 20(20) tr
    11.  
    12. :wineasy1.se.quakenet.org 221 Fallen_ +i
    13.  
    14. void MainWindow::appendToWindow()[03:07:13] Notice from: Message: on 2 ca 1(4) ft 20(20) tr
    15. [03:07:13] Notice from: Message: on 2 ca 1(4) ft 20(20) tr
    16.  
    17. [03:07:13] Notice from: Message: on 2 ca 1(4) ft 20(20) tr
    18.  
    19. :Fallen_!~Fallen_@41.199.113.40 MODE Fallen_ +i
    20.  
    21. void MainWindow::appendToWindow()[03:07:13] Notice from: Message: on 2 ca 1(4) ft 20(20) tr
    22. [03:07:13] Notice from: Message: on 2 ca 1(4) ft 20(20) tr
    23.  
    24. [03:07:13] Notice from: Message: on 2 ca 1(4) ft 20(20) tr
    To copy to clipboard, switch view to plain text mode 
    this is the output

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Program crashes

    So there is no output from Channel::printText?

    By the way, is this:

    8‘|ÿÿÿÿ8?|????
    8‘|ÿÿÿÿ

    what you expected to print in the text edit (apart from the readable text, of course)?

    By the way, your "method" of recognizing the command is extremly error prone. Try passing it a "/JOIN #NOTICE" command and see for yourself. Your client will react on "NOTICE" and not on "JOIN". Also this method is prone to buffer overflows. I don't know why you insist on using this C-style API, you are just asking yourself for trouble there (i.e. try sending a really long (like, over 1000 characters long) notice).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Aug 2010
    Posts
    58
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Program crashes

    this text wont appear in the channel tab since u join after it has finished sending MOTD. wheres tbscope when u need him the most =_=

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Program crashes

    Quote Originally Posted by Fallen_ View Post
    this text wont appear in the channel tab since u join after it has finished sending MOTD.
    If by showing things irrelevant to the problem you wanted to discourage me from helping you then you have achieved your goal. 50 posts without progress is probably a record of this forum...

    tbscope is probably sleeping. Only I'm crazy enough to be sitting here at this hour.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. qstringlist array crashes program
    By chrisb123 in forum Newbie
    Replies: 4
    Last Post: 23rd October 2009, 15:03
  2. Program crashes on creating new dialog
    By eekhoorn12 in forum Qt Programming
    Replies: 2
    Last Post: 11th June 2009, 11:52
  3. program crashes (QtTestRunner)
    By fmariusd in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2008, 09:27
  4. Program crashes (SIGSEGV)
    By Voldemort in forum Qt Programming
    Replies: 47
    Last Post: 21st May 2007, 20:09
  5. Reading from TCP Socket crashes program
    By OnionRingOfDoom in forum Qt Programming
    Replies: 26
    Last Post: 27th January 2006, 19:32

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.