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
    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

    Maybe it's because of a memory leak? Where do you delete m_op?

  2. #2
    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

    yeh i know there is (or are) memory leak. but the problem isn't the memory leak. As you see from the code it just shows the skeleton, in actual program it is deleted but there is no change.
    After all even there is a memory leak m_op is created from the beginning. so newly created m_op should get finished signal either way. I applied with the delete m_op but this didn't changed any thing
    everbody is free to change the code to make it worked. As skeleton shows there isn't any magic operation took place. Amazingly it doesn't emit finished.

    i also edited the source code to fix the leak.

    what i also tried to stop get progres before to delete m_op with
    Qt Code:
    1. m_op->stop();
    To copy to clipboard, switch view to plain text mode 
    at the destructor but it also makes no sense
    Last edited by hayati; 22nd March 2007 at 20:06.

  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

    Unfortunately i get neither descriptive reason of the problem nor solution to it.
    As the code part of my problem shows, it should be worked but it isn't.
    Any help is wellcome.

    here is what i get at the console output:
    conn state changed to: host asdfasdf found
    finished but there is an error...
    conn state changed to: host asdfasdf found
    finished but there is an error...
    conn state changed to: host asdfasdf found
    finished but there is an error...
    conn state changed to: host asdfasdf found
    finished but there is an error...
    conn state changed to: host asdfasdf found
    conn state changed to: host asdfasdf found
    conn state changed to: host asdfasdf found
    conn state changed to: host asdfasdf found
    conn state changed to: host asdfasdf found
    conn state changed to: host asdfasdf found

    this goes forever...

    as output shows after a while finished signal is not emitted
    Last edited by hayati; 23rd March 2007 at 09:25.

  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
    as output shows after a while finished signal is not emitted
    How long does this "while" take? Which Qt version do you use?

  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

    Unhappy Re: QUrlOperator doesn't emit finished signal

    i use qt3
    and from the output it could be said that it's about 120 to 210 seconds at least but it could take long of course because there is no clue about the error. I'm using just the code i've posted to test the situation but even this little code makes the same error.
    i think it's goint to a qt bug
    because it works perfectly when requested web pages are found.

  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
    i use qt3
    There are over 20 versions of Qt3. Which one do you use?

  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

    right it's v3.3.6

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

  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
    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).

  9. #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

    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.

  10. #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
    even so, as you said it gets errors with internal SIGSEGV errors.
    I didn't say that they are internal errors.

  11. #11
    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.

  12. #12
    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

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.