Hi, This code compiles and runs just fine for me. Test your code on another machine as your system-libraries might be corrupted.
The only library call in the generated ccode is g_type_init
(at least when you forget to pass --target-glib to valac).
Compile the following code with
"gcc test.c `pkg-config gobject-2.0 --cflags --libs` -o test"
and see if the violation is still happening:
#include <glib-object.h>
int main (int argc, char ** argv) {
g_type_init ();
}
If it does, reinstall glib. You can also check where the error is
happening exactly using gdb.
Regards,
Richard
On Sat, Mar 08, 2014 at 03:52:52AM -0200, Flavio Danesse wrote:
> public static int main (string[] args) {
> int x = 0;
> x++;
> return 0;
> }
>
>
> 2014-03-08 3:34 GMT-02:00 Nor Jaidi Tuah <[email protected]>:
>
> On Sat, 2014-03-08 at 00:10 -0200, Flavio Danesse wrote:
> > > int x = 0;
> > > x += 1;
> > > Violation segment (`core 'generated)
> > >
> > > int x = 0;
> > > x ++;
> > > Violation segment (`core 'generated)
> > >
> > > int x = 0;
> > > x = x + 1;
> >
> > I don't think you will get useful answers
> > unless you provide more context.
> >
> > Those statements by themselves are harmless.
> > But if, say, they are executed within the
> > context of an object that is already
> > freed, then... boom, you get a core.
pgpuAgcb13mNm.pgp
Description: PGP signature
_______________________________________________ vala-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/vala-list
