View Single Post
  #1 (permalink)  
Old 08-03-2005
csammis's Avatar
csammis csammis is offline
Registered User
 
 
Join Date: Jul 2005
Location: Des Moines, IA
Posts: 3
UnmarshalOutOfBoundsException when sending byte sequences

I'm using Ice 2.1.0 on SunOS. I have an application where the client and server will be exchanging sequences of bytes. Both client and server are being built from the same Slice defintion.

My client code:
Code:
//// A proxy to the server, sg, and the ByteSeq, bs, are both being created successfully ////
// Set the new geometry
sg->setGeometry(bs);
cout << "Set geometry (" << bs.size() << " bytes) for segment " << name << endl;
My server code:
Code:
virtual void setGeometry(const ByteSeq &geom,const Ice::Current &)
{
    cout << "Setting geometry, size " << geom.size() << " bytes" << endl;
    geometry = geom;
}
The relevent Slice code:
Code:
sequence<byte> ByteSeq;
...
interface SegmentI {
    ...
    void setGeometry(ByteSeq geom);
    ...
};
...
class PersistentPsu implements SegmentI {
    ...
    ByteSeq geometry;
};
When the client runs, it prints its message "Set geometry ......" successfully, but then dies with a Bus Error. The server does not print its message, but dies with the message 'terminate called after throwing an instance of 'Ice::UnmarshalOutOfBoundsException'

Does anyone have any ideas as to what might be causing this?
__________________
Chris Sammis
CSSM, http://www.cssm.iastate.edu
Reply With Quote