perlmeditation
zentara
<b>UPDATE Dec 22, 2005 Nick Ing-Simmons( Perl/Tk authority) has said it would be cleaner to use
<code>
if( interp){
LangClientMessage(winPtr->mainPtr->interp, (Tk_Window) winPtr, eventPtr);
}
</code>
</b><p>
Hi, I first asked this question in [id://508719]. It turned out that Gtk2 apps using the gtk+ lib at a version level greater than 2.8.0, would cause Perl/Tk apps to segfault, when a gtk button was clicked. This problem is becoming more widely noticed as people upgrade to newer distribution levels, which use > 2.8.6 level of the Gtk2 libs. The bug was reported in
<a href=http://rt.cpan.org/NoAuth/Bug.html?id=16053> Tk report </a> and < a href=http://bugzilla.ubuntu.com/show_bug.cgi?id=21176> Ubuntu report </a><p>Anyways, a possible fix may have been found if you experience it. <p>
Change tkEvent.c line 989 from
<code>
LangClientMessage(winPtr->mainPtr->interp, (Tk_Window) winPtr, eventPtr);
</code>
to
<code>
if (eventPtr && winPtr && winPtr->mainPtr) {
LangClientMessage(winPtr->mainPtr->interp, (Tk_Window) winPtr, eventPtr);
}
</code>
<p>This fix has not been analyzed as to the ramifications it may have elsewhere in Tk, but it seems to work OK. Any comments on it's side effects, or improvements to it are welcome.<p> And of course, keeps your eyes and ears open for people complaining about Tk segfaulting, and point them to this. Thanks.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-131741">
<hr />
I'm not really a human, but I play one on earth.
<a href = http://zentara.net/japh.html>flash japh</a>
</div></div>