Hi, Attached is a very simple Vala program which demonstrates a problem I'm having with 0.3.4. Basically, I'm trying to turn an identifier like "parse_file" from a VAPI into a Java identifier with camel casing ("parseFile")[1]. However compiling and running this test case causes a crash with glibc detecting a double free: $ valac doublefreetest.vala $ ./doublefreetest.vala Gee *** glibc detected *** ./doublefreetest: double free or corruption (fasttop): 0x0000000000606900 *** ======= Backtrace: ========= /lib/libc.so.6[0x7f930d76108a] /lib/libc.so.6(cfree+0x8c)[0x7f930d764c1c] ./doublefreetest[0x400c75] ./doublefreetest[0x400ab2] ./doublefreetest[0x400afc] /lib/libc.so.6(__libc_start_main+0xf4)[0x7f930d70b1c4] ./doublefreetest[0x400a09] Any ideas? Is it user error caused by my Java-addled brain making me not think about string memory allocation? Or is it a bug in Vala/GObject's ref counting? Cheers, Andrew [1] This is for a program which uses Vala.Parser and friends to output Java interfaces which can then be used with JNA[2] to provide OO access to libvala from the Valable Eclipse plugin[3] [2] https://jna.dev.java.net/ [3] New screenshots at http://tinyurl.com/valable-screenshots -- Andrew Flegg -- mailto:andrew bleb org | http://www.bleb.org/
Attachment:
doublefreetest.vala
Description: Binary data