We can't do much without seeing the code and exact error message in question. Next time this happens, make a backup of the project in its broken state (for later inspection, as you may need to file a bug report and attach the project) and post the relevant code and error message here.
It just happened again, but with different output.
System.Xml.XmlException: Invalid character in the given encoding. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) [0x00029] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlTextReaderImpl.Throw (System.Int32 pos, System.String res) [0x0000c] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlTextReaderImpl.InvalidCharRecovery (System.Int32& bytesCount, System.Int32& charsCount) [0x00064] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlTextReaderImpl.GetChars (System.Int32 maxCharsCount) [0x00066] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlTextReaderImpl.ReadData () [0x003d5] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlTextReaderImpl.SwitchEncoding (System.Text.Encoding newEncoding) [0x00050] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlTextReaderImpl.SwitchEncodingToUTF8 () [0x00008] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlTextReaderImpl.ParseXmlDeclaration (System.Boolean isTextDecl) [0x00886] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlTextReaderImpl.Read () [0x000c6] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlLoader.Load (System.Xml.XmlDocument doc, System.Xml.XmlReader reader, System.Boolean preserveWhitespace) [0x000a6] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlDocument.Load (System.Xml.XmlReader reader) [0x0002e] in <0ba378e223204e83b4ec02f931b2de8b>:0
at System.Xml.XmlDocument.Load (System.String filename) [0x00013] in <0ba378e223204e83b4ec02f931b2de8b>:0
at GMAssetCompiler.TexturePage. (System.String ) [0x00475] in <2aeab84d5272478aa6360fb91942302c>:0
at GMAssetCompiler.TexturePage. (System.String , System.Boolean , System.Boolean , System.Boolean , System.Boolean , System.Int32 , System.String , System.String , System.String[] ) [0x00324] in <2aeab84d5272478aa6360fb91942302c>:0
at GMAssetCompiler.WADSaver`1+<>c[TCode]. (System.Collections.Generic.KeyValuePair`2[TKey,TValue] ) [0x00320] in <2aeab84d5272478aa6360fb91942302c>:0
at GMAssetCompiler.Program+[,]. (System.Object ) [0x00096] in <2aeab84d5272478aa6360fb91942302c>:0
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <55adae4546cd485ba70e2948332ebe8c>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <55adae4546cd485ba70e2948332ebe8c>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <55adae4546cd485ba70e2948332ebe8c>:0
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <55adae4546cd485ba70e2948332ebe8c>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <55adae4546cd485ba70e2948332ebe8c>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <55adae4546cd485ba70e2948332ebe8c>:0