genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
392 stars 155 forks source link

Module exception data can corrupt configuration #127

Closed dansantee closed 9 years ago

dansantee commented 9 years ago

I was working on a module when suddenly all my configuration was corrupted (see attached image). I was able to do a backup and restore, but the problem was still present. I found that the module I was working on had generated an exception, the exception text was saved to the configuration files, and that the message caused the files to be corrupted. I was able to correct the problem by removing the exception data from the backup XML and then doing a full restore.

notavailable

  <ModuleParameter>
    <Name>Runtime.Error</Name>
    <Value>TC:    at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult&amp; parseResult)
at System.Enum.Parse(Type enumType, String value)
at HomeGenie.Automation.Scripting.ProgramHelper.AddVirtualModules(String domain, String type, String widget, Int32 startAddress, Int32 endAddress) in \\vboxsvr\vagrant\HomeGenie\HomeGenie\Automation\Scripting\ProgramHelper.cs:line 464
at HomeGenie.Automation.Scripting.ScriptingInstance.&lt;&gt;c__DisplayClass5.&lt;EvaluateConditionBlock&gt;b__4()
at HomeGenie.Automation.Scripting.ProgramHelper.Setup(Action functionBlock) in \\vboxsvr\vagrant\HomeGenie\HomeGenie\Automation\Scripting\ProgramHelper.cs:line 119</Value>
    <Description />
    <UpdateTime>2015-02-15T19:21:05.7314637Z</UpdateTime>
  </ModuleParameter>
genemars commented 9 years ago

does it happen on a Windows box?

dansantee commented 9 years ago

I see you fixed it, but yes, it's on a Windows box. Sorry I didn't mention that.