Hi all,

I've just discovered that gSOAP seems to like crashing when I try to 
generate an error response.  The code I have that triggers the segfault 
is this:

   return soap_receiver_fault(soap, "Record not found", "test msg");

This is src/resadminService.cpp:66 in the backtrace below.  The line in 
soapC.cpp:765 that causes the segfault is this:

DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Fault(%d, 
%s, %s)\n", n, type?type:"", arrayType?arrayType:""));

If I comment out that line the segfault moves to the next DBGLOG() 
statement.

I'm not quite sure what's causing the problem!  Any ideas where to look?

Thanks,
Adam.

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f7b33a35700 (LWP 19609)]
0x00007f7b323c4802 in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0x00007f7b323c4802 in vfprintf () from /lib/libc.so.6
#1  0x00007f7b323ce708 in fprintf () from /lib/libc.so.6
#2  0x0000000000446e1d in soap_instantiate_SOAP_ENV__Fault 
(soap=0x7fff3ba40050, n=-1, type=0x0, arrayType=0x0, size=0x0) at 
src/gsoap/soapC.cpp:765
#3  0x0000000000446fa6 in soap_new_SOAP_ENV__Fault (soap=0x7fff3ba40050, 
n=-1) at src/gsoap/soapC.cpp:756
#4  0x0000000000446fd3 in soap_fault (soap=0x7fff3ba40050) at 
src/gsoap/soapC.cpp:51
#5  0x00000000004472c1 in soap_faultcode (soap=0x7fff3ba40050) at 
src/gsoap/soapC.cpp:87
#6  0x0000000000450159 in soap_set_error (soap=0x7fff3ba3fad0, 
faultcode=0x1 <Address 0x1 out of bounds>, faultsubcodeQName=0x0,
     faultstring=0x1 <Address 0x1 out of bounds>, 
faultdetailXML=0x2525252525252525 <Address 0x2525252525252525 out of 
bounds>, soaperror=839151268)
     at stdsoap2_cpp.cpp:14706
#7  0x000000000042b78c in resadminService::getRecord 
(this=0x7fff3ba40050, soap=0x7fff3ba40050, id=
         {static npos = 18446744073709551615, _M_dataplus = 
{<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data 
fields>}, <No data fields>}, _M_p = 0x7fff3ba3ff80 "(��"}}, type=
         {static npos = 18446744073709551615, _M_dataplus = 
{<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data 
fields>}, <No data fields>}, _M_p = 0x7fff3ba3ff70 "\210��"}}, 
[EMAIL PROTECTED]) at src/resadminService.cpp:66
#8  0x0000000000444e25 in serve_ns__getRecord (soap=0x7fff3ba40050) at 
src/gsoap/soapresadminService.cpp:192
#9  0x0000000000445104 in resadminService::dispatch 
(this=0x7fff3ba40050) at src/gsoap/soapresadminService.cpp:176
#10 0x000000000044520b in resadminService::serve (this=0x7fff3ba40050) 
at src/gsoap/soapresadminService.cpp:148
#11 0x000000000041fd00 in CRequestThread::operator() 
(this=0x7fff3ba5bbe0) at src/CRequestThread.cpp:231
#12 0x0000000000423099 in main (iArgC=3, cArgV=0x7fff3ba5cb68) at 
src/main.cpp:400

Reply via email to