Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Environment:Ubuntu 11.10 gedit 3.2.3
When I open a specific .php file with gedit, it will appear in a flash and disappear immediately. I searched the web and found one way to get around this - use gconf to change the encoding of gedit but I didn't find the key it mentioned. I tried to use VIM to change the encoding of this .php file to UTF-8 and that didn't work either.

share|improve this question
Run gedit from a terminal and see if there are any error messages when opening that file. – Renan Apr 3 '12 at 17:27
@Renan Yes,"GtkSourceView:ERROR:gtksourcecontextengine.c:6012:update_syntax: assertion failed: (g_slist_length (ce->priv->invalid) <= 1) " – LotusH Apr 3 '12 at 17:28
this is rather strange, I think you have found a bug. There is this bug report in Launchpad which looks similar. but it's marked as "expired". – Renan Apr 3 '12 at 17:40
up vote 0 down vote accepted

I had a similar problem (caused by a different bug), but the underlying causes might be similar enough for this to work:

gedit saves metadata about all known files using the GnomeVFS. If that metadata contains something gedit doesn't "like", it crashes.

As a workaround, create a copy of the file from the command line (not in Nautilus). cp doesn't preserve the metadata, so this allow you to open the file if the metadata is in fact the problem.

In case it is, you can inspect the file's metadata by executing the following command:

gvfs-info -a metadata FILENAME

Then, one by one, try erasing the entries using the following syntax:

gvfs-set-attribute FILENAME metadata::ATTRIBUTE ''
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .