Exception in read/take_untyped

2 posts / 0 new
Last post
Offline
Last seen: 1 year 8 months ago
Joined: 04/28/2013
Posts: 38
Exception in read/take_untyped

Hi,

I have an application that's using PublicationBuiltinTopicDataDataReader to dynamically discover new writers, after which it creates a new topic with a DataReader using Dynamic Data with the type-code that was discovered.

I test it using a regular DataWriter to publish some data. If I run the DataWriter and the Dynamic reader application in different java processes - everything works fine.

If I run them both in the same java process - I get: "java.lang.IllegalStateException: expected sequence of length 1; found 0" in pull_data_sequence_from_native

Does anyone know what this error means? Any leads as to why it occurs only when the writer and the reader are running in the same application and not when they run in separate applications?

Thanks,

Michael

gianpiero's picture
Offline
Last seen: 6 months 1 week ago
Joined: 06/02/2010
Posts: 174

Michael,

whithout having a look to the code this will be just a wild guess: sounds to me that after the read you try to access a sequence that has no samples. Is that possible? Can you check the lenght of the sequence before trying to access the sample or the info sequence?

Can you post some code snippet?

Best,
   Gianpiero