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

strange exception using IceStorm


I've been struggling with a piece of code that use IceStorm since a couple of days. This code was working fine with Ice 1.3 but not with Ice 2.0.0. I first taugth about an error in my application but then I modified the clock demo included in the Ice distribution to use my own slice definitions and replaced the ClockI class by my own implementation class. Except these two changes the code is the same as the original demo application.
When I run the subscriber, I get the following error:
[ icebox-IceStorm: TopicManager: creating new topic "ProcessorMonitor" ]
icebox-IceStorm: warning: dispatch exception: ../../include/Ice/BasicStream.h:118: Ice::UnmarshalOutOfBoundsException:
protocol error: out of bounds during unmarshaling
identity: ProcessorMonitor
operation: subscribe

Since the original clock demo is running without error I suspect there is something wrong with my slice definition but I can not figure it out. I've attached my .ice file and the implementation files in the hope that someone can help me.


  • mes
    mes California
    In order to investigate this we would need a complete example, including the source code for the client (publisher) and server (subscriber).

    Take care,
    - Mark
  • Mark,

    I found what the problem is, at least in the modified demo.
    Shame on me, I simply forgot to rename the subscriber endpoint property from Clock.Subscriber.Endpoints=tcp to ProcessorMonitor.Subscriber.Endpoints=tcp because I changed the name of the adapter in the subscriber to "ProcessorMonitor.Subscriber".

    I know that one should not do such stupid mistake in normal circumstances but I'm sure that you will agree that it is very difficult to deduce from the error message what the real error is. Do you think it would be possible to change the code of Ice to produce a more informative error message, like "No Endpoints property defined for object xxxx" ?

    Now I'm going back to my real application. In this case the error occurs on the publisher side when the getPublisher() method is invoked but I guess that the cause of the error is the same.

  • mes
    mes California

    I believe the UnmarshalOutOfBoundsException is being caused by a bug in Ice 2.0 that is triggered when attempting to unmarshal a proxy with no endpoints. This bug will be fixed in the next release.

    - Mark
  • yes, that seems to be confirmed by the fact that I recompiled my real application, not the demo, to use Ice 1.5.1 instead of 2.0.0 and I don't get that exception anymore. I think I'll stay with 1.5.1 for the time being. Do you have an estimate for the release date of next version ?

  • Ice 2.1.0 will most likely be available in January.