Opened 13 years ago

Closed 13 years ago

#27210 closed defect (fixed)

py26-gobject: Segmentation Fault triggered by accessing any gobject property via the x.props.{propertyname}

Reported by: michael+trac-macports@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: michael+trac-macports@…, bonoba@…
Port: py26-gobject

Description

I have an issue with py26-gtk giving a segmentation fault.

I already filed a bug report here as it is "meld" that I'm trying to get working: https://bugzilla.gnome.org/show_bug.cgi?id=633257

As mentioned here: https://bugzilla.gnome.org/show_bug.cgi?id=633257#c3 ... Running the following in python will generate a segmentation fault:

>>> import gtk
>>> a = gtk.Window()
>>> a.show()
>>> a.props.title="Foo"
>>> print a.props.title

Attachments (2)

pygobject-pygi_h.patch (618 bytes) - added by bonoba@… 13 years ago.
patch to avoid segfaults when accessing props.*
patch-gi_pygi.h (284 bytes) - added by rmstonecipher@… 13 years ago.
Patch recreated to be used with standard 'patchfiles' port argument

Download all attachments as: .zip

Change History (17)

comment:1 Changed 13 years ago by michael+trac-macports@…

Cc: michael+trac-macports@… added

Cc Me!

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: michael+trac-macports@… removed
Keywords: blocker removed
Owner: changed from macports-tickets@… to mcalhoun@…
Priority: HighNormal
Summary: Segmentation Fault triggered by accessing any gobject property via the x.props.{propertyname}py26-gobject: Segmentation Fault triggered by accessing any gobject property via the x.props.{propertyname}

comment:3 Changed 13 years ago by michael+trac-macports@…

Here is some more information I forgot to add:

$ uname -a
Darwin sinner.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
$ ls -la `which python`
lrwxr-xr-x  1 root  admin  24 Oct 22 23:59 /opt/local/bin/python -> /opt/local/bin/python2.5
$ port info python25
python25 @2.5.5, Revision 1 (lang)
Variants:             universal
$ port info py25-gtk
py25-gtk @2.22.0 (python, x11)
Variants:             universal
$ port info py25-gobject
py25-gobject @2.26.0 (python, gnome)
Variants:             universal

comment:4 Changed 13 years ago by michael+trac-macports@…

Cc: michael+trac-macports@… added

Cc Me!

Changed 13 years ago by bonoba@…

Attachment: pygobject-pygi_h.patch added

patch to avoid segfaults when accessing props.*

comment:5 Changed 13 years ago by bonoba@…

Looks like gentoo guys have already fixed this bug: https://bugzilla.gnome.org/show_bug.cgi?id=634206

See the attachment (pygobject-pygi_h.patch).

I applied it and now meld 1.4 works fine. Cheers.

comment:6 Changed 13 years ago by bonoba@…

Cc: bonoba@… added

Cc Me!

comment:7 in reply to:  5 Changed 13 years ago by michael+trac-macports@…

Replying to bonoba@…:

Looks like gentoo guys have already fixed this bug: https://bugzilla.gnome.org/show_bug.cgi?id=634206

See the attachment (pygobject-pygi_h.patch).

I applied it and now meld 1.4 works fine. Cheers.

OK, thanks already for your input, but how and when do you patch the file (and where)?
I know how to use patch -p0 < patchfile

I assume you need to use

sudo port fetch py26-gobject
sudo port extract py26-gobject

first and then apply the patch to the pygi.h file?
Is that correct? Where will the file be located? When that is patched, I can just remove and install meld?

comment:8 Changed 13 years ago by bonoba@…

Yes, Michael, you can do it that way too, but I did it a bit differently by using the macports workflow like this:

  • cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/python/py26-gobject
  • mkdir files
  • cp /Users/michael/Downloads/pygobject-pygi_h.patch files/patch-segfault
  • vim Portfile

# add the following somewhere, say after checksums:

patch.pre_args -p1 patchfiles patch-segfault

  • port -v upgrade --force -n py26-gobject

# watch for the lines saying "Applying the patch from /opt/local/...../patch-segfault" # .... Hunk #1 succeded (offset 3) <- that's okay

good luck.

comment:9 in reply to:  8 ; Changed 13 years ago by bonoba@…

Replying to bonoba@…:

  • vim Portfile

# add the following somewhere, say after checksums:

patch.pre_args  -p1
patchfiles      patch-segfault

comment:10 in reply to:  9 Changed 13 years ago by michael+trac-macports@…

Replying to bonoba@…:

Replying to bonoba@…:

  • vim Portfile

# add the following somewhere, say after checksums:

patch.pre_args  -p1
patchfiles      patch-segfault

Thank you very much.

Worked like a charm. :)

I haven't seen a way to mark this ticket as solved, but I unchecked the "leave as new" Action below.
I don't know if that is enough.
Anyway, the issue is fixed as far as I'm concerned.

comment:11 Changed 13 years ago by rmstonecipher@…

I can confirm that this patch also fixes #27200.
I have recreated the patch using MacPorts' standard 'diff -u' method and will commit the change with Marcus' permission.

Changed 13 years ago by rmstonecipher@…

Attachment: patch-gi_pygi.h added

Patch recreated to be used with standard 'patchfiles' port argument

comment:12 Changed 13 years ago by rmstonecipher@…

Resolution: fixed
Status: newclosed

Fix committed in r73412.

comment:13 Changed 13 years ago by macports@…

Resolution: fixed
Status: closedreopened

I just updated MacPorts and py26-gobject (to 2.26.0_1). I still get a Segmentation Fault when I launch meld.

comment:14 in reply to:  13 Changed 13 years ago by eddieh (Eddie Hillenbrand)

Replying to macports@…:

I just updated MacPorts and py26-gobject (to 2.26.0_1). I still get a Segmentation Fault when I launch meld.

I was getting this segmentation fault after recently running 'port selfupdate' and then 'port upgrade outdated.' The current version of the meld portfile specifies python25. Since meld was working before I upgraded my ports I tried activating the older ports that were still installed as follows:

sudo port -f activate py25-gobject @2.18.0_0 sudo port -f activate py25-gnome @2.26.1_1 sudo port -f activate py25-gtk @2.16.0_0

After that meld launched and works fine. No segfaults.

comment:15 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: reopenedclosed

Closing as per comment:14.

Note: See TracTickets for help on using tickets.