Results 1 to 17 of 17

Thread: QUrlOperator doesn't emit finished signal

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Location
    istanbul, turkey
    Posts
    42
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Exclamation Re: QUrlOperator doesn't emit finished signal

    right it's v3.3.6

    and v3.3.3 gives the same result
    Last edited by hayati; 23rd March 2007 at 12:28.

  2. #2
    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: QUrlOperator doesn't emit finished signal

    Quote Originally Posted by hayati View Post
    right it's v3.3.6

    and v3.3.3 gives the same result
    Try Qt 3.3.8. There was some problem with QDns fixed. On my system finished() is always emitted, but the application crashes after a while (it has something to do with event delivery).

  3. #3
    Join Date
    Aug 2006
    Location
    istanbul, turkey
    Posts
    42
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Exclamation Re: QUrlOperator doesn't emit finished signal

    thanks for the reply,
    yes it's obvious that it has some problems internally.
    unfortunately i can't use v3.3.8
    even so, as you said it gets errors with internal SIGSEGV errors.
    I'll use libcurl library for that purpose for now
    thanks for help.

  4. #4
    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: QUrlOperator doesn't emit finished signal

    Quote Originally Posted by hayati View Post
    even so, as you said it gets errors with internal SIGSEGV errors.
    I didn't say that they are internal errors.

  5. #5
    Join Date
    Aug 2006
    Location
    istanbul, turkey
    Posts
    42
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QUrlOperator doesn't emit finished signal

    yes you didn't say, sorry about misunderstanding.
    I'm confused because i get SIGSEGV after my last try to fix the problem
    That's why i said SIGSEGV, it's what i get, not yours.
    If it's undertood like yours i apologize

    Another amazing thing about the QUrlOperator is;
    I placed a single-shot timer as error-interval. When timer is up then even if i don't get finished signal i delete the opened widget, at the destructor i stop m_op, and delete it.
    But this time i got SIGSEGV.
    In addition, gdb stack trace points out qsocket caused the SIGSEGV.
    that's why i said -INTERNAL- error.
    I think I get SIGSEGV because m_op opened a QSocket internally but after i delete m_op then m_op deletes QSocket and when system is about to use to deleted socket then SIGSEGV occurs. (just an estimation)
    By the way that's not the point of the problem.

    Problem is QUrlOperator doesn't emit finished signals after a while
    Last edited by hayati; 23rd March 2007 at 14:32.

  6. #6
    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: QUrlOperator doesn't emit finished signal

    Quote Originally Posted by hayati View Post
    But this time i got SIGSEGV.
    Such fault can occur when you delete an object within event handler and it's usually solved using QObject::deleteLater().

    Quote Originally Posted by hayati View Post
    Problem is QUrlOperator doesn't emit finished signals after a while
    It looks like this problem doesn't occur on Qt 3.3.8. Try the narrowed-down example from the attachment.
    Attached Files Attached Files

  7. #7
    Join Date
    Aug 2006
    Location
    istanbul, turkey
    Posts
    42
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Exclamation Re: QUrlOperator doesn't emit finished signal

    Thanks for your quick replys. I really appreciated.
    I couldn't answer your replys for a while because i got cold.
    Unfortunately even v3.3.8 with your test code(main.cpp) fails when id is over 400.
    After id value of 400, program didn't received any finished signal at all
    Perharps you didn't wait as much as program starts failing
    Because we don't know what is wrong and when the program starts failing best of best of us is to wait for ten minutes at least.
    I am sure that my application uses v3.3.8 because i checked it with qVersion() within your test code.

  8. #8
    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: QUrlOperator doesn't emit finished signal

    Quote Originally Posted by hayati View Post
    Unfortunately even v3.3.8 with your test code(main.cpp) fails when id is over 400.
    After id value of 400, program didn't received any finished signal at all
    I've just tried it again and reached id = 1500 without any signs of failure.

    I can't run Valgrind on my system, so I can't check whether the are any problems inside Qt, but try this:
    Qt Code:
    1. Test() : _id( _nextId++ )
    2. {
    3. std::cerr << "created " << _id << std::endl;
    4. _op = new QUrlOperator("http://test.domain.tld/");
    5.  
    6. if( _op != 0 ) {
    7. connect( _op, SIGNAL(finished(QNetworkOperation*)), SLOT(finished()) );
    8. if( _op->get() == 0 ) {
    9. std::cerr << "get() failed " << _id << std::endl;
    10. deleteLater();
    11. }
    12. }
    13. else {
    14. std::cerr << "allocation failed " << _id << std::endl;
    15. deleteLater();
    16. }
    17. }
    To copy to clipboard, switch view to plain text mode 

  9. The following user says thank you to jacek for this useful post:

    hayati (26th March 2007)

  10. #9
    Join Date
    Aug 2006
    Location
    istanbul, turkey
    Posts
    42
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Unhappy Re: QUrlOperator doesn't emit finished signal

    It's about something different.
    I tested main.cpp in my home network then it's like just you mentioned.
    So it works perfectly even with v3.3.6 at my home. But what's missing with my job network or what's more.
    My home network is very little it has three pc so name resolution could be very fast.
    But my job network is quite big (and more will be- over 400 pc).
    It has a heavy multicast traffic also. (But I don't think that's the problem) It must be something different. At first I thought it might be a protection from firewall or other network devices (just an estimation), but my network admin said it isn't.
    But unfortunately I have no idea
    By the way I started coding my own url class from curl.
    Even if I know that qt has coded it more bugfree than me, I have no other chance to do now unless finding out the way to make it worked.

    Thanks for your patience, because I give up counting at 1265 an I satisfied that it's something else

  11. #10
    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: QUrlOperator doesn't emit finished signal

    Quote Originally Posted by hayati View Post
    But my job network is quite big (and more will be- over 400 pc).
    It has a heavy multicast traffic also.
    Then it might be some subtle bug that might possibly have something to do with timeouts. You can try contacting Trolltech and ask whether they can do something about it.

Similar Threads

  1. From extends QTreeWidgetItem emit signal?
    By patrik08 in forum Qt Programming
    Replies: 4
    Last Post: 19th May 2006, 14:54
  2. Replies: 4
    Last Post: 18th May 2006, 17:48
  3. Replies: 2
    Last Post: 17th May 2006, 21:01
  4. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 16:36
  5. emit a signal
    By Morea in forum Qt Programming
    Replies: 2
    Last Post: 27th February 2006, 11:14

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.