Re: [Vala] Seg Fault when using printf function



I apologize for the delay, but the bug has been submitted.

https://bugzilla.gnome.org/show_bug.cgi?id=791973
Steven N. Oliver


On Mon, Dec 11, 2017 at 7:13 AM, Daniel Espinosa <esodan gmail com> wrote:
Could you file a bug report in bugzilla in order to trace it up to fix it?

El 27/11/2017 1:25 a.m., "Steven Oliver" <oliver steven gmail com> escribió:

Hello,
I recently upgraded my OS to Ubuntu 17.10 from 16.04 and I think I've
discovered a bug in Vala.

This commit is now causing my application to crash:

https://github.com/steveno/balistica/commit/061a28e98f3c4468b4465e580ada78f11eec4461?diff=unified

I don't understand what changed in that commit that breaks the
application with my version of Vala versus the one I had on 16.04, but
I managed to trace it down to two lines (511 & 513) in
src/balistica_application.vala (which aren't changed in the diff !!).
If you comment out those two lines it will compile and produce the
drag calculation as expected.

I also figured out that if you change those two lines so that the
printf functions don't format more than two entries, it will also
compile and produce the expected output. With a third entry, though,
it seg faults trying to print the calculation results.

Will Seg Fault:
txtViewDragResults.buffer.text += ("Initial Velocity: %.2f ft/s Zero
Range: %.2f yards Shooting Angle: %.2f degrees\n").printf (lsln.getMv
(), lsln.getZerorange (), lsln.getAngle ()) ;

Will print as expected:
txtViewDragResults.buffer.text += ("Initial Velocity: %.2f ft/s Zero
Range: %.2f yards\n").printf (lsln.getMv (), lsln.getZerorange ()) ;

I have attached the C code that is generated.

Hopefully that wasn't to confusing. Anyone have any thoughts? Suggestions?

Steven N. Oliver

_______________________________________________
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]