Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitExtensions crashes on startup - "There is an error in the XML document" #3929

Closed
Doug0855 opened this issue Aug 23, 2017 · 4 comments
Closed
Assignees
Milestone

Comments

@Doug0855
Copy link

Doug0855 commented Aug 23, 2017

When opening git extensions version 2.50.01

The Error/Behavior

Whenever I open git extensions it immediately crashes with

Exception Type: System.InvalidOperationException
Message: "There is an error in the XML document (24,29).
Target Site: System.Object Deserialize(System.Xml.XmlReader, System.String, System.Xml.Serialization.XmlDeserializationEvents) @ System.Xml.Serialization.XmlSerializer
Inner Exception: System.Xml.XmlException
Source: System.XML

Stack Trace: 
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at GitCommands.XmlSerializableDictionary`2.ReadXml(XmlReader reader)
   at GitCommands.Settings.GitExtSettingsCache.ReadSettings(String fileName)
   at GitCommands.Settings.FileSettingsCache.LoadImpl()
   at GitCommands.SettingsCache.<>c__DisplayClass4_0.<LockedAction>b__0()
   at GitCommands.SettingsCache.LockedAction[T](Func`1 action)
   at GitCommands.SettingsCache.<>c__DisplayClass4_0.<LockedAction>b__0()
   at GitCommands.SettingsCache.LockedAction[T](Func`1 action)
   at GitCommands.SettingsCache.EnsureSettingsAreUpToDate()
   at GitCommands.SettingsCache.<>c__DisplayClass23_0`1.<TryGetValue>b__0()
   at GitCommands.SettingsCache.LockedAction[T](Func`1 action)
   at GitCommands.SettingsCache.TryGetValue[T](String name, T defaultValue, Func`2 decode, T& value)
   at GitCommands.Settings.SettingsContainer`2.TryGetValue[T](String name, T defaultValue, Func`2 decode, T& value)
   at GitCommands.Settings.SettingsContainer`2.GetValue[T](String name, T defaultValue, Func`2 decode)
   at GitCommands.AppSettings.get_IconStyle()
   at GitUI.Lemmings.GetPictureBoxImage(DateTime currentDate)
   at GitUI.FormSplash..ctor()
   at GitUI.FormSplash.ShowSplash()
   at GitExtensions.Program.Main()

What I've tried

-Running as an administrator
-Uninstalling and Reinstalling git extensions

@vbjay
Copy link
Contributor

vbjay commented Aug 23, 2017 via email

@RussKie
Copy link
Member

RussKie commented Aug 23, 2017

I'm pretty sure I've seen this issue previously reported, but can't find the original.

Try renaming/deleting:

  • C:\Users\AppData\Roaming\GitExtensions\GitExtensions\GitExtensions.settings
  • C:\Users<username>\AppData\Local\GitExtensions*<version>\user.config (there could be few of these)

@zxxc
Copy link

zxxc commented Mar 13, 2018

I closed 4 windows gitextensions at one time (windows 10) and now
GitExtensions.zip
GitExtensions.settings truncated
maybe we can restore this settings from backup automatically if on startup this file is corrupted

previously i spend a lot of time digging what causes this problem and how to solve it

jbialobr added a commit to jbialobr/gitextensions that referenced this issue Mar 13, 2018
This ensures an unique file name among processes that save settings at the same time.
Fixes a possible root cause of gitextensions#3929.
jbialobr added a commit to jbialobr/gitextensions that referenced this issue Mar 13, 2018
This ensures an unique file name among processes that save settings at the same time.
Fixes a possible root cause of gitextensions#3929.
jbialobr added a commit to jbialobr/gitextensions that referenced this issue Mar 13, 2018
This ensures an unique file name among processes that save settings at the same time.
Fixes a possible root cause of gitextensions#3929.

(cherry picked from commit 9933120)
@ioandev
Copy link

ioandev commented Dec 12, 2018

Same issue happening here.

Exception reading XML file "C:\Users\me\AppData\Roaming\GitExtensions\GitExtensions\GitExtensions.settings": '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.

Git extensions 3.00.rc2

CLR 4.0.30319.42000

Void ReadSettings(System.String) @ GitCommands.Settings.GitExtSettingsCache

inner exception trace:

   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at GitCommands.XmlSerializableDictionary`2.ReadXml(XmlReader reader)
   at GitCommands.Settings.GitExtSettingsCache.ReadSettings(String fileName)

@RussKie RussKie added this to the 3.0.1 milestone Dec 12, 2018
@RussKie RussKie pinned this issue Dec 20, 2018
RussKie added a commit to RussKie/gitextensions that referenced this issue Dec 27, 2018
@ghost ghost assigned RussKie Dec 27, 2018
@ghost ghost added the status: ready label Dec 27, 2018
RussKie added a commit that referenced this issue Dec 29, 2018
@gerhardol gerhardol unpinned this issue Dec 29, 2018
l-inc pushed a commit to l-inc/gitextensions that referenced this issue Jan 30, 2019
This ensures an unique file name among processes that save settings at
the same time.
Fixes a possible root cause of gitextensions#3929.

(cherry picked from commit 9933120)
(cherry picked from commit 5cd1067)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants