DanWBR / dwsim

DWSIM is a Steady-State and Dynamic Sequential Modular Chemical Process Simulator for Windows, Linux and macOS.
https://dwsim.org
GNU General Public License v3.0
265 stars 89 forks source link

[Bug] Exception on save #569

Closed andr1976 closed 4 months ago

andr1976 commented 5 months ago

Describe the bugWhen trying to save a simulation in 8.6.6 I get the following unhandled exception

[15/01/2024 23:44:05] The flowsheet is being calculated, please wait... [15/01/2024 23:44:05] The flowsheet was calculated successfully. [8.241s] [15/01/2024 23:44:19] Error saving file:System.AggregateException: One or more errors occurred. ---> System.Management.ManagementException: Invalid class at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext() at System.Management.ManagementObjectCollection.get_Count() at Microsoft.VisualBasic.Devices.ComputerInfo.get_OSManagementBaseObject() at Microsoft.VisualBasic.Devices.ComputerInfo.get_OSFullName() at DWSIM.FormMain.SaveXML(IVirtualFile handler, FormFlowsheet form, String simulationfilename) in C:\Users\Daniel\source\repos\DanWBR\dwsim\DWSIM\Forms\MainWindow\FormMain.vb:line 0 at DWSIM.FormMain.SaveXMLZIP(IVirtualFile handler, FormFlowsheet form) in C:\Users\Daniel\source\repos\DanWBR\dwsim\DWSIM\Forms\MainWindow\FormMain.vb:line 3881 at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- ---> (Inner Exception #0) System.Management.ManagementException: Invalid class at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext() at System.Management.ManagementObjectCollection.get_Count() at Microsoft.VisualBasic.Devices.ComputerInfo.get_OSManagementBaseObject() at Microsoft.VisualBasic.Devices.ComputerInfo.get_OSFullName() at DWSIM.FormMain.SaveXML(IVirtualFile handler, FormFlowsheet form, String simulationfilename) in C:\Users\Daniel\source\repos\DanWBR\dwsim\DWSIM\Forms\MainWindow\FormMain.vb:line 0 at DWSIM.FormMain.SaveXMLZIP(IVirtualFile handler, FormFlowsheet form) in C:\Users\Daniel\source\repos\DanWBR\dwsim\DWSIM\Forms\MainWindow\FormMain.vb:line 3881 at System.Threading.Tasks.Task.Execute()<---

DanWBR commented 4 months ago

https://sourceforge.net/p/dwsim/discussion/844529/thread/ae41278ca0/?limit=25#c499

andr1976 commented 4 months ago

Thanks @DanWBR this one also did the trick https://learn.microsoft.com/en-us/answers/questions/684166/failed-to-initialize-all-required-wmi-classes