Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

5.8 versions crash on Linux #40

Open
npalladium opened this issue Apr 23, 2020 · 20 comments
Open

5.8 versions crash on Linux #40

npalladium opened this issue Apr 23, 2020 · 20 comments

Comments

@npalladium
Copy link

npalladium commented Apr 23, 2020

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.

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

what did you do which led to the crash?

@npalladium
Copy link
Author

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.

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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

Slide-36.xml.zip

@npalladium
Copy link
Author

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

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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

@npalladium
Copy link
Author

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

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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

@npalladium
Copy link
Author

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.

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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
Copy link
Owner

DanWBR commented Apr 23, 2020

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.

@npalladium
Copy link
Author

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?

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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

@npalladium
Copy link
Author

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

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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?

@npalladium
Copy link
Author

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

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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

@npalladium
Copy link
Author

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?)

@DanWBR
Copy link
Owner

DanWBR commented Apr 23, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants