Archived

This forum has been archived. Please start a new discussion on GitHub.

the problem of using ByteSeq in slice(ice3.6.1 and visual studio 2013)

I write a slice. The part of slice file below:
module Demo
{
sequence<byte> ByteSeq;

interface FileService
{
ByteSeq fileRead(string fileName, int initialPosition, out bool endOfFile);
};
};

It can generate .h and .cpp file. The server and client program complie well. But when call fileRead function, the service side code error.

::Ice::DispatchStatus
Demo::FileService::___fileRead(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
__checkMode(::Ice::Normal, __current.mode);
::IceInternal::BasicStream* __is = __inS.startReadParams();
::std::string __p_fileName;
::Ice::Int __p_initialPosition;
__is->read(__p_fileName);
__is->read(__p_initialPosition);
__inS.endReadParams();
bool __p_endOfFile;
::Demo::ByteSeq __ret = fileRead(__p_fileName, __p_initialPosition, __p_endOfFile, __current);
::IceInternal::BasicStream* __os = __inS.__startWriteParams(::Ice::DefaultFormat);
__os->write(__p_endOfFile);
__os->write(__ret);
__inS.__endWriteParams(true);
return ::Ice::DispatchOK;
}

::Demo::ByteSeq __ret = fileRead(__p_fileName, __p_initialPosition, __p_endOfFile, __current); call failed.
The error message "0x00407247 处有未经处理的异常(在 TestServer.exe 中): 0xC00000FD: Stack overflow (参数: 0x00000000, 0x01812000)。".

If i do not use ByteSeq in fileRead, it works ok.

It works using Ice3.4.1 with visual studio 2008.
But failed using Ice3.6.1 with visual studio 2013.

Comments