[gedit-list] Crash when sending messages to Filebrowser plugin
- From: Robert Toscano <robert l toscano gmail com>
- To: gedit-list gnome org
- Subject: [gedit-list] Crash when sending messages to Filebrowser plugin
- Date: Wed, 23 Mar 2011 22:26:44 -0700
Hey guys,
I'm getting this funky crash when I send the "get_view" message to the Filebrowser plugin. Here is the source of a python plugin I've implemented that reproduces the behavior. The comments in the python code explain exactly how to reproduce the problem.
GEDIT-PLUGIN FILE:
Name=Filebrowser Crash Demonstration
Description=Demonstrates the Filebrowser plugin crashing when sending it a "get_view" message.
Authors=Robert Lopez Toscano
PLUGIN CODE:
class FilebrowserCrashDemoPlugin(gedit.Plugin):
"""To trigger the crash make sure you start gedit with the
Filebrowser-crash-demo plugin disabled and the Filebrowser plugin enabled.
1. Enable the Filebrowser-crash-demo plugin.
2. Disable the Filebrowser plugin.
3. Enable the Filebrowser plugin.
4. Disable the Filebrowser-crash-demo-plugin.
5. Enable the Filebrowser-crash-demo-plugin.
Expected behavior: step 5 should enable the Filebrowser-crash-demo-plugin
Actual behavior: step 5 causes gedit to seg fault.
gedit.Plugin.__init__(self)
def activate(self, window):
self._crash_demos[window] = FilebrowserCrashDemo(window)
def deactivate(self, window):
self._crash_demos[window].deactivate()
del self._crash_demos[window]
class FilebrowserCrashDemo(object):
def __init__(self, window):
self._mb_registered_conn = \
self._window.get_message_bus().connect_after('registered',
self._window.get_message_bus().handler_disconnect(self._mb_registered_conn)
def _on_mb_registered(self, bus, msg_type):
if msg_type.get_object_path() == 'plugins/filebrowser' and \
msg_type.get_method() == 'get_view':
gobject.timeout_add(1000, self._connect_with_fb)
def _connect_with_fb(self):
bus = self._window.get_message_bus()
if bus.is_registered('/plugins/filebrowser', 'get_view'):
bus.send_sync('/plugins/filebrowser', 'get_view')
I am not able to build the latest gedit on Ubuntu 11.04 so I am not able to test this on the latest build. I'm getting this autoconf error when I run autoconf on the latest source:
$ autoconf
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
Would anyone with the ability to build latest version of gedit be able to confirm that this is still a bug on the latest build of gedit?
--rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]