The Read() method of a struct of a thrift function which does not have arguments (e.g. foo()) calls iprot.ReadFieldBegin() to read the field type but does not consume/skip a field which it was not expecting.
Read() methods for argument parsers for methods which have arguments have the correct code in the default section of the switch statement.
This is the current code (I've added where the iprot.Skip() call is missing):
After the check for thrift.STOP there needs to be this code
We've found this because on the Java side we dynamically inject fields into the struct on call which are ignored on the Go side as long as the function has arguments. When we make a call to the no-argument function some bytes are not consumed and make the thrift code go out of sync.
I will attach a patch which fixes this.