Gtk-WARNING **: Attempting to read the recently used resources file: Invalid argument

Bug #694245 reported by grofaty on 2010-12-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
High
Unassigned

Bug Description

Pinta 0.5 on Ubuntu 10.10 it was running perfectly well. But today I have started Ubuntu and then started Pinta and got the following error:

==================
(Pinta:2070): Gtk-WARNING **: Attempting to read the recently used resources file at `/home/grofaty/.recently-used.xbel', but the parser failed: Error reading file '/home/grofaty/.recently-used.xbel': Invalid argument.

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Pinta.Core.PintaCore ---> System.Xml.XmlException: invalid data.
  at System.Xml.XmlStreamReader.Read (System.Char[] dest_buffer, Int32 index, Int32 count) [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.ReadTextReader (Int32 remained) [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.PeekChar () [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at Mono.Xml.EntityResolvingXmlReader.Read () [0x00000] in <filename unknown>:0
  at Mono.Xml.DTDValidatingReader.ReadContent () [0x00000] in <filename unknown>:0
  at Mono.Xml.DTDValidatingReader.Read () [0x00000] in <filename unknown>:0
  at Mono.Xml.Schema.XsdValidatingReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlValidatingReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
  at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0
  at System.Xml.XmlDocument.Load (System.String filename) [0x00000] in <filename unknown>:0
  at Pinta.Core.SettingsManager.Deserialize (System.String filename) [0x00000] in <filename unknown>:0
  at Pinta.Core.SettingsManager.LoadSettings () [0x00000] in <filename unknown>:0
  at Pinta.Core.SettingsManager..ctor () [0x00000] in <filename unknown>:0
  at Pinta.Core.PintaCore..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at Pinta.MainWindow.CreateWindow () [0x00000] in <filename unknown>:0
  at Pinta.MainWindow..ctor () [0x00000] in <filename unknown>:0
  at Pinta.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
==================

It looks like some init file has become corrupted.

Jonathan Pobst (jpobst) wrote :

Guarded loading the settings file in https://github.com/jpobst/Pinta/commit/da7fdd510ea308f49efabbe7bede068cd5e71630.

Thanks for the report!

Changed in pinta:
importance: Undecided → High
milestone: none → 0.6
status: New → Fix Committed
grofaty (grofaty) wrote :

Is there any work-around, Pinta does no work on my Ubuntu system anymore?

Jonathan Pobst (jpobst) wrote :

You could try deleting the settings file.

Somewhere like ~/.config/Pinta/settings.xml.

grofaty (grofaty) wrote :

#3, this didn't help. I have deleted whole Pinta folder like: rm -rf ~/config/Pinta/
Then I have run pinta from Terminal and I get error message:
============
(Pinta:1770): Gtk-WARNING **: Attempting to store changes into `/home/grofaty/.recently-used.xbel', but failed: Failed to rename file '/home/grofaty/.recently-used.xbel.7336NV' to '/home/grofaty/.recently-used.xbel': g_rename() failed: Is a directory
============
but Pinta does starts up successfully.

Jonathan Pobst (jpobst) wrote :

Ok, so it does help.

The Gtk-WARNING and the exception are completely separate things. I don't think there's anything we can do about the warning, sounds like Gtk is just messed up.

The exception has been fixed so that Pinta will function whether it can restore the saved settings or not.

grofaty (grofaty) wrote :

Exactly the same problem appeared and above #4 solution does not help. The same error message thrown.

grofaty (grofaty) wrote :

Now I see that in comment #4 there is missing dot ".config", so correct command is:
rm -rf ~/.config/Pinta/

Work-around works again.

grofaty (grofaty) wrote :

This bug does not appear in Pinta 0.6 anymore, so it looks like this bug is fixed.

Changed in pinta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers