admin-shell / aasx-package-explorer

C# based viewer / editor for the Asset Administration Shell
39 stars 9 forks source link

Crash on opening AASX package without error message #22

Closed JensPfeifle closed 3 years ago

JensPfeifle commented 5 years ago

Describe the bug Explorer crashes when trying to load an AASX with File...Open... Same behavior when using Open Auxiliary AAS... Dragging and dropping AASX file into Explorer is ignored, no messages.

To Reproduce

  1. Download and unzip package explorer build (tested with 190930)
  2. Launch .exe directly (no shortcut with additional settings required to reproduce)
  3. Try to open this file from the admin-shell.io repository: Festo_8042539_VUVG-LK10-M52-AT-M5-1H2L-S_solenoid_valve.aasx

Expected behavior Display the AAS, or an informative error message.

OS: Windows 10 Package explorer build: 190930

Additional context Unfortunately this is happening with one of my .AASX files which I have been working on. The explorer crashed while editing the file, and since then I am not able to load my AASX anymore. I assume the file is corrupted in some way?

Following up on the above question: If I try renaming the Festo VUVG-LK10 file from above to a .ZIP and extracting, I get an error as shown below. With my AASX file it is the same error, except with the [...].aas file.

error_extracting

Edit: clarification

JensPfeifle commented 5 years ago

May be related to issue #21

JensPfeifle commented 5 years ago

The expectation after a crash of the explorer is that only any unsaved changes to the AASX file are lost. Completely corrupting the AASX file is in my opinion a serious bug...

Suggestion for a fix: Load the data from the AASX file and then close the file. Edit a working copy of the data internally, and then reopen and write to the AASX on save. This way, the Explorer does not crash while the AASX file is open.

allan-roberto commented 5 years ago

I have the same issue. Yesterday it was working normally. It was possible to import AML files, however today, application is crashing even before opening an aasx package.

BirgitBoss commented 4 years ago

In the meantime the explorer has a backup functionality, this helps in case of crashed (the xml file is empty then) https://github.com/admin-shell/aasx-package-explorer/blob/master/help/index.md

set parameter -backupdir

BirgitBoss commented 3 years ago

I am closing the issue. Feel free to report further issues in https://github.com/admin-shell-io/aasx-package-explorer.