pygtkcompat crashes when using gtk2

Bug #1409193 reported by Ahmad Syukri Abdollah
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pygobject (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Running the following python script:

    import pygtkcompat
    pygtkcompat.enable_gtk(version='2.0')

crashes both python2.7 and python3.4.

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: python2.7-minimal 2.7.6-8
ProcVersionSignature: Ubuntu 3.13.0-43.72-generic 3.13.11.11
Uname: Linux 3.13.0-43-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Jan 10 12:06:49 2015
ExecutablePath: /usr/bin/python2.7
InstallationDate: Installed on 2014-06-07 (216 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
ProcCmdline: python trygtk2.py
SegvAnalysis:
 Segfault happened at: 0x7fd0cdd6d2ff <_pygi_argument_to_object+831>: cmpq $0x4c,(%rax)
 PC (0x7fd0cdd6d2ff) ok
 source "$0x4c" ok
 destination "(%rax)" (0xc6e00047d000083) not located in a known VMA region (needed writable region)!
SegvReason: writing unknown VMA
Signal: 11
SourcePackage: python2.7
StacktraceTop:
 _pygi_argument_to_object (arg=arg@entry=0x7fffac3511d0, type_info=type_info@entry=0x250ab20, transfer=transfer@entry=GI_TRANSFER_NOTHING) at ../../gi/pygi-argument.c:1434
 _wrap_g_constant_info_get_value (self=0x7fd0c7b8dd00) at ../../gi/pygi-info.c:1713
 PyEval_EvalFrameEx ()
 ?? ()
 ?? ()
Title: python2.7 crashed with SIGSEGV in _pygi_argument_to_object()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo www-data

Revision history for this message
Ahmad Syukri Abdollah (syockit) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 _pygi_argument_to_object (arg=arg@entry=0x7fffac3511d0, type_info=type_info@entry=0x250ab20, transfer=transfer@entry=GI_TRANSFER_NOTHING) at ../../gi/pygi-argument.c:1434
 _wrap_g_constant_info_get_value (self=0x7fd0c7b8dd00) at ../../gi/pygi-info.c:1713
 call_function (oparg=<optimized out>, pp_stack=0x7fffac351300) at ../Python/ceval.c:4004
 PyEval_EvalFrameEx (f=f@entry=0x253e2c0, throwflag=throwflag@entry=0) at ../Python/ceval.c:2666
 PyEval_EvalCodeEx (closure=<optimized out>, defcount=<optimized out>, defs=0x228b0a0, kwcount=<optimized out>, kws=<optimized out>, argcount=39051968, args=<optimized out>, locals=0x0, globals=<optimized out>, co=<optimized out>) at ../Python/ceval.c:3252

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in python2.7 (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
affects: python2.7 (Ubuntu) → pygobject (Ubuntu)
Revision history for this message
Martin Pitt (pitti) wrote :

This is a case of "just don't do that", I'm afraid. GTK 2 is very old and hasn't been maintained for like 5 years. At the time when gobject introspection came up we already had GTK 3, so any introspection stuff which happens to work with GTK 2 is pure luck.

information type: Private → Public
Changed in pygobject (Ubuntu):
status: New → Won't Fix
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, and pygtkcompat's purpose is to provide a pygtk like compat wrapper for PyGI + GTK 3. :-) If you have to use GTK 2 still, use the corresponding real pygtk. (But as I said, none of that is supported any more).

Revision history for this message
Ahmad Syukri Abdollah (syockit) wrote :

Noted.
I was scheming to update Zim to use gnome-introspection, but to ensure smooth transition to GTK3, I wanted to make sure it ran well on GTK2 first.
Looks like I have to go guerilla…

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 1409193] Re: pygtkcompat crashes when using gtk2

Ahmad Syukri Abdollah [2015-01-11 11:06 -0000]:
> I was scheming to update Zim to use gnome-introspection, but to
> ensure smooth transition to GTK3, I wanted to make sure it ran well
> on GTK2 first. Looks like I have to go guerilla…

Yeah, I'm afraid the GTK 2 → 3 and pygtk → GI transitions can't be
decoupled from each other. pygtkcompat might help quite a bit, but
it's also just a crutch. I think it's preferable to just port programs
all the way to clean GTK3+GI.

Thanks,

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.