Menu

#1 DataSet.ReadXML() crashes application under Mono

open
nobody
None
5
2012-12-25
2009-09-29
Jason Oster
No

DataSets are used to store game information by the IDE. Mono's implementation of System.Data.DataSet.ReadXML() throws exceptions upon attempting to decode any XML DataSet files. Occurs whether the DataSet XML was created by the Microsoft .NET runtime or the Mono runtime.

The following is a patch to work-around the problem (do not read the DataSet if the exception is thrown) ... This is not currently an acceptable work-around.

Index: branches/SGDK2IDE2.1/MainWindow.cs

--- branches/SGDK2IDE2.1/MainWindow.cs (revision 157)
+++ branches/SGDK2IDE2.1/MainWindow.cs (working copy)
@@ -927,7 +927,14 @@
{
SGDK2IDE.PushStatus("Loading " + projectFile, true);
DataSet dsLoad = new DataSet();
+ try
+ {
dsLoad.ReadXml(projectFile);
+ }
+ catch
+ {
+ Console.WriteLine("dsLoad.ReadXml() failed.");
+ }
ProjectData.Clear();
InitializeTree();
ProjectData.Merge(dsLoad);

Discussion