Toggling extensions cause performance loss and eventual crash [$5]

Bug #1356041 reported by Cassidy James Blaede
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
High
Damian Czaja

Bug Description

When I toggle the spell checker plugin, Scratch crashes every time.

Luna, Scratch version: 2.0.2.1

Relevant output:

cassidyjames@System76-Luna:~/Projects/System76/rebrand$ scratch-text-editor
[_LOG_LEVEL_INFO 14:24:32.530911] Application.vala:77: Scratch version: 2.0.2.1
[_LOG_LEVEL_INFO 14:24:32.531178] Application.vala:79: Kernel version: 3.13.0-33-generic
[_LOG_LEVEL_DEBUG 14:24:32.538140] Settings.vala:158: Loading settings from schema 'org.pantheon.scratch.saved-state'
[_LOG_LEVEL_DEBUG 14:24:32.538471] Settings.vala:158: Loading settings from schema 'org.pantheon.scratch.settings'
[_LOG_LEVEL_DEBUG 14:24:32.539283] Settings.vala:158: Loading settings from schema 'org.pantheon.scratch.services'
[_LOG_LEVEL_DEBUG 14:24:32.627152] [Gtk] Connecting to session manager
[_LOG_LEVEL_DEBUG 14:24:32.708396] SplitView.vala:141: WelcomeScreen shown succefully
[_LOG_LEVEL_DEBUG 14:24:32.711950] Settings.vala:158: Loading settings from schema 'org.pantheon.scratch.plugins.folder-manager'
[_LOG_LEVEL_INFO 14:24:32.733495] Document.vala:119: Opening "configurator.mustache"
[_LOG_LEVEL_DEBUG 14:24:32.837266] SplitView.vala:149: WelcomeScreen hidden succefully
[_LOG_LEVEL_DEBUG 14:24:32.838332] SplitView.vala:87: View added succefully
[_LOG_LEVEL_INFO 14:24:32.909376] Document.vala:119: Opening "configurator.mustache"
[_LOG_LEVEL_WARN 14:24:32.936840] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:32.944258] Document.vala:119: Opening "config.js"
[_LOG_LEVEL_INFO 14:24:32.997445] Document.vala:119: Opening "ratel.json"
[_LOG_LEVEL_INFO 14:24:33.102596] Document.vala:119: Opening "configurator.mustache"
[_LOG_LEVEL_WARN 14:24:33.200426] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.208846] Document.vala:119: Opening "config.js"
[_LOG_LEVEL_WARN 14:24:33.263320] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.271592] Document.vala:119: Opening "ratel.json"
[_LOG_LEVEL_WARN 14:24:33.338895] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.346637] Document.vala:119: Opening "config.mustache"
[_LOG_LEVEL_INFO 14:24:33.424696] Document.vala:119: Opening "_config.scss"
[_LOG_LEVEL_INFO 14:24:33.493712] Document.vala:119: Opening "configurator.mustache"
[_LOG_LEVEL_WARN 14:24:33.579294] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.587505] Document.vala:119: Opening "config.js"
[_LOG_LEVEL_WARN 14:24:33.647312] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.655649] Document.vala:119: Opening "ratel.json"
[_LOG_LEVEL_WARN 14:24:33.715610] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.724494] Document.vala:119: Opening "config.mustache"
[_LOG_LEVEL_WARN 14:24:33.790114] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.797934] Document.vala:119: Opening "_config.scss"
[_LOG_LEVEL_WARN 14:24:33.850240] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.857982] Document.vala:119: Opening "configurator.mustache"
[_LOG_LEVEL_WARN 14:24:33.919641] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.928044] Document.vala:119: Opening "config.js"
[_LOG_LEVEL_WARN 14:24:33.984603] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:33.992268] Document.vala:119: Opening "ratel.json"
[_LOG_LEVEL_WARN 14:24:34.050606] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:34.058497] Document.vala:119: Opening "config.mustache"
[_LOG_LEVEL_WARN 14:24:34.120656] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:34.129374] Document.vala:119: Opening "_config.scss"
[_LOG_LEVEL_WARN 14:24:34.182670] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:34.190658] Document.vala:119: Opening "configurator.mustache"
[_LOG_LEVEL_WARN 14:24:34.252788] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:34.260759] Document.vala:119: Opening "config.js"
[_LOG_LEVEL_WARN 14:24:34.318771] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:34.326459] Document.vala:119: Opening "ratel.json"
[_LOG_LEVEL_WARN 14:24:34.388783] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:34.396172] Document.vala:119: Opening "config.mustache"
[_LOG_LEVEL_WARN 14:24:34.458870] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
[_LOG_LEVEL_INFO 14:24:34.466868] Document.vala:119: Opening "_config.scss"
[_LOG_LEVEL_WARN 14:24:34.524133] DocumentView.vala:102: This Document was already opened! Not opening a duplicate!
Segmentation fault

Tags: bounty

Related branches

Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

Note: by toggle I mean turn off then back on, or on then back off.

Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

Apparently that output isn't super relevant (the only thing that was output when it crashed was the segfault). I'll see if I can get more info.

Changed in scratch:
status: New → Confirmed
Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

Here's a backtrace (I think I'm doing this right!).

Changed in scratch:
importance: Undecided → High
importance: High → Critical
Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

Marking as critical because there's data loss if there's an unsaved tab.

Revision history for this message
PerfectCarl (name-is-carl) wrote :

Here's a stacktrace of a *debug build*

#0 0xb7745bfe in g_type_check_instance_cast ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#1 0xb571b800 in gtkspell_detach () from /usr/lib/libgtkspell-3.so.0
#2 0xb57201a4 in ___lambda3_ (info=0x825aab8, _data1_=<optimized out>)
    at /build/buildd/scratch-text-editor-2.0.2.1~r1234/obj-i686-linux-gnu/plugins/spell/spell.c:138
#3 ____lambda3__scratch_services_plugins_manager_extension_removed (
    _sender=0x8561160, info=0x825aab8, self=0x822d660)
    at /build/buildd/scratch-text-editor-2.0.2.1~r1234/obj-i686-linux-gnu/plugins/spell/spell.c:144
#4 0xb77253c5 in g_cclosure_marshal_VOID__BOXEDv ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#5 0xb7722727 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#6 0xb773ba19 in g_signal_emit_valist ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#7 0xb773c89f in g_signal_emit_by_name ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#8 0xb7fab17a in peas_cclosure_marshal_VOID__BOXED_OBJECT ()
   from /usr/lib/libpeas-1.0.so.0
#9 0xb7722484 in g_closure_invoke ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#10 0xb77340d9 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#11 0xb773c2cc in g_signal_emit_valist ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#12 0xb773c443 in g_signal_emit ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#13 0xb7fae26f in ?? () from /usr/lib/libpeas-1.0.so.0
#14 0xb7fae2dc in ?? () from /usr/lib/libpeas-1.0.so.0
#15 0xb7725333 in g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#16 0xb7722484 in g_closure_invoke ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#17 0xb77340d9 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#18 0xb773c2cc in g_signal_emit_valist ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#19 0xb773c443 in g_signal_emit ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#20 0xb7facad3 in peas_engine_unload_plugin () from /usr/lib/libpeas-1.0.so.0
#21 0xb7fc01e5 in peas_gtk_plugin_manager_store_set_enabled ()
   from /usr/lib/libpeas-gtk-1.0.so.0

Changed in scratch:
status: Confirmed → In Progress
assignee: nobody → Artem Anufrij (artem-anufrij)
Changed in scratch:
status: In Progress → Confirmed
assignee: Artem Anufrij (artem-anufrij) → nobody
Revision history for this message
Damian Czaja (trojan295) wrote :

Is this bug still current? I cannot reproduce it, toggling the Spell Checker plugin doesn't crash Scratch on my PC.

Revision history for this message
Artem Anufrij (artem-anufrij) wrote :

@Damian,

yes, it is...

look my screencast

Damian Czaja (trojan295)
Changed in scratch:
assignee: nobody → Damian Czaja (trojan295)
status: Confirmed → In Progress
Damian Czaja (trojan295)
Changed in ubuntu:
status: New → Invalid
Revision history for this message
Lewis Goddard (lewisgoddard) wrote :

I can't reproduce this in Scratch 2.1.0 in elementary Freya.

Changed in scratch:
milestone: none → loki-beta1
Revision history for this message
Janne Lindström (janus-l) wrote :

Managed to reproduce it on the daily release of scratch. Seems that the issue is that the more times you disable/reenable the spellchecker (words completion as well and im guessing all other plugins) the less responsive scratch becomes. Haven't had a look at the cause yet but i'll do that today.

Revision history for this message
Janne Lindström (janus-l) wrote :

My bad, didn't see that @trojan295 had already pushed a fix.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Confirm that Scratch becomes increasingly unresponsive the more the plugin is toggled. (r1618)

Cody Garver (codygarver)
affects: ubuntu → granite
no longer affects: granite
Changed in scratch:
assignee: Damian Czaja (trojan295) → nobody
importance: Critical → High
status: In Progress → Confirmed
Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

Confirmed on trunk

Revision history for this message
Danielle Foré (danrabbit) wrote : Re: Toggling spell checker extension crashes Scratch [$5]
summary: - Toggling spell checker extension crashes Scratch
+ Toggling spell checker extension crashes Scratch [$5]
tags: added: bounty
Revision history for this message
Danielle Foré (danrabbit) wrote :

Leo and I can't confirm. Marking as "incomplete"

Changed in scratch:
status: Confirmed → Incomplete
Revision history for this message
Sam Thomas (sgpthomas) wrote :

Scratch is not crashing but does get very laggy when I toggle any plugin on and off repeatedly. I attached a video

Revision history for this message
Gero.Bare (gero-bare) wrote :

I can confirm that toggling on/off a variety of plugins make scratch laggy.

This is still a valid report.

Changed in scratch:
status: Incomplete → Confirmed
summary: - Toggling spell checker extension crashes Scratch [$5]
+ Toggling extensions cause performance loss and eventual crash [$5]
Changed in scratch:
milestone: loki-beta1 → none
Revision history for this message
Damian Czaja (trojan295) wrote :

Hello guys, I'm back from the Arch Linux world and I see this ticket is still open. I will try to fix this in a few days.

Changed in scratch:
assignee: nobody → Damian Czaja (trojan295)
Damian Czaja (trojan295)
Changed in scratch:
status: Confirmed → In Progress
Cody Garver (codygarver)
Changed in scratch:
milestone: none → juno-beta1
Cody Garver (codygarver)
Changed in scratch:
status: In Progress → Fix Committed
Cody Garver (codygarver)
Changed in scratch:
status: Fix Committed → Fix Released
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.