Hi Mayank, did you find out why this was happening? I'm seeing the exact
same backtrace.
On Tuesday, June 18, 2019 at 11:02:09 PM UTC-7, Mayank Jha wrote:
>
> I am getting the *runtime error: invalid memory address or nil pointer
> dereference, *with the following stack trace, but only occasionally when
> I try to proto.Marshal() a proto message.
>
> [{"file":"/go/src/github.com/carousell/Cats/Cats/analytics/analytics.go",
>> "line":92,"function":"(*producer).Produce.func1"},{"file":
>> "/usr/local/go/src/runtime/asm_amd64.s","line":573,"function":"call32"},{
>> "file":"/usr/local/go/src/runtime/panic.go","line":502,"function":
>> "gopanic"},{"file":"/usr/local/go/src/runtime/panic.go","line":63,
>> "function":"panicmem"},{"file":"/usr/local/go/src/runtime/signal_unix.go"
>> ,"line":388,"function":"sigpanic"},{"file":
>> "/usr/local/go/src/unicode/utf8/utf8.go","line":483,"function":
>> "ValidString"},{"file":"/go/src/
>> github.com/carousell/Cats/vendor/github.com/golang/protobuf/proto/table_marshal.go
>> ","line":2074,"function":"appendUTF8StringValueNoZero"},{"file":"/go/src/
>> github.com/carousell/Cats/vendor/github.com/golang/protobuf/proto/table_marshal.go
>> ","line":270,"function":"(*marshalInfo).marshal"},{"file":"/go/src/
>> github.com/carousell/Cats/vendor/github.com/golang/protobuf/proto/table_marshal.go
>> ","line":2264,"function":"makeMessageSliceMarshaler.func2"},{"file":
>> "/go/src/
>> github.com/carousell/Cats/vendor/github.com/golang/protobuf/proto/table_marshal.go
>> ","line":270,"function":"(*marshalInfo).marshal"{"file":"/go/src/
>> github.com/carousell/Cats/vendor/github.com/golang/protobuf/proto/table_marshal.go
>> ","line":2234,"function":"makeMessageMarshaler.func2"},{"file":"/go/src/
>> github.com/carousell/Cats/vendor/github.com/golang/protobuf/proto/table_marshal.go
>> ","line":270,"function":"(*marshalInfo).marshal"},{"file":"/go/src/
>> github.com/carousell/Cats/vendor/github.com/golang/protobuf/proto/table_marshal.go
>> ","line":141,"function":"(*InternalMessageInfo).Marshal"},{"file":
>> "/go/src/github.com/carousell/Cats/Cats/Cats_proto/analytics.pb.go",
>> "line":447,"function":"(*AdRequestMsg).XXX_Marshal"},{"file":"/go/src/
>> github.com/carousell/Cats/vendor/github.com/golang/protobuf/proto/table_marshal.go
>> ","line":2715,"function":"Marshal"}]
>>
>>
> Have omitted the initial part of the stack trace. Can someone tell me
> when all could this happen ? Could it be because of a difference in
> protobuf library versions ? I am unable to get the message, as when the
> panic happens when the serialization is taking place. Any ideas on how to
> approach this kind of problem ?
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/02f51f3d-b96a-439e-ae30-d9d89d7aebcbo%40googlegroups.com.