Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 125275 - gtk2 > 2.8.0 apps are causing segfaults in Perl-Tk
Summary: gtk2 > 2.8.0 apps are causing segfaults in Perl-Tk
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL: http://rt.cpan.org/Public/Bug/Display...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-06 11:33 UTC by Wolfgang Dobler
Modified: 2006-07-08 09:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to go to /usr/portage/dev-perl/perl-tk/files/perl-tk-804.027-gtk-segfault.patch (perl-tk-804.027-gtk-segfault.patch,467 bytes, patch)
2006-03-06 11:38 UTC, Wolfgang Dobler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Dobler 2006-03-06 11:33:43 UTC
As is documented at http://rt.cpan.org/Public/Bug/Display.html?id=16053 , running Perl-Tk applications crash when Gtk2 applications start. A patch was also posted there.

To reproduce, run:

  ptked any_file & sleep 5 & zenity --info

This causes the crash at least on x86 and amd64 with perl-tk-804.027, gtk+-2.8.8, zenity-2.12.1 .

Here's a patch file for /usr/portage/dev-perl/perl-tk/files/ (I can mail it if required):

# -------------------------------------------------------------------------- #
--- pTk/mTk/generic/tkEvent_orig.c	2006-01-27 17:44:52.000000000 -0700
+++ pTk/mTk/generic/tkEvent.c	2006-01-27 17:46:31.000000000 -0700
@@ -986,7 +986,9 @@
 		TkWmProtocolEventProc(winPtr, eventPtr);
 	    } else {
 		/* Perl/Tk had/has its own hook for this */
+	      if (eventPtr && winPtr && winPtr->mainPtr) {
 		LangClientMessage(winPtr->mainPtr->interp, (Tk_Window) winPtr, eventPtr);
+	      }
 
 		/*
 		 * Finally, invoke any ClientMessage event handlers.
# -------------------------------------------------------------------------- #


and here is my patch for perl-tk-804.027.ebuild (which may, or may not be useful for you):


# -------------------------------------------------------------------------- #
*** /usr/portage/dev-perl/perl-tk/perl-tk-804.027.ebuild	Mon Jan 16 21:07:02 2006
--- /usr/local/portage/dev-perl/perl-tk/perl-tk-804.027_p1.ebuild	Fri Jan 27 17:51:50 2006
***************
*** 4,10 ****
  
  inherit perl-module eutils
  
! MY_P=Tk-${PV}
  S=${WORKDIR}/${MY_P}
  DESCRIPTION="A Perl Module for Tk"
  HOMEPAGE="http://search.cpan.org/~ni-s/${MY_P}/"
--- 4,13 ----
  
  inherit perl-module eutils
  
! #MY_P=Tk-${MY_PV}				# orig
! MY_P2=${P/_p[0-9]/}				# wd
! MY_PV=${PV/_p[0-9]/}			# wd
! MY_P=Tk-${MY_PV}				# wd
  S=${WORKDIR}/${MY_P}
  DESCRIPTION="A Perl Module for Tk"
  HOMEPAGE="http://search.cpan.org/~ni-s/${MY_P}/"
***************
*** 20,22 ****
--- 23,32 ----
  myconf="X11LIB=/usr/$(get_libdir)"
  
  mydoc="ToDo VERSIONS"
+ 
+ src_unpack() {
+ 	unpack ${A}
+ 	echo "Patch: <${FILESDIR}/${MY_P2}-gtk-segfault.patch>"
+ 	cd ${S}
+ 	epatch ${FILESDIR}/${MY_P2}-gtk-segfault.patch
+ }
# -------------------------------------------------------------------------- #
Comment 1 Wolfgang Dobler 2006-03-06 11:38:49 UTC
Created attachment 81548 [details, diff]
Patch to go to /usr/portage/dev-perl/perl-tk/files/perl-tk-804.027-gtk-segfault.patch

Sorry for having pasted patches in the description, but there wasn't any attachment option on the initial bug reporting page (which I find counter-intuitive).

I don't attach the .ebuild patch because it is in the description and you'll want to adapt it anyway.
Comment 2 Wolfgang Dobler 2006-03-28 22:35:32 UTC
The problem vanished after I upgraded from x11-libs/gtk+-2.8.8 to 2.8.12.

This still needs to get fixed in PerlTk at some point (segfaulting is bad, even if induced by other badly behaving applications), but it seems to be in the loop for the next release of PerlTk, and we can wait a year or two.

So feel free to mark the bug as FIXED or UPSTREAM -- I am not sure what the criteria are, so I leave this to the devs.

PS: It would have been nice to get at least some sort of feedback, but I imagine the perl horde has more urgent bugs to wrangle with.
Comment 3 Michael Cummings (RETIRED) gentoo-dev 2006-07-08 09:37:54 UTC
thanks :) (unfortunately, this sat for a while after your last post - sorry about that)