gedit snippets plugin stopped working with latest updates

Bug #862627 reported by Marc Deslauriers
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pygobject
Fix Released
Medium
pygobject (Ubuntu)
Fix Released
High
Martin Pitt
Oneiric
Fix Released
High
Martin Pitt

Bug Description

Since the last few days, the gedit snippets plugin has stopped working:

mdeslaur@mdlinux:~$ gedit
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/document.py", line 742, in on_view_key_press
    state = event.get_state()
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gdk.py", line 207, in cull_success
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
TypeError: Expected a Gdk.Event, but got EventKey
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/document.py", line 742, in on_view_key_press
    state = event.get_state()
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gdk.py", line 207, in cull_success
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
TypeError: Expected a Gdk.Event, but got EventKey
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/document.py", line 742, in on_view_key_press
    state = event.get_state()
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gdk.py", line 207, in cull_success
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
TypeError: Expected a Gdk.Event, but got EventKey
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/document.py", line 742, in on_view_key_press
    state = event.get_state()
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gdk.py", line 207, in cull_success
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
TypeError: Expected a Gdk.Event, but got EventKey
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/document.py", line 742, in on_view_key_press
    state = event.get_state()
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gdk.py", line 207, in cull_success
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
TypeError: Expected a Gdk.Event, but got EventKey
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/document.py", line 742, in on_view_key_press
    state = event.get_state()
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gdk.py", line 207, in cull_success
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
TypeError: Expected a Gdk.Event, but got EventKey
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/document.py", line 742, in on_view_key_press
    state = event.get_state()
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gdk.py", line 207, in cull_success
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
TypeError: Expected a Gdk.Event, but got EventKey

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gedit 3.2.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.19-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu2
Architecture: amd64
Date: Thu Sep 29 13:56:46 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110302)
SourcePackage: gedit
UpgradeStatus: Upgraded to oneiric on 2011-08-16 (44 days ago)

Related branches

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Oh, turns out this is a pygobject issue.

summary: - Snippets plugin stopped working with latest updates
+ gedit snippets plugin stopped working with latest updates
affects: gedit (Ubuntu) → pygobject (Ubuntu)
affects: gedit → pygobject
Changed in pygobject:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

The third patch in the upstream bug tracker resolves this issue for me, but hasn't made it's way to the git tree yet.

Changed in pygobject (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
Changed in pygobject:
status: New → Fix Released
Changed in pygobject (Ubuntu):
milestone: none → ubuntu-11.10
Changed in pygobject (Ubuntu Oneiric):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Fix uploaded. I confirm that this unbreaks Gdk.Event access by the snippets plugin. Apport, Jockey, software-center, software-properties-gtk, gnome-language-selector confirmed to work well with this version.

Changed in pygobject (Ubuntu Oneiric):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.0.0-0ubuntu2

---------------
pygobject (3.0.0-0ubuntu2) oneiric; urgency=low

  * Add 00git_access_union_members.patch: Fix accessing union members of
    structs again. This unbreaks e. g. GEdit plugins. Patch taken from
    upstream git head. (LP: #862627)
 -- Martin Pitt <email address hidden> Mon, 03 Oct 2011 14:45:57 +0200

Changed in pygobject (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Jimmy Merrild Krag (beruic) wrote :

It still doesn't work for me. I get:

(gedit:6088): Gtk-CRITICAL **: gtk_accel_label_set_accel_closure: assertion `gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/__init__.py", line 19, in <module>
    from windowactivatable import WindowActivatable
  File "/usr/lib/gedit/plugins/snippets/windowactivatable.py", line 29, in <module>
    class Activate(Gedit.Message):
  File "/usr/lib/gedit/plugins/snippets/windowactivatable.py", line 31, in Activate
    iter = GObject.property(type=Gtk.TextIter)
  File "/usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py", line 111, in __init__
    self.type = self._type_from_python(type)
  File "/usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py", line 202, in _type_from_python
    raise TypeError("Unsupported type: %r" % (type_,))
TypeError: Unsupported type: <class 'gi.overrides.Gtk.TextIter'>

(gedit:6088): libpeas-WARNING **: Error loading plugin 'snippets'

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 862627] Re: gedit snippets plugin stopped working with latest updates

Jimmy Merrild Krag [2011-10-19 10:24 -0000]:
> It still doesn't work for me. I get:

The package hasn't been accepted into -proposed yet. This bug will get
a notification once this happens.

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.