Re: [Vala] Fwd: Possible bug of seg fault when array returned



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]