Qt-interest Archive, October 2007
QHttp fails in plug-in
Message 1 in thread
Hi!
I have wrote plug-in which uses QHttp. From the app I call post method
of plug-in and then try to destroy it.
Application fails with access violation. If I try to destroy plug-in
before calling post method, it's all ok.
There is a simple test which demonstrates that problem
http://www.creobyte.com/tools/qhttp_bug.rar (~7.52k)
Thanks in advance.
Anton I Alferov.
--
[ signature omitted ]
Message 2 in thread
Hi,
> I have wrote plug-in which uses QHttp. From the app I call post method
> of plug-in and then try to destroy it.
QHttp::post() sends a post request. You should wait for the request to
complete (wait for the QHttp::requestFinished() signal) before destroying the
QHttp instance.
--
[ signature omitted ]
Message 3 in thread
> Hi,
>
>
> QHttp::post() sends a post request. You should wait for the request to
> complete (wait for the QHttp::requestFinished() signal) before
> destroying the QHttp instance.
>
>
Please look my test application. QHttp::requiestFinished() is handled there.
Anton I Alferov.
--
[ signature omitted ]
Message 4 in thread
>> Please look my test application. QHttp::requiestFinished() is handled
>> there.
>
> Can't open RAR files.
>
Ok, try this one please: http://www.creobyte.com/tools/qhttp_bug.zip
Anton I Alferov
--
[ signature omitted ]
Message 5 in thread
Hi,
> Ok, try this one please: http://www.creobyte.com/tools/qhttp_bug.zip
I was able to build it under Linux after minor changes in the *.pro files.
But how to reproduce the problem?
--
[ signature omitted ]
Message 6 in thread
Hi,
> But how to reproduce the problem?
Clicking on "post" after clicking on "unload" does result in a segmentation
fault. But it's expected, isn't it?
--
[ signature omitted ]
Message 7 in thread
>
> Clicking on "post" after clicking on "unload" does result in a
> segmentation fault. But it's expected, isn't it?
>
No :) Exactly vice versa :)
Anton I Alferov
--
[ signature omitted ]
Message 8 in thread
> I was able to build it under Linux after minor changes in the *.pro
> files.
>
> But how to reproduce the problem?
>
>
Just push "post" button, wait while requests finished (see console
output) and then push "unload" button. Note that plugin and app have to
be in the same directory.
Anton I Alferov
--
[ signature omitted ]
Message 9 in thread
Hi,
> Just push "post" button, wait while requests finished (see console
> output) and then push "unload" button. Note that plugin and app have to
> be in the same directory.
I can't reproduce any crash on Linux.
I press "post". The output is:
Request with ID 1 finished
Request with ID 2 finished
Connection refused
Then I press "unload".
--
[ signature omitted ]
Message 10 in thread
> I can't reproduce any crash on Linux.
>
> I press "post". The output is:
> Request with ID 1 finished
> Request with ID 2 finished
> Connection refused
> Then I press "unload".
>
And plugin successfully unloaded? Ok, there was a mention on our russian
forum (http://prog.org.ru/forum/index.php/topic,6432.0.html), that this
issue occurs only under windows. Under my Windows XP Pro SP2 it alwais
fails after that steps.
Anton I Alferov
--
[ signature omitted ]
Message 11 in thread
>> I can't reproduce any crash on Linux.
>>
>> I press "post". The output is:
>> Request with ID 1 finished
>> Request with ID 2 finished
>> Connection refused
>> Then I press "unload".
>>
> And plugin successfully unloaded? Ok, there was a mention on our
> russian forum (http://prog.org.ru/forum/index.php/topic,6432.0.html),
> that this issue occurs only under windows. Under my Windows XP Pro SP2
> it alwais fails after that steps.
>
So, any ideas how to fix under windows?
Anton I Alferov
--
[ signature omitted ]
Message 12 in thread
Hi,
> So, any ideas how to fix under windows?
No ideas, short of send a bug report to Trolltech:
http://trolltech.com/bugreport-form
You'll need a smaller example that reproduces the problem though. It's still
not clear after testing on Linux whether this is an issue with plugins, or QHttp.
--
[ signature omitted ]