Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Gtk2 apps are seg-faulting my Tk apps

by zentara (Cardinal)
on Nov 15, 2005 at 18:37 UTC ( [id://508719]=perlquestion: print w/replies, xml ) Need Help??

zentara has asked for the wisdom of the Perl Monks concerning the following question:

This is is really weird problem. I have noticed that some Gtk2 apps are causing seg-faults in my Perl/Tk apps and killing them. So I'm wondering if anyone could try it on their linux system, and tell me if it happens to them.

First, to reproduce this, you need the latest gtk2 libs, and gtk+-2.8.6. Once you have them installed, start a Perl/Tk app, such as Tk ImageMap-color-zones, but others should die too. Then start the demo program for gtk+-2.8.6. When you double-click an item from the left list, to run it's demo(say Button Boxes), it will cause seg-faults in the Perl/Tk apps. If you restart the Perl/Tk app, the double-clicking will not cause the seg-fault. It only occurs the first time after the demo is started.

I ran strace on the perl script, and watched what happened just before the seg-fault, and the line

readv(3, [{"_GTK_LOAD_ICONTHEMES", 20}, {"", 0}], 2) = 20
is what occurs before the seg-fault.

I googled for _GTK_LOAD_ICONTHEMES and there seems to be some talk about it, but nothing as serious as killing Tk.

So can anyone shed some light?

I use the gtk-demo to demonstrate this, but I first saw it in my day-2-day use, when checking my mail with Sylpheed-Claws would kill my Perl/Tk tvguide program.

It would seem to me that the Gtk2 app should die if a fault occurs, how can it be jumping into Tk's space and crashing it?


I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re: Gtk2 apps are seg-faulting my Tk apps
by Aristotle (Chancellor) on Nov 15, 2005 at 18:50 UTC

    It can’t. My hunch would be that Tk has a bug in dealing with X11, and something which gtk2 does is triggering it. You should probably post this on a Tk developers mailing list somewhere.

    Makeshifts last the longest.

Re: Gtk2 apps are seg-faulting my Tk apps
by Courage (Parson) on Dec 18, 2005 at 21:52 UTC
    Its good you spent time and posted bug report -- this way you certainly adding some amount on helping module evolve.
    It seems to me posting here is not really on-the-topic, however.

    In the meantime, did you tried same problem within Tcl/Tk, (so to help to isolate problem)?

    Best regards,
    Courage, the Cowardly Dog

      I posted it here because the type of readers, who comes to perlmonks, tends to be on the lookput for Perl problems and their solutions. So I mention it as a "heads-up" , that it is likely that quite a few newbies will be asking how to solve the problem of their Tk apps segfaulting for some unknown reason, and this is most likely the answer.

      And it is a Perl problem, it did not affect Tcl/Tk.


      I'm not really a human, but I play one on earth. flash japh
        unfortunately I no more see your links to bugreports you've pointed earlier.

        Last time I saw conflict with perl/Tk is a symbol with same name within .so library; but your current error is probably much more complicated than that, so I hardly can be of help here...
        I hope you'll finaly figure out how to avoid the problem

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://508719]
Approved by jfroebe
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-12-08 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (50 votes). Check out past polls.