dwsim5 icon indicating copy to clipboard operation
dwsim5 copied to clipboard

5.8 versions crash on Linux

Open npalladium opened this issue 5 years ago • 20 comments

App crashes with the following error:

APP CRASH!!!

System.Xml.XmlException: Data at the root level is invalid. Line 1753, position 25.
  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <25129339fbf2468889e2595a9c2a2d82>:0 
  at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) [0x00029] in <25129339fbf2468889e2595a9c2a2d82>:0 
  at System.Xml.XmlTextReaderImpl.Throw (System.String res) [0x00000] in <25129339fbf2468889e2595a9c2a2d82>:0 
  at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace () [0x0012c] in <25129339fbf2468889e2595a9c2a2d82>:0 
  at System.Xml.XmlTextReaderImpl.ParseDocumentContent () [0x002d4] in <25129339fbf2468889e2595a9c2a2d82>:0 
  at System.Xml.XmlTextReaderImpl.Read () [0x0008c] in <25129339fbf2468889e2595a9c2a2d82>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader r) [0x00025] in <17fe09b4744a43bc8d5957d04378f101>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader r, System.Xml.Linq.LoadOptions o) [0x00005] in <17fe09b4744a43bc8d5957d04378f101>:0 
  at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options) [0x00024] in <17fe09b4744a43bc8d5957d04378f101>:0 
  at System.Xml.Linq.XDocument.Load (System.String uri, System.Xml.Linq.LoadOptions options) [0x0000f] in <17fe09b4744a43bc8d5957d04378f101>:0 
  at System.Xml.Linq.XDocument.Load (System.String uri) [0x00000] in <17fe09b4744a43bc8d5957d04378f101>:0 
  at DWSIM.UI.MainForm.InitializeComponent () [0x0097e] in <8340bc3b9dc141428b1e04498158a5e9>:0 
  at DWSIM.UI.MainForm..ctor () [0x00027] in <8340bc3b9dc141428b1e04498158a5e9>:0 
  at DWSIM.UI.Desktop.Program.Main (System.String[] args) [0x004f1] in <5f1c8c8ea82a46d9975e7a41d07458ed>:0 

5.7.14 seems to be working fine. 5.8.11 was working fine for a while before this happened. The same error is reported with 5.8.11.

I'm running lubuntu (Ubuntu 16.04.6 LTS, 4.15.0-96-generic). The dependency versions installed are mono-complete: 6.6.0, gtk-sharp2: 2.12.45, libfontconfig1-dev: 2.11.94, libglu1-mesa-dev: 9.0.0-2.1, coinor-libipopt1v5: 3.11.9-2.1.

Edit: Summarising and clarifying the issue for future reference.

App crashes on startup (while trying to start from the CLI on Linux) if any of the recent files are corrupted.

npalladium avatar Apr 23 '20 16:04 npalladium

what did you do which led to the crash?

DanWBR avatar Apr 23 '20 17:04 DanWBR

Slide-36.xml.zip

I was working on a simple process sheet (either the one attached above or something similar). I closed DWSIM and when I tried to start it again, this error was the result.

npalladium avatar Apr 23 '20 17:04 npalladium

The XML file was corrupted somehow (Line 1753). Why are you using the XML format for mobile devices?

Slide-36.xml.zip

DanWBR avatar Apr 23 '20 18:04 DanWBR

I was trying to save it as normal XML file. But whatever files I saved were detected as XML files for Mobile devices.

npalladium avatar Apr 23 '20 18:04 npalladium

select "Save As" and change the format to dwxmz.

DanWBR avatar Apr 23 '20 18:04 DanWBR

I wasn't very clear before, but DWSIM 5.8 doesn't start at all. I shifted to 5.7.x for the rest of my work.

In 5.7.14 I don't see dwxmz as an option.

Save File_005

npalladium avatar Apr 23 '20 18:04 npalladium

Sorry about that. the first item on the list is the one which saves the file with the .dwxmz extension.

DanWBR avatar Apr 23 '20 18:04 DanWBR

Did you try loading the fixed file I've attached earlier?

DanWBR avatar Apr 23 '20 18:04 DanWBR

Opening the fixed file seems to give me an empty flowsheet.

I had to explicitly give the extension of the file to .dwxmz for DWSIM to detect it as that; this isn't a usual habit on Linux although I'll remember that for DWSIM.

npalladium avatar Apr 23 '20 18:04 npalladium

The file I've sent you is a zipped mobile xml file. You must extract it and load the xml directly. Even though the dwxmz format is actually a zipped xml file, the xml contents is completely different, as the mobile xml data is much more limited and doesn't contain some information required in the desktop version.

DanWBR avatar Apr 23 '20 18:04 DanWBR

The mobile xml loading/saving is just for those who want to examine a simulation made on their mobile devices, make some small modifications and then load it back also on their devices.

DanWBR avatar Apr 23 '20 18:04 DanWBR

I did extract it and load it. And I can confirm that it still seems empty. I guess I'm not understanding something. Is there any documentation that I can refer to as opposed to wasting your time? (Thanks a lot for it.)

I'm also done with that particular file. It was for an assignment and I finished it using 5.7.

I'll just summarise my issue: 5.8.10+ no longer start on my system when I run the dwsim command on the CLI. dwsim-classic works fine. As dwsim is being started from a closed state does it try to open the file automatically?

Again thanks a lot!

My reason for submitting this issue is to try and contribute back in a small way. If there are any debugging steps that I can go through, please advise.

As a sidenote: Does the project have any beginner issues?

npalladium avatar Apr 23 '20 18:04 npalladium

ok, is there an error message when you try to start 5.8.11?

DanWBR avatar Apr 23 '20 18:04 DanWBR

The error message in top comment is the error message while starting 5.8.11.

npalladium avatar Apr 23 '20 18:04 npalladium

I'm sorry but it seems I'm not being clear enough.

There is the event of opening DWSIM, which should lead you to the main screen where you can create a new simulation, load an existing one, change settings, etc.

And there is the event of loading an existing simulation, which is different from starting DWSIM. The error you're describing in the first comment is one which is happening when you try to load the specific XML file which you've attached earlier.

That being said, I'm assuming that DWSIM v5.8 Update 11 works on your system, except that it fails to load that particular file because it was corrupted. It should be able to work normally with other files. Can you confirm my understanding?

DanWBR avatar Apr 23 '20 19:04 DanWBR

DWSIM v5.8 Update 11 (or 10) do not start at all.

npalladium avatar Apr 23 '20 19:04 npalladium

Hmmm... I see. delete or rename that file then.

DanWBR avatar Apr 23 '20 19:04 DanWBR

It is probably crashing while trying to obtain information from the corrupted XML file which is listed in the most recent files.

DanWBR avatar Apr 23 '20 19:04 DanWBR

It works once I got rid of all the files.

Thanks a lot!

Is there anyway to prevent such a crash or to give a better error message (maybe which file causes the crash?)

npalladium avatar Apr 23 '20 19:04 npalladium

I need to change the code to handle such situations... it's my fault... 😅

DanWBR avatar Apr 23 '20 19:04 DanWBR