Re: Problems on Gtk2->init



Leonardo Trentini Lang said:
Hi.

I'm a happy Slackware 9 user and Gtk2 fan, but not so happy lately. I've
downloaded, unpackaged and instaled ExtUtils-Depends, Glib-0.94 and Gtk2-0.94,
and all went well. Then I've tried, without success, start a perl script that
contais Gtk2 code.

As I had experience with Gtk1.2 programming with perl and a little bit of XS
knowledge, i've started debugging the library. And i found something very
strange: all code works very well, except when it reaches any of these
statments:

gtk_init(&argc, &argv);

and

RETVAL = gtk_init_check(&argc, &argv);

Then, the program freezes, and stays that way until interrupted. Reading the
comments about argv[] and argc, i've placed g_new0's and g_strlcpy's on them
so
the code would realocate space for argv[] and not use strings returned by
perl.
And nothing changed.

Well, as I might suspect, it should be a problem with initialization of Gtk2,
not gtk2-perl. However, i use Gnome2 as my desktop, and it works pretty well.

Then i downloaded older releases, and had success using gtk2-perl-0.26. All
works well. Gtk2-0.90 didn't worked either. By the way, i've tried the library
in two (or three) different machines, all running Slackware 9.

what is the result of running 'make test' in the Glib and Gtk2 directories? do
they hang as well?

when you compile a Gtk2 C program like:
http://www.gtk.org/tutorial/ch-gettingstarted.html
does it seem to work ok?

its odd that 0.26 would work, but 0.9x didn't. there's been very little (if
any) change to the code involved with init.

-rm



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]