I have an application in Java which communicates with a C++
application using protobuf messages (with an extension set on some
messages). Recently, I've received a very weird error exception while
parsing a message:

com.iar.ide.debugger.cdp.CDPException: invalid argument
        at
com.iar.ide.debugger.cdp.CDPCommandStream.readDebugCommand(CDPCommandStream.java:
118)
        at
com.iar.ide.debugger.cdp.CDPCommandManager.readerLoop(CDPCommandManager.java:
131)
        at com.iar.ide.debugger.cdp.CDPCommandManager.access
$0(CDPCommandManager.java:129)
        at com.iar.ide.debugger.cdp.CDPCommandManager
$ReaderThread.run(CDPCommandManager.java:76)
Caused by: java.lang.IllegalArgumentException: This type does not have
extensions.
        at com.google.protobuf.GeneratedMessage
$FieldAccessorTable.getField(GeneratedMessage.java:1013)
        at com.google.protobuf.GeneratedMessage$FieldAccessorTable.access
$100(GeneratedMessage.java:954)
        at com.google.protobuf.GeneratedMessage
$Builder.newBuilderForField(GeneratedMessage.java:186)
        at com.google.protobuf.AbstractMessage
$Builder.mergeFieldFrom(AbstractMessage.java:374)
        at com.google.protobuf.GeneratedMessage
$ExtendableBuilder.parseUnknownField(GeneratedMessage.java:653)
        at com.iar.ide.debugger.cdp.proto.CDP$DebugCommand
$Builder.mergeFrom(CDP.java:25052)
        at com.iar.ide.debugger.cdp.proto.CDP$DebugCommand
$Builder.mergeFrom(CDP.java:1)
        at com.google.protobuf.AbstractMessage
$Builder.mergeFrom(AbstractMessage.java:182)
        at com.google.protobuf.AbstractMessageLite
$Builder.mergeFrom(AbstractMessageLite.java:187)
        at com.google.protobuf.AbstractMessage
$Builder.mergeFrom(AbstractMessage.java:658)
        at com.google.protobuf.AbstractMessage
$Builder.mergeFrom(AbstractMessage.java:182)
        at com.google.protobuf.AbstractMessageLite
$Builder.mergeFrom(AbstractMessageLite.java:177)
        at com.google.protobuf.AbstractMessage
$Builder.mergeFrom(AbstractMessage.java:650)
        at com.iar.ide.debugger.cdp.proto.CDP$DebugCommand.parseFrom(CDP.java:
24749)
        at
com.iar.ide.debugger.cdp.CDPCommandStream.readDebugCommand(CDPCommandStream.java:
83)

The message itself is not corrupt, I have an isolated test case where
the message parses correctly. The exception only occurs when running
my application interactively, but before this exception appears,
several similar messages have been parsed correctly.

Any clueas? What does the "this type does not extensions" mean in a
case like this (where similar messages *with* extensions already have
been successfully parsed)? Has the extension registry been corrupted
somehow?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to