You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Brian Brooks (JIRA)" <ax...@ws.apache.org> on 2005/10/18 20:19:44 UTC

[jira] Created: (AXISCPP-858) client stub delete Ret; causes Debug Assertion Failed! Win32

client stub delete Ret; causes Debug Assertion Failed! Win32
------------------------------------------------------------

         Key: AXISCPP-858
         URL: http://issues.apache.org/jira/browse/AXISCPP-858
     Project: Axis-C++
        Type: Bug
  Components: Client - Stub  
    Versions: 1.5 Final    
 Environment: client-Windows XP
server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9

    Reporter: Brian Brooks


The stub generated by 

java -classpath %lib%\..\axis\wsdl2ws.jar;%axis% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws %wsdl% -o./ClientOut -lc++ -sclient

has a defect.  In a debug win32 build, this results in the Microsoft runtime stopping the a client with a failed assertion

          /*
         * If this ASSERT fails, a bad pointer has been passed in. It may be
         * totally bogus, or it may have been allocated from another heap.
         * The pointer MUST come from the 'local' heap.
         */
        _ASSERTE(_CrtIsValidHeapPointer(pUserData));

the call stack at the point of failure is

  _free_dbg(void *, int)
  free(void *)
  operator delete(void *)
  Calculator::add(int, int)
  main(int, char * *)

The Calculator::add(int, int) function is declared in the generated stub Calculator.cpp.  This function is shown below.  The line that reads

  		delete Ret;

seems to be the problem.

/*Methods corresponding to the web service methods*/

/*
 * This method wrap the service method add
 */
xsd__int Calculator::add(xsd__int Value0, xsd__int Value1)
{
	xsd__int* Ret = NULL;
	const char* pcCmplxFaultName;
	try
	{
		if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER)) 
			return *Ret;
	if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
	{
		m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
	}
		m_pCall->setSOAPVersion(SOAP_VER_1_1);
		m_pCall->setOperation("add", "http://localhost:8080/axis/Calculator.jws");
		applyUserPreferences();
		m_pCall->addParameter((void*)&Value0, "i1", XSD_INT);
		m_pCall->addParameter((void*)&Value1, "i2", XSD_INT);
		if (AXIS_SUCCESS == m_pCall->invoke())
		{
			if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhost:8080/axis/Calculator.jws"))
			{
				Ret = m_pCall->getElementAsInt("addReturn", 0);
			}
		}
	m_pCall->unInitialize();
		xsd__int r = *Ret;
		delete Ret;
		return r;
	}
	catch(AxisException& e)
	{
		int iExceptionCode = e.getExceptionCode();
		if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
		{
			throw SoapFaultException(e);
		}
		ISoapFault* pSoapFault = (ISoapFault*)
			m_pCall->checkFault("Fault","http://localhost:8080/axis/Calculator.jws" );
		if(pSoapFault)
		{
			m_pCall->unInitialize();
			throw SoapFaultException(e);
		}
		else throw;
	}
}



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-858) client stub delete Ret; causes Debug Assertion Failed! Win32

Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-858?page=comments#action_12372078 ] 

Adrian Dick commented on AXISCPP-858:
-------------------------------------

Hi,

A number of changes have been made between 1.5final and the 1.6beta to resolve problems as you describe here.
Can you confirm if this is still a problem with the latest drivers.

Thanks,
Adrian

> client stub delete Ret; causes Debug Assertion Failed! Win32
> ------------------------------------------------------------
>
>          Key: AXISCPP-858
>          URL: http://issues.apache.org/jira/browse/AXISCPP-858
>      Project: Axis-C++
>         Type: Bug
>   Components: Client - Stub
>     Versions: 1.5 Final
>  Environment: client-Windows XP
> server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9
>     Reporter: Brian Brooks

>
> The stub generated by 
> java -classpath %lib%\..\axis\wsdl2ws.jar;%axis% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws %wsdl% -o./ClientOut -lc++ -sclient
> has a defect.  In a debug win32 build, this results in the Microsoft runtime stopping the a client with a failed assertion
>           /*
>          * If this ASSERT fails, a bad pointer has been passed in. It may be
>          * totally bogus, or it may have been allocated from another heap.
>          * The pointer MUST come from the 'local' heap.
>          */
>         _ASSERTE(_CrtIsValidHeapPointer(pUserData));
> the call stack at the point of failure is
>   _free_dbg(void *, int)
>   free(void *)
>   operator delete(void *)
>   Calculator::add(int, int)
>   main(int, char * *)
> The Calculator::add(int, int) function is declared in the generated stub Calculator.cpp.  This function is shown below.  The line that reads
>   		delete Ret;
> seems to be the problem.
> /*Methods corresponding to the web service methods*/
> /*
>  * This method wrap the service method add
>  */
> xsd__int Calculator::add(xsd__int Value0, xsd__int Value1)
> {
> 	xsd__int* Ret = NULL;
> 	const char* pcCmplxFaultName;
> 	try
> 	{
> 		if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER)) 
> 			return *Ret;
> 	if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
> 	{
> 		m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
> 	}
> 		m_pCall->setSOAPVersion(SOAP_VER_1_1);
> 		m_pCall->setOperation("add", "http://localhost:8080/axis/Calculator.jws");
> 		applyUserPreferences();
> 		m_pCall->addParameter((void*)&Value0, "i1", XSD_INT);
> 		m_pCall->addParameter((void*)&Value1, "i2", XSD_INT);
> 		if (AXIS_SUCCESS == m_pCall->invoke())
> 		{
> 			if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhost:8080/axis/Calculator.jws"))
> 			{
> 				Ret = m_pCall->getElementAsInt("addReturn", 0);
> 			}
> 		}
> 	m_pCall->unInitialize();
> 		xsd__int r = *Ret;
> 		delete Ret;
> 		return r;
> 	}
> 	catch(AxisException& e)
> 	{
> 		int iExceptionCode = e.getExceptionCode();
> 		if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
> 		{
> 			throw SoapFaultException(e);
> 		}
> 		ISoapFault* pSoapFault = (ISoapFault*)
> 			m_pCall->checkFault("Fault","http://localhost:8080/axis/Calculator.jws" );
> 		if(pSoapFault)
> 		{
> 			m_pCall->unInitialize();
> 			throw SoapFaultException(e);
> 		}
> 		else throw;
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXISCPP-858) client stub delete Ret; causes Debug Assertion Failed! Win32

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-858?page=all ]

nadir amra closed AXISCPP-858.
------------------------------


> client stub delete Ret; causes Debug Assertion Failed! Win32
> ------------------------------------------------------------
>
>                 Key: AXISCPP-858
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-858
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Stub
>    Affects Versions: 1.5 Final
>         Environment: client-Windows XP
> server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9
>            Reporter: Brian Brooks
>             Fix For:  1.6 Beta
>
>
> The stub generated by 
> java -classpath %lib%\..\axis\wsdl2ws.jar;%axis% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws %wsdl% -o./ClientOut -lc++ -sclient
> has a defect.  In a debug win32 build, this results in the Microsoft runtime stopping the a client with a failed assertion
>           /*
>          * If this ASSERT fails, a bad pointer has been passed in. It may be
>          * totally bogus, or it may have been allocated from another heap.
>          * The pointer MUST come from the 'local' heap.
>          */
>         _ASSERTE(_CrtIsValidHeapPointer(pUserData));
> the call stack at the point of failure is
>   _free_dbg(void *, int)
>   free(void *)
>   operator delete(void *)
>   Calculator::add(int, int)
>   main(int, char * *)
> The Calculator::add(int, int) function is declared in the generated stub Calculator.cpp.  This function is shown below.  The line that reads
>   		delete Ret;
> seems to be the problem.
> /*Methods corresponding to the web service methods*/
> /*
>  * This method wrap the service method add
>  */
> xsd__int Calculator::add(xsd__int Value0, xsd__int Value1)
> {
> 	xsd__int* Ret = NULL;
> 	const char* pcCmplxFaultName;
> 	try
> 	{
> 		if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER)) 
> 			return *Ret;
> 	if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
> 	{
> 		m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
> 	}
> 		m_pCall->setSOAPVersion(SOAP_VER_1_1);
> 		m_pCall->setOperation("add", "http://localhost:8080/axis/Calculator.jws");
> 		applyUserPreferences();
> 		m_pCall->addParameter((void*)&Value0, "i1", XSD_INT);
> 		m_pCall->addParameter((void*)&Value1, "i2", XSD_INT);
> 		if (AXIS_SUCCESS == m_pCall->invoke())
> 		{
> 			if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhost:8080/axis/Calculator.jws"))
> 			{
> 				Ret = m_pCall->getElementAsInt("addReturn", 0);
> 			}
> 		}
> 	m_pCall->unInitialize();
> 		xsd__int r = *Ret;
> 		delete Ret;
> 		return r;
> 	}
> 	catch(AxisException& e)
> 	{
> 		int iExceptionCode = e.getExceptionCode();
> 		if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
> 		{
> 			throw SoapFaultException(e);
> 		}
> 		ISoapFault* pSoapFault = (ISoapFault*)
> 			m_pCall->checkFault("Fault","http://localhost:8080/axis/Calculator.jws" );
> 		if(pSoapFault)
> 		{
> 			m_pCall->unInitialize();
> 			throw SoapFaultException(e);
> 		}
> 		else throw;
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXISCPP-858) client stub delete Ret; causes Debug Assertion Failed! Win32

Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-858?page=comments#action_12356217 ] 

Adrian Dick commented on AXISCPP-858:
-------------------------------------


I have managed to resolve this by simply including the "/MD" flag.

This is the flag for Multithreaded DLL, if you're trying to select this from within a GUI.

It isn't abundantly clear, to me, why you need to do this, other than because you are using a multi-threaded DLL.

Hope that helps,
Adrian

> client stub delete Ret; causes Debug Assertion Failed! Win32
> ------------------------------------------------------------
>
>          Key: AXISCPP-858
>          URL: http://issues.apache.org/jira/browse/AXISCPP-858
>      Project: Axis-C++
>         Type: Bug
>   Components: Client - Stub
>     Versions: 1.5 Final
>  Environment: client-Windows XP
> server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9
>     Reporter: Brian Brooks

>
> The stub generated by 
> java -classpath %lib%\..\axis\wsdl2ws.jar;%axis% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws %wsdl% -o./ClientOut -lc++ -sclient
> has a defect.  In a debug win32 build, this results in the Microsoft runtime stopping the a client with a failed assertion
>           /*
>          * If this ASSERT fails, a bad pointer has been passed in. It may be
>          * totally bogus, or it may have been allocated from another heap.
>          * The pointer MUST come from the 'local' heap.
>          */
>         _ASSERTE(_CrtIsValidHeapPointer(pUserData));
> the call stack at the point of failure is
>   _free_dbg(void *, int)
>   free(void *)
>   operator delete(void *)
>   Calculator::add(int, int)
>   main(int, char * *)
> The Calculator::add(int, int) function is declared in the generated stub Calculator.cpp.  This function is shown below.  The line that reads
>   		delete Ret;
> seems to be the problem.
> /*Methods corresponding to the web service methods*/
> /*
>  * This method wrap the service method add
>  */
> xsd__int Calculator::add(xsd__int Value0, xsd__int Value1)
> {
> 	xsd__int* Ret = NULL;
> 	const char* pcCmplxFaultName;
> 	try
> 	{
> 		if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER)) 
> 			return *Ret;
> 	if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
> 	{
> 		m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
> 	}
> 		m_pCall->setSOAPVersion(SOAP_VER_1_1);
> 		m_pCall->setOperation("add", "http://localhost:8080/axis/Calculator.jws");
> 		applyUserPreferences();
> 		m_pCall->addParameter((void*)&Value0, "i1", XSD_INT);
> 		m_pCall->addParameter((void*)&Value1, "i2", XSD_INT);
> 		if (AXIS_SUCCESS == m_pCall->invoke())
> 		{
> 			if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhost:8080/axis/Calculator.jws"))
> 			{
> 				Ret = m_pCall->getElementAsInt("addReturn", 0);
> 			}
> 		}
> 	m_pCall->unInitialize();
> 		xsd__int r = *Ret;
> 		delete Ret;
> 		return r;
> 	}
> 	catch(AxisException& e)
> 	{
> 		int iExceptionCode = e.getExceptionCode();
> 		if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
> 		{
> 			throw SoapFaultException(e);
> 		}
> 		ISoapFault* pSoapFault = (ISoapFault*)
> 			m_pCall->checkFault("Fault","http://localhost:8080/axis/Calculator.jws" );
> 		if(pSoapFault)
> 		{
> 			m_pCall->unInitialize();
> 			throw SoapFaultException(e);
> 		}
> 		else throw;
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-858) client stub delete Ret; causes Debug Assertion Failed! Win32

Posted by "Brian Brooks (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-858?page=comments#action_12356210 ] 

Brian Brooks commented on AXISCPP-858:
--------------------------------------

Do you think this problem will be resolved in 1.6?

> client stub delete Ret; causes Debug Assertion Failed! Win32
> ------------------------------------------------------------
>
>          Key: AXISCPP-858
>          URL: http://issues.apache.org/jira/browse/AXISCPP-858
>      Project: Axis-C++
>         Type: Bug
>   Components: Client - Stub
>     Versions: 1.5 Final
>  Environment: client-Windows XP
> server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9
>     Reporter: Brian Brooks

>
> The stub generated by 
> java -classpath %lib%\..\axis\wsdl2ws.jar;%axis% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws %wsdl% -o./ClientOut -lc++ -sclient
> has a defect.  In a debug win32 build, this results in the Microsoft runtime stopping the a client with a failed assertion
>           /*
>          * If this ASSERT fails, a bad pointer has been passed in. It may be
>          * totally bogus, or it may have been allocated from another heap.
>          * The pointer MUST come from the 'local' heap.
>          */
>         _ASSERTE(_CrtIsValidHeapPointer(pUserData));
> the call stack at the point of failure is
>   _free_dbg(void *, int)
>   free(void *)
>   operator delete(void *)
>   Calculator::add(int, int)
>   main(int, char * *)
> The Calculator::add(int, int) function is declared in the generated stub Calculator.cpp.  This function is shown below.  The line that reads
>   		delete Ret;
> seems to be the problem.
> /*Methods corresponding to the web service methods*/
> /*
>  * This method wrap the service method add
>  */
> xsd__int Calculator::add(xsd__int Value0, xsd__int Value1)
> {
> 	xsd__int* Ret = NULL;
> 	const char* pcCmplxFaultName;
> 	try
> 	{
> 		if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER)) 
> 			return *Ret;
> 	if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
> 	{
> 		m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
> 	}
> 		m_pCall->setSOAPVersion(SOAP_VER_1_1);
> 		m_pCall->setOperation("add", "http://localhost:8080/axis/Calculator.jws");
> 		applyUserPreferences();
> 		m_pCall->addParameter((void*)&Value0, "i1", XSD_INT);
> 		m_pCall->addParameter((void*)&Value1, "i2", XSD_INT);
> 		if (AXIS_SUCCESS == m_pCall->invoke())
> 		{
> 			if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhost:8080/axis/Calculator.jws"))
> 			{
> 				Ret = m_pCall->getElementAsInt("addReturn", 0);
> 			}
> 		}
> 	m_pCall->unInitialize();
> 		xsd__int r = *Ret;
> 		delete Ret;
> 		return r;
> 	}
> 	catch(AxisException& e)
> 	{
> 		int iExceptionCode = e.getExceptionCode();
> 		if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
> 		{
> 			throw SoapFaultException(e);
> 		}
> 		ISoapFault* pSoapFault = (ISoapFault*)
> 			m_pCall->checkFault("Fault","http://localhost:8080/axis/Calculator.jws" );
> 		if(pSoapFault)
> 		{
> 			m_pCall->unInitialize();
> 			throw SoapFaultException(e);
> 		}
> 		else throw;
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-858) client stub delete Ret; causes Debug Assertion Failed! Win32

Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-858?page=comments#action_12356218 ] 

Adrian Dick commented on AXISCPP-858:
-------------------------------------

Ooh!   Meant to say, you add this flag to your client application project.

Adrian

> client stub delete Ret; causes Debug Assertion Failed! Win32
> ------------------------------------------------------------
>
>          Key: AXISCPP-858
>          URL: http://issues.apache.org/jira/browse/AXISCPP-858
>      Project: Axis-C++
>         Type: Bug
>   Components: Client - Stub
>     Versions: 1.5 Final
>  Environment: client-Windows XP
> server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9
>     Reporter: Brian Brooks

>
> The stub generated by 
> java -classpath %lib%\..\axis\wsdl2ws.jar;%axis% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws %wsdl% -o./ClientOut -lc++ -sclient
> has a defect.  In a debug win32 build, this results in the Microsoft runtime stopping the a client with a failed assertion
>           /*
>          * If this ASSERT fails, a bad pointer has been passed in. It may be
>          * totally bogus, or it may have been allocated from another heap.
>          * The pointer MUST come from the 'local' heap.
>          */
>         _ASSERTE(_CrtIsValidHeapPointer(pUserData));
> the call stack at the point of failure is
>   _free_dbg(void *, int)
>   free(void *)
>   operator delete(void *)
>   Calculator::add(int, int)
>   main(int, char * *)
> The Calculator::add(int, int) function is declared in the generated stub Calculator.cpp.  This function is shown below.  The line that reads
>   		delete Ret;
> seems to be the problem.
> /*Methods corresponding to the web service methods*/
> /*
>  * This method wrap the service method add
>  */
> xsd__int Calculator::add(xsd__int Value0, xsd__int Value1)
> {
> 	xsd__int* Ret = NULL;
> 	const char* pcCmplxFaultName;
> 	try
> 	{
> 		if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER)) 
> 			return *Ret;
> 	if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
> 	{
> 		m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
> 	}
> 		m_pCall->setSOAPVersion(SOAP_VER_1_1);
> 		m_pCall->setOperation("add", "http://localhost:8080/axis/Calculator.jws");
> 		applyUserPreferences();
> 		m_pCall->addParameter((void*)&Value0, "i1", XSD_INT);
> 		m_pCall->addParameter((void*)&Value1, "i2", XSD_INT);
> 		if (AXIS_SUCCESS == m_pCall->invoke())
> 		{
> 			if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhost:8080/axis/Calculator.jws"))
> 			{
> 				Ret = m_pCall->getElementAsInt("addReturn", 0);
> 			}
> 		}
> 	m_pCall->unInitialize();
> 		xsd__int r = *Ret;
> 		delete Ret;
> 		return r;
> 	}
> 	catch(AxisException& e)
> 	{
> 		int iExceptionCode = e.getExceptionCode();
> 		if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
> 		{
> 			throw SoapFaultException(e);
> 		}
> 		ISoapFault* pSoapFault = (ISoapFault*)
> 			m_pCall->checkFault("Fault","http://localhost:8080/axis/Calculator.jws" );
> 		if(pSoapFault)
> 		{
> 			m_pCall->unInitialize();
> 			throw SoapFaultException(e);
> 		}
> 		else throw;
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXISCPP-858) client stub delete Ret; causes Debug Assertion Failed! Win32

Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-858?page=all ]
     
Adrian Dick resolved AXISCPP-858:
---------------------------------

    Fix Version:  1.6 Beta
     Resolution: Fixed

Brian,

I'm going to mark this as resolved because this problem has been reported several times with Axis C++ 1.5, but we have not had any reports since the various fixes went into the 1.6 builds.

When you get an opportunity to test this can you then move this issue to closed or reopen, as appropriate.

Many Thanks,
Adrian

> client stub delete Ret; causes Debug Assertion Failed! Win32
> ------------------------------------------------------------
>
>          Key: AXISCPP-858
>          URL: http://issues.apache.org/jira/browse/AXISCPP-858
>      Project: Axis-C++
>         Type: Bug

>   Components: Client - Stub
>     Versions: 1.5 Final
>  Environment: client-Windows XP
> server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9
>     Reporter: Brian Brooks
>      Fix For:  1.6 Beta

>
> The stub generated by 
> java -classpath %lib%\..\axis\wsdl2ws.jar;%axis% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws %wsdl% -o./ClientOut -lc++ -sclient
> has a defect.  In a debug win32 build, this results in the Microsoft runtime stopping the a client with a failed assertion
>           /*
>          * If this ASSERT fails, a bad pointer has been passed in. It may be
>          * totally bogus, or it may have been allocated from another heap.
>          * The pointer MUST come from the 'local' heap.
>          */
>         _ASSERTE(_CrtIsValidHeapPointer(pUserData));
> the call stack at the point of failure is
>   _free_dbg(void *, int)
>   free(void *)
>   operator delete(void *)
>   Calculator::add(int, int)
>   main(int, char * *)
> The Calculator::add(int, int) function is declared in the generated stub Calculator.cpp.  This function is shown below.  The line that reads
>   		delete Ret;
> seems to be the problem.
> /*Methods corresponding to the web service methods*/
> /*
>  * This method wrap the service method add
>  */
> xsd__int Calculator::add(xsd__int Value0, xsd__int Value1)
> {
> 	xsd__int* Ret = NULL;
> 	const char* pcCmplxFaultName;
> 	try
> 	{
> 		if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER)) 
> 			return *Ret;
> 	if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
> 	{
> 		m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
> 	}
> 		m_pCall->setSOAPVersion(SOAP_VER_1_1);
> 		m_pCall->setOperation("add", "http://localhost:8080/axis/Calculator.jws");
> 		applyUserPreferences();
> 		m_pCall->addParameter((void*)&Value0, "i1", XSD_INT);
> 		m_pCall->addParameter((void*)&Value1, "i2", XSD_INT);
> 		if (AXIS_SUCCESS == m_pCall->invoke())
> 		{
> 			if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhost:8080/axis/Calculator.jws"))
> 			{
> 				Ret = m_pCall->getElementAsInt("addReturn", 0);
> 			}
> 		}
> 	m_pCall->unInitialize();
> 		xsd__int r = *Ret;
> 		delete Ret;
> 		return r;
> 	}
> 	catch(AxisException& e)
> 	{
> 		int iExceptionCode = e.getExceptionCode();
> 		if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
> 		{
> 			throw SoapFaultException(e);
> 		}
> 		ISoapFault* pSoapFault = (ISoapFault*)
> 			m_pCall->checkFault("Fault","http://localhost:8080/axis/Calculator.jws" );
> 		if(pSoapFault)
> 		{
> 			m_pCall->unInitialize();
> 			throw SoapFaultException(e);
> 		}
> 		else throw;
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-858) client stub delete Ret; causes Debug Assertion Failed! Win32

Posted by "Brian Brooks (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-858?page=comments#action_12374059 ] 

Brian Brooks commented on AXISCPP-858:
--------------------------------------

Thanks, Adrian.  

Regrettably, I'm back in graduate school now so I don't have the same exact environment I did before.  I'll try to reproduce the problem with 1.6beta.  I'm pretty busy with end of semester stuff but should have time in May.  

Do you need feedback before May 31, 2006?

Brian

> client stub delete Ret; causes Debug Assertion Failed! Win32
> ------------------------------------------------------------
>
>          Key: AXISCPP-858
>          URL: http://issues.apache.org/jira/browse/AXISCPP-858
>      Project: Axis-C++
>         Type: Bug

>   Components: Client - Stub
>     Versions: 1.5 Final
>  Environment: client-Windows XP
> server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9
>     Reporter: Brian Brooks

>
> The stub generated by 
> java -classpath %lib%\..\axis\wsdl2ws.jar;%axis% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws %wsdl% -o./ClientOut -lc++ -sclient
> has a defect.  In a debug win32 build, this results in the Microsoft runtime stopping the a client with a failed assertion
>           /*
>          * If this ASSERT fails, a bad pointer has been passed in. It may be
>          * totally bogus, or it may have been allocated from another heap.
>          * The pointer MUST come from the 'local' heap.
>          */
>         _ASSERTE(_CrtIsValidHeapPointer(pUserData));
> the call stack at the point of failure is
>   _free_dbg(void *, int)
>   free(void *)
>   operator delete(void *)
>   Calculator::add(int, int)
>   main(int, char * *)
> The Calculator::add(int, int) function is declared in the generated stub Calculator.cpp.  This function is shown below.  The line that reads
>   		delete Ret;
> seems to be the problem.
> /*Methods corresponding to the web service methods*/
> /*
>  * This method wrap the service method add
>  */
> xsd__int Calculator::add(xsd__int Value0, xsd__int Value1)
> {
> 	xsd__int* Ret = NULL;
> 	const char* pcCmplxFaultName;
> 	try
> 	{
> 		if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER)) 
> 			return *Ret;
> 	if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
> 	{
> 		m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
> 	}
> 		m_pCall->setSOAPVersion(SOAP_VER_1_1);
> 		m_pCall->setOperation("add", "http://localhost:8080/axis/Calculator.jws");
> 		applyUserPreferences();
> 		m_pCall->addParameter((void*)&Value0, "i1", XSD_INT);
> 		m_pCall->addParameter((void*)&Value1, "i2", XSD_INT);
> 		if (AXIS_SUCCESS == m_pCall->invoke())
> 		{
> 			if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhost:8080/axis/Calculator.jws"))
> 			{
> 				Ret = m_pCall->getElementAsInt("addReturn", 0);
> 			}
> 		}
> 	m_pCall->unInitialize();
> 		xsd__int r = *Ret;
> 		delete Ret;
> 		return r;
> 	}
> 	catch(AxisException& e)
> 	{
> 		int iExceptionCode = e.getExceptionCode();
> 		if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
> 		{
> 			throw SoapFaultException(e);
> 		}
> 		ISoapFault* pSoapFault = (ISoapFault*)
> 			m_pCall->checkFault("Fault","http://localhost:8080/axis/Calculator.jws" );
> 		if(pSoapFault)
> 		{
> 			m_pCall->unInitialize();
> 			throw SoapFaultException(e);
> 		}
> 		else throw;
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira