Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Release 6
-
None
-
Windows 7, QtCreator 1.3.1, Qt 4.6.2, QtSoap 2.7_1
Description
After I added a QtSoapArray as Methodargument for a QtSoapMessage (WSDL requires Array) i got random crashes after submitting the request.
It does not crash in the submitRequest function, but very soon after finishing it.
Qt-Creator's debugger just showed a special position in a disassembly:
0x77cb173c mov (%ecx),%ebx
and listed ntdll!RtlLeaveCriticalSection as "file".
I also tried to execute the program further via Visual Studio 2010 included Debugger.
After hitting "continue" the vc++ debugger printed errors again and again.
The crash occured random at different Array data, and even with an void Array.
At the end I took a look into qtsoap.cpp and found something (with the help of documentation of QNetworkAccessManager).
The description of post method pointed out :
"data must be open for reading and must remain valid until the finished() signal is emitted for this reply."
After reviewing the submitRequest method of QtSoapHttpTransport I tried to add a private property and copied the given request argument in submitRequest to it. Then I changed the QNetworkAccessManager call to use the copied request.
For me that did the trick.
Forgot to mention my changes; he they come:
QtSoap.h:
Line 610: Added "QtSoapMessage soapRequest;"
(Private save of the request)
QtSoap.cpp:
Line: 3160: Added "this->soapRequest = request;"
(Save the request)
Line 3168: Changed "networkRep = networkMgr.post(networkReq, request.toXmlString().toUtf8().constData());" to "networkRep = networkMgr.post(networkReq, soapRequest.toXmlString().toUtf8().constData());"
(Use the saved request)