Mousepad crashes when I click on "Document" > "Type de fichier" > "Others" > "Defaults" I guess in english it is labeled "Document" > "File Type" > "Others" > "Defaults", my system is Debian 8 with XFCE in french. Hope this will help.
Confirmed, it does it here to. I have no idea what file type "Defaults" is supposed to be. Will have a look and see why it's crashing.
Yeah, this crashes here when the editor is not empty. GtkSourceView:ERROR:gtksourcecontextengine.c:5902:update_syntax: assertion failed: (state->context != NULL) Aborted (core dumped) Mousepad 0.4.0 GTK+2 from Arch Repo.
I tried looking into a bit but I haven't yet installed the sources for the GtkSourceView version on my machine. I wonder if "Defaults" is some weird file type we should just skip/hide/disable it? I don't see it in Gedit's file type selection menu.
I'm taking a look at this, so far this is where the crash happens: GTK2: https://github.com/GNOME/gtksourceview/blob/gnome-2-30/gtksourceview/gtksourcecontextengine.c#L5902 GTK3: https://github.com/GNOME/gtksourceview/blob/gnome-3-16/gtksourceview/gtksourcecontextengine.c#L5468 It's weird because in GTK2 there is only "Others", but in GTK3 there is "Others->Default" and "Other->..."
Ahhh ... it's a special base language definition, not a real language: https://git.gnome.org/browse/gtksourceview/tree/data/language-specs/def.lang Judging by the `hidden=true` attribute in the XML and the existence of this function: https://developer.gnome.org/gtksourceview/stable/GtkSourceLanguage.html#gtk-source-language-get-hidden I guess we shouldn't be showing it, but rather checking for non-hidden filetypes to show.
Created attachment 6368 Quick patch Yep, I wrote this quick patch and it seems to work.
Created attachment 6369 Improved patch Tested on GTK2 and GTK3.
Thanks André, merged as http://git.xfce.org/apps/mousepad/commit/?id=720cf91f7b21864b4d3bb0ce18d96cfa719877ca blk, if it still gives any grief, feel free to re-open.