-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
null pointer exception - decoding "null" type #432
Comments
Can you provide a small bit a of code that reproduces the issue? |
Schema:
Base64 avro encoded value:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using
ocf.NewDecoder(r)
on a random avro file, the Decode operation panics due to a null pointer exception from hamba/avro. The issue is thatnewEfaceDecoder
inside codec_dynamic does not check the error ofgenericReceiver
and proceeds with a niltyp
value, which causes a null pointer exception later in the code.One fix could be to add a
Null
condition ingenericReceiver
in codec_generic.go:That at least results in a "avro: schema type null in unsupported" error rather than a NPE. Ideally errors should also not be ignored, and turned into some sort of error upward.
The text was updated successfully, but these errors were encountered: