gedit crashes on launch, fails import of _gtk

Bug #872462 reported by Rick McBride
58
This bug affects 9 people
Affects Status Importance Assigned to Milestone
bzr-gtk (Ubuntu)
Fix Released
Undecided
Michael Terry
Oneiric
Invalid
Undecided
Michael Terry
Precise
Fix Released
Undecided
Unassigned
gedit-developer-plugins (Ubuntu)
Fix Released
Undecided
Michael Terry
Oneiric
Fix Released
Undecided
Michael Terry
Precise
Fix Released
Undecided
Unassigned

Bug Description

update-manager -d from Natty to Oneiric. Attempted to edit a file with gedit, and got:

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type `PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer' class size
  from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed
  from gtk import _gtk

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gedit 3.2.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Tue Oct 11 15:25:40 2011
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gedit
UpgradeStatus: Upgraded to oneiric on 2011-10-11 (0 days ago)

Revision history for this message
Rick McBride (rmcbride) wrote :
Revision history for this message
Rick McBride (rmcbride) wrote :

This only occurs when gedit-developer-plugins is installed. removing the package removes the error

affects: gedit (Ubuntu) → gedit-developer-plugins (Ubuntu)
Revision history for this message
Rick McBride (rmcbride) wrote :

removed gedit-developer-plugins, noted that the load fail doesn't occur. reinstalled, and again all is fine until I start enabling plugins. As soon as I checkbox the first one, teh crash behavior returns. (the BZR plugin in this case)

Curtis Hovey (sinzui)
tags: added: gtk3
Revision history for this message
Curtis Hovey (sinzui) wrote :

bzr-gtk is a gtk2 app, but gedit is a gtk3 app. The two APIs cannot coexisit in the same process. This is a GTK limitation. gedit-developer-plugin are already gtk3 as is implied in the earlier comments

The work-around it to use the gtk3 version of bzr-gtk. It is no packaged, so no gtk3 app can use bzr-gtk from Ubuntu's archives. Nor is there a package in a PPA of the gtk3 version. You can install the proper code using the command line by tying:

    cd ~/.bazaar/plugins
    bzr branch lp:bzr-gtk/gtk3 gtk

Restart gedit and enable the bzr plugin.

Changed in gedit-developer-plugins (Ubuntu):
status: New → Fix Released
Revision history for this message
Curtis Hovey (sinzui) wrote :

I am marking this as fixed released since the problem is in another package. The alternate approach it to change the deps to no install bzr-gtk so that gdp will not try to use it. A more drastic approach would be to include the working version of bzr-gtk in the gedit package to ensure users get the correct version.

Revision history for this message
Michael Terry (mterry) wrote :

I think a good fix for this would be to stop distributing the gedit plugin for oneiric. And to update it to gtk3 one for precise.

Changed in bzr-gtk (Ubuntu):
assignee: nobody → Michael Terry (mterry)
Revision history for this message
Rick McBride (rmcbride) wrote :

Confirmed this workaround resolved the issue I was seeing.

Revision history for this message
Michael Terry (mterry) wrote :

Upon investigation, there is no way to simply disable the gedit plugin in bzr-gtk, since there isn't one. bzr-gtk is being used directly from gedit-developer-plugins, which actually has support for the plugin not existing and does something sane in that case. So I'm going to modify gedit-developer-plugins in oneiric to just always assume the plugin isn't installed and thus won't touch it.

Changed in gedit-developer-plugins (Ubuntu):
status: Fix Released → Triaged
Changed in bzr-gtk (Ubuntu):
status: New → Invalid
Changed in gedit-developer-plugins (Ubuntu):
assignee: nobody → Michael Terry (mterry)
Revision history for this message
Curtis Hovey (sinzui) wrote :

I did the same think when I first update gedit-developer-plugins to gtk3. Hack plugins/gdp/bzr.py to do:
    HAS_BZR_GTK = False

I would have thought changing the packaging deps to not require bzr-gtk would be an easier fix.

Revision history for this message
Michael Terry (mterry) wrote :

It would be, but that won't prevent someone from installing bzr-gtk. We could also add a conflicts, but there's no need to prevent both from being installed if we can just disable support in gdp itself.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Doh! You are correct.

Revision history for this message
Michael Terry (mterry) wrote :

OK, I've uploaded a version of gedit-developer-plugins that does not use bzr-gtk to oneiric-proposed. This is a good candidate for an SRU because it introduces a crash regression in gedit.

To reproduce:
 * Install gedit-developer-plugins
 * Open gedit
 * Edit->Preferences->Plugins->Enable GDP Bazaar Integration

With the bug in place, gedit will crash.

Changed in gedit-developer-plugins (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Rick, or anyone else affected,

Accepted gedit-developer-plugins into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gedit-developer-plugins (Ubuntu Oneiric):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bzr-gtk (Ubuntu Precise):
status: New → Confirmed
Changed in gedit-developer-plugins (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Rick McBride (rmcbride) wrote :

I'm working to test the package in -proposed now.

Revision history for this message
Rick McBride (rmcbride) wrote :

removed the GTK3 plugin that I had installed as a temporary work around

upgraded to 0.5.4-0ubuntu1.1, and confirmed that the behavior does not exist
( * Edit->Preferences->Plugins->Enable GDP Bazaar Integration)
uninstalled gedit-developer-plugins
installed 0.5.4-0ubuntu1.1 fresh and confirmed that the behavior does not exist.
( * Edit->Preferences->Plugins->Enable GDP Bazaar Integration)

tags: added: verification-done
removed: verification-needed
Revision history for this message
Rick McBride (rmcbride) wrote :

Verified fix as noted above.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gedit-developer-plugins - 0.5.4-0ubuntu1.1

---------------
gedit-developer-plugins (0.5.4-0ubuntu1.1) oneiric-proposed; urgency=low

  * debian/patches/dont_use_bzr_gtk.patch:
    - Don't crash gedit by mixing gtk2 and gtk3 symbols in the same
      process. LP: #872462
 -- Michael Terry <email address hidden> Wed, 12 Oct 2011 15:59:32 -0400

Changed in gedit-developer-plugins (Ubuntu Precise):
status: Confirmed → Fix Released
Changed in gedit-developer-plugins (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

we're now shipping a bzr-gtk based on GTK3

Changed in bzr-gtk (Ubuntu Precise):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers