About the same file:
static PyObject*
unmarshalPyObjectEnum(cdrStream& stream, PyObject* d_o)
{ // repoId, name, item list
char * string_ = PyString_AsString(PyObject_Repr(d_o));
printf("%s\n", string_);
PyObject* t_o = PyTuple_GET_ITEM(d_o, 3);
OMNIORB_ASSERT(PyTuple_Check(t_o));
CORBA::ULong e;
e <<= stream;
cout << e << "\n";
if (e >= (CORBA::ULong)PyTuple_GET_SIZE(t_o))
OMNIORB_THROW(MARSHAL, MARSHAL_InvalidEnumValue,
(CORBA::CompletionStatus)stream.completion());
PyObject* ev = PyTuple_GET_ITEM(t_o, e);
Py_INCREF(ev);
return ev;
}
Result:
(17, 'IDL:Incognito/SNMPVersion:1.0', 'SNMPVersion',
(SNMP_V_UNKNOWN, SNMP_V1, SNMP_V2, SNMP_V3))
3219025932
omniORB: 2008-05-19 13:52:36.072857: throw MARSHAL from
pyMarshal.cc:3033 (NO,MARSHAL_InvalidEnumValue)
Note the extremely high value of 'e' variable.
Post by Marco FerreiraSorry for all my mails, but this is really intriguing me.
I've been hacking the following piece of code in pyMarshal.cc, to try to
static PyObject*
unmarshalPyObjectEnum(cdrStream& stream, PyObject* d_o)
{ // repoId, name, item list
char * string_ = PyString_AsString(PyObject_Repr(d_o));
printf("%s\n", string_);
PyObject* t_o = PyTuple_GET_ITEM(d_o, 3);
OMNIORB_ASSERT(PyTuple_Check(t_o));
CORBA::ULong e;
e <<= stream;
printf("e=%ld\n", e);
if (e >= (CORBA::ULong)PyTuple_GET_SIZE(t_o))
OMNIORB_THROW(MARSHAL, MARSHAL_InvalidEnumValue,
(CORBA::CompletionStatus)stream.completion());
PyObject* ev = PyTuple_GET_ITEM(t_o, e);
Py_INCREF(ev);
return ev;
}
(17, 'IDL:Incognito/SNMPVersion:1.0', 'SNMPVersion',
(SNMP_V_UNKNOWN, SNMP_V1, SNMP_V2, SNMP_V3))
e=-1075261268
omniORB: 2008-05-19 13:12:04.188990: throw MARSHAL from
pyMarshal.cc:3031 (NO,MARSHAL_InvalidEnumValue)
My question would be: how is it possible that 'e' value is below 0 since
it's declared as an unsigned long?
Post by Marco FerreiraThat was what I suspected, but unfortunately pyMarshel.cc still throws
that MARSHAL.
I'm sure both sides (including my proxy) have the same version. Could
there be any other reason for this?
Cheers
Post by Duncan GrisbyPost by Marco FerreiraCould any kind soul tell me if this a result of a bug at omniORB code by
any chance?
omniORB: 2008-05-15 18:59:33.076226: throw MARSHAL from
pyMarshal.cc:3026 (NO,MARSHAL_InvalidEnumValue)
This means that you have received an enum that claims to have a numeric
value larger than the largest defined enum item. Almost certainly that's
because the sender and receiver are using different versions of the IDL.
Check that both sides of the communication have the same IDL.
Cheers,
Duncan.