You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Vikas Saxena <vi...@gmail.com> on 2014/11/28 00:03:52 UTC

avro_generic_value_free function implemetation not defined

Hi all,

I am using the Avro C AP version 1.7.7.

While invoking the avro_generic_value_free function, I get the error,
implementation not defined.

I looked through header file but couldn’t find the function.

Is this a known issue?

If yes, is there a patch available?

-- 
Thanks and regards,
Vikas Saxena.

Re: avro_generic_value_free function implemetation not defined

Posted by Mika Ristimaki <mi...@gmail.com>.
Hi Vikas,

To my understanding you only need to decref avro_value_t that you allocate with avro_generic_value_new. So you don’t need to decref values that you get from avro_value_get_by_name. You can run your example program with valgrind to verify this.

-Mika

> On 03 Dec 2014, at 02:44, Vikas Saxena <vi...@gmail.com> wrote:
> 
> Hi all,
> Any updates on the nested record thing?
> 
> Thanks,
> Vikas
> 
> On Sun, Nov 30, 2014 at 11:31 AM, Vikas Saxena <vi...@gmail.com> wrote:
> Thanks Doug,
> I am currently doing the same but the function avro_value_decref does not work as expected for nested records. 
> I am attaching my test code where I have modified the PERSON_SCHEMA to chnage the record "person" to have a sub-field "FullName" which in turn is a record containing two field firstname and lastname.
> 
> The problem is when I try to decref the avro variable for the sub-record, I get a segmentation fault.
> Attached is the source code for your reference. The issue occurs for line number 117 and 177.
> currently I have commented out those two lines.
> 
> If this program runs 24x7 to parse constantly generated files, do u think there can be a possibility of a memory leak if line 117 and 177 and are left commented out?
> 
> Thanks,
> Vikas
> 
> On Sun, Nov 30, 2014 at 6:12 AM, Douglas Creager <do...@creagertino.net> wrote:
> > While invoking the avro_generic_value_free function, I get the error,
> > implementation not defined.
> >
> > I looked through header file but couldn’t find the function.
> >
> > Is this a known issue?
> 
> That looks like a bug in the documentation.  Try avro_value_decref
> instead.
> 
> cheers
> –doug
> 
> 
> 
> -- 
> Thanks and regards,
> Vikas Saxena.
> 
> 
> 
> -- 
> Thanks and regards,
> Vikas Saxena.


Re: avro_generic_value_free function implemetation not defined

Posted by Mika Ristimaki <mi...@gmail.com>.
Hi Vikas,

To my understanding you only need to decref avro_value_t that you allocate with avro_generic_value_new. So you don’t need to decref values that you get from avro_value_get_by_name. You can run your example program with valgrind to verify this.

-Mika

> On 03 Dec 2014, at 02:44, Vikas Saxena <vi...@gmail.com> wrote:
> 
> Hi all,
> Any updates on the nested record thing?
> 
> Thanks,
> Vikas
> 
> On Sun, Nov 30, 2014 at 11:31 AM, Vikas Saxena <vi...@gmail.com> wrote:
> Thanks Doug,
> I am currently doing the same but the function avro_value_decref does not work as expected for nested records. 
> I am attaching my test code where I have modified the PERSON_SCHEMA to chnage the record "person" to have a sub-field "FullName" which in turn is a record containing two field firstname and lastname.
> 
> The problem is when I try to decref the avro variable for the sub-record, I get a segmentation fault.
> Attached is the source code for your reference. The issue occurs for line number 117 and 177.
> currently I have commented out those two lines.
> 
> If this program runs 24x7 to parse constantly generated files, do u think there can be a possibility of a memory leak if line 117 and 177 and are left commented out?
> 
> Thanks,
> Vikas
> 
> On Sun, Nov 30, 2014 at 6:12 AM, Douglas Creager <do...@creagertino.net> wrote:
> > While invoking the avro_generic_value_free function, I get the error,
> > implementation not defined.
> >
> > I looked through header file but couldn’t find the function.
> >
> > Is this a known issue?
> 
> That looks like a bug in the documentation.  Try avro_value_decref
> instead.
> 
> cheers
> –doug
> 
> 
> 
> -- 
> Thanks and regards,
> Vikas Saxena.
> 
> 
> 
> -- 
> Thanks and regards,
> Vikas Saxena.


Re: avro_generic_value_free function implemetation not defined

Posted by Vikas Saxena <vi...@gmail.com>.
Hi all,
Any updates on the nested record thing?

Thanks,
Vikas

On Sun, Nov 30, 2014 at 11:31 AM, Vikas Saxena <vi...@gmail.com>
wrote:

> Thanks Doug,
> I am currently doing the same but the function avro_value_decref does not
> work as expected for nested records.
> I am attaching my test code where I have modified the PERSON_SCHEMA to
> chnage the record "person" to have a sub-field "FullName" which in turn is
> a record containing two field firstname and lastname.
>
> The problem is when I try to decref the avro variable for the sub-record,
> I get a segmentation fault.
> Attached is the source code for your reference. The issue occurs for line
> number 117 and 177.
> currently I have commented out those two lines.
>
> If this program runs 24x7 to parse constantly generated files, do u think
> there can be a possibility of a memory leak if line 117 and 177 and are
> left commented out?
>
> Thanks,
> Vikas
>
> On Sun, Nov 30, 2014 at 6:12 AM, Douglas Creager <do...@creagertino.net>
> wrote:
>
>> > While invoking the avro_generic_value_free function, I get the error,
>> > implementation not defined.
>> >
>> > I looked through header file but couldn’t find the function.
>> >
>> > Is this a known issue?
>>
>> That looks like a bug in the documentation.  Try avro_value_decref
>> instead.
>>
>> cheers
>> –doug
>>
>
>
>
> --
> Thanks and regards,
> Vikas Saxena.
>



-- 
Thanks and regards,
Vikas Saxena.

Re: avro_generic_value_free function implemetation not defined

Posted by Vikas Saxena <vi...@gmail.com>.
Hi all,
Any updates on the nested record thing?

Thanks,
Vikas

On Sun, Nov 30, 2014 at 11:31 AM, Vikas Saxena <vi...@gmail.com>
wrote:

> Thanks Doug,
> I am currently doing the same but the function avro_value_decref does not
> work as expected for nested records.
> I am attaching my test code where I have modified the PERSON_SCHEMA to
> chnage the record "person" to have a sub-field "FullName" which in turn is
> a record containing two field firstname and lastname.
>
> The problem is when I try to decref the avro variable for the sub-record,
> I get a segmentation fault.
> Attached is the source code for your reference. The issue occurs for line
> number 117 and 177.
> currently I have commented out those two lines.
>
> If this program runs 24x7 to parse constantly generated files, do u think
> there can be a possibility of a memory leak if line 117 and 177 and are
> left commented out?
>
> Thanks,
> Vikas
>
> On Sun, Nov 30, 2014 at 6:12 AM, Douglas Creager <do...@creagertino.net>
> wrote:
>
>> > While invoking the avro_generic_value_free function, I get the error,
>> > implementation not defined.
>> >
>> > I looked through header file but couldn’t find the function.
>> >
>> > Is this a known issue?
>>
>> That looks like a bug in the documentation.  Try avro_value_decref
>> instead.
>>
>> cheers
>> –doug
>>
>
>
>
> --
> Thanks and regards,
> Vikas Saxena.
>



-- 
Thanks and regards,
Vikas Saxena.

Re: avro_generic_value_free function implemetation not defined

Posted by Vikas Saxena <vi...@gmail.com>.
Thanks Doug,
I am currently doing the same but the function avro_value_decref does not
work as expected for nested records.
I am attaching my test code where I have modified the PERSON_SCHEMA to
chnage the record "person" to have a sub-field "FullName" which in turn is
a record containing two field firstname and lastname.

The problem is when I try to decref the avro variable for the sub-record, I
get a segmentation fault.
Attached is the source code for your reference. The issue occurs for line
number 117 and 177.
currently I have commented out those two lines.

If this program runs 24x7 to parse constantly generated files, do u think
there can be a possibility of a memory leak if line 117 and 177 and are
left commented out?

Thanks,
Vikas

On Sun, Nov 30, 2014 at 6:12 AM, Douglas Creager <do...@creagertino.net>
wrote:

> > While invoking the avro_generic_value_free function, I get the error,
> > implementation not defined.
> >
> > I looked through header file but couldn’t find the function.
> >
> > Is this a known issue?
>
> That looks like a bug in the documentation.  Try avro_value_decref
> instead.
>
> cheers
> –doug
>



-- 
Thanks and regards,
Vikas Saxena.

Re: avro_generic_value_free function implemetation not defined

Posted by Vikas Saxena <vi...@gmail.com>.
Thanks Doug,
I am currently doing the same but the function avro_value_decref does not
work as expected for nested records.
I am attaching my test code where I have modified the PERSON_SCHEMA to
chnage the record "person" to have a sub-field "FullName" which in turn is
a record containing two field firstname and lastname.

The problem is when I try to decref the avro variable for the sub-record, I
get a segmentation fault.
Attached is the source code for your reference. The issue occurs for line
number 117 and 177.
currently I have commented out those two lines.

If this program runs 24x7 to parse constantly generated files, do u think
there can be a possibility of a memory leak if line 117 and 177 and are
left commented out?

Thanks,
Vikas

On Sun, Nov 30, 2014 at 6:12 AM, Douglas Creager <do...@creagertino.net>
wrote:

> > While invoking the avro_generic_value_free function, I get the error,
> > implementation not defined.
> >
> > I looked through header file but couldn’t find the function.
> >
> > Is this a known issue?
>
> That looks like a bug in the documentation.  Try avro_value_decref
> instead.
>
> cheers
> –doug
>



-- 
Thanks and regards,
Vikas Saxena.

Re: avro_generic_value_free function implemetation not defined

Posted by Douglas Creager <do...@creagertino.net>.
> While invoking the avro_generic_value_free function, I get the error,
> implementation not defined.
> 
> I looked through header file but couldn’t find the function.
> 
> Is this a known issue?

That looks like a bug in the documentation.  Try avro_value_decref
instead.

cheers
–doug