Re: [Vala] Fwd: Possible bug of seg fault when array returned
- From: Daniel Espinosa <esodan gmail com>
- To: Megh Parikh <meghprkh gmail com>
- Cc: Vala-list <vala-list gnome org>
- Subject: Re: [Vala] Fwd: Possible bug of seg fault when array returned
- Date: Wed, 24 Feb 2016 09:15:03 -0600
In your code you just initialize objects at 4 and 6, then when try iterates
over first ones you access to uninitialized objects.
Try to create an empty array {} then use += to add objects to it. This way
you should create smallest array with all its members initialized.
El feb. 24, 2016 8:21 AM, "Megh Parikh" <meghprkh gmail com> escribió:
When returning an array of objects from a method (static in my case),
trying to access the objects gives segfault. This may be a bug as I
think the objects are freed before the code ends but I dont know for
sure so I am posting in mailing list instead of Bugzilla
Dummy code (25 line) :
https://gist.github.com/meghprkh/0147641f7b57466def19
Regards,
Megh Parikh
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]