Maybe it's because of a memory leak? Where do you delete m_op?
Maybe it's because of a memory leak? Where do you delete m_op?
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
at the destructor but it also makes no sense![]()
Last edited by hayati; 22nd March 2007 at 20:06.
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.
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.
rightit's v3.3.6
and v3.3.3 gives the same result![]()
Last edited by hayati; 23rd March 2007 at 12:28.
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.
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.
Such fault can occur when you delete an object within event handler and it's usually solved using QObject::deleteLater().
It looks like this problem doesn't occur on Qt 3.3.8. Try the narrowed-down example from the attachment.
Bookmarks