Home Help Center

Ice 3.6.0 slice2java Slicing Issues

tpologrutotpologruto Member Tom PologrutoOrganization: Capstone ConsultingProject: OMS
The issue is in decoding class member variables. When a member variable resides in a class that inherits from another class then slice2java erroneously generates source files. This results in an issue where an Ice application is able to publish this object but the receiver cant decode it. This is explained in more details below. Also attached a sample Ice file which can be used to replicate this problem.

Slicing Test.ice will generate multiple source files. The erroneous source file is à decode_test/TestClass.java
  • An internal class named “Patcher” is used to resolve the two member variables.
  • __readImpl method uses indices 1 and 2 for reading first and second variable respectively.
  • Patcher is expecting indices 0 and 1 to resolve first and second variable respectively.
  • This will raise an error when the patcher tries to resolve the first variable.
//Test.ice

#ifndef CAP_TEST_ICE
#define CAP_TEST_ICE

module decode_test{
class MemberClassOne{
long longValueOne;
};
class MemberClassTwo{
long longValue2;
};
class MemberClassThree{
long longValue3;
};

class SuperClassOne{
MemberClassOne memberOne;

};

class TestClass extends SuperClassOne{

MemberClassTwo memberTwo;
MemberClassThree memberThree;
};

};


#endif

Comments

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Tom,

    Thanks for reporting the issue, I have tested you sample and this is indeed a bug in the slice2java Slice compiler, it also affects the slice2cs compiler. I have push a fix for this issue to the 3.6 branch on ice repository.
  • tpologrutotpologruto Member Tom PologrutoOrganization: Capstone ConsultingProject: OMS
    Thanks! Are you updating the RPMs too?
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Tom,

    The fix will be included in the next Ice release, but we don't update our RPMs until there is a new release.
  • jbureljburel Member jean marie burelOrganization: University of DundeeProject: Data management platform for imaging data.
    Hi Jose
    Do you have a date set for a 3.6.2 release?
    The reason I am asking is that
    We have now updated our project to support both ice 3.5 and ice 3.6.
    We ran numerous tests on various platforms for that we built from source using your 3.6 branch.
    Before preparing our own rpms, I wanted to double-check your timeline.

    Regards
    jmarie
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Jean,

    We don't have a release date for 3.6.2 at this point
Sign In or Register to comment.