error in VirtualBox: exception has been thrown by the target of an invocation hec_vennbio  2019-07-19
 
Skyline (64-bit) 4.2.0.19072
Oracle VM VirtualBox 6.0
Windows 7 Ultimate SP1
2GB allocated RAM, 2 processors


Hi, this is my first time posting, so please excuse me for any mistakes.
I run skyline on a PC emulator on my macbook. I had left a skyline document open, but "saved the machine state" in Virtual box and quit the program. The next morning, upon opening Virtual Box and the saved machine state an error popped up when I began using Skyline. Unfortunately I didn't save the error, but continued to use it and finished the analysis. I then saved the analysis and closed Skyline, but upon trying to re-open the saved skyline document, I am unable to open my document and the following error:

---------------------------
Skyline
---------------------------
Failure opening Z:\190417_Transition List All_load_all_sys_suit_trimmed.sky.
Exception has been thrown by the target of an invocation.
---------------------------
OK More Info
---------------------------
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> pwiz.Skyline.Util.AssumptionException: Audit log is corrupted. Audit log entry time stamps and indices should be decreasing
   at pwiz.Skyline.Util.Assume.Fail(String error) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Util\Util.cs:line 1918
   at pwiz.Skyline.Util.Assume.IsTrue(Boolean condition, String error) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Util\Util.cs:line 1877
   at pwiz.Skyline.Model.AuditLog.AuditLogList.Validate() in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Model\AuditLog\AuditLogEntry.cs:line 122
   at pwiz.Skyline.Model.AuditLog.AuditLogList.ReadXml(XmlReader reader) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Model\AuditLog\AuditLogEntry.cs:line 109
   at pwiz.Skyline.Util.XmlUtil.Deserialize[TObj](XmlReader reader, TObj objNew) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Util\Xml.cs:line 868
   at pwiz.Skyline.Model.AuditLog.AuditLogList.Deserialize(XmlReader reader) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Model\AuditLog\AuditLogEntry.cs:line 78
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
   at pwiz.Skyline.Util.XmlElementHelper`1.Deserialize(XmlReader reader) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Util\Xml.cs:line 1121
   at pwiz.Skyline.Util.XmlUtil.DeserializeElement[TObj](XmlReader reader, Enum name) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Util\Xml.cs:line 885
   at pwiz.Skyline.Util.XmlUtil.DeserializeElement[TObj](XmlReader reader) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Util\Xml.cs:line 875
   at pwiz.Skyline.Model.AuditLog.AuditLogList.ReadFromFile(String fileName, String& documentHash) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Model\AuditLog\AuditLogEntry.cs:line 190
   at pwiz.Skyline.Model.SrmDocument.ReadAuditLog(String documentPath, String expectedHash, Func`2 getDefaultEntry) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Model\SrmDocument.cs:line 2056
   at pwiz.Skyline.SkylineWindow.<>c__DisplayClass925_0.<OpenFile>b__0(IProgressMonitor progressMonitor) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\SkylineFiles.cs:line 305
   at pwiz.Skyline.Util.ProgressWaitBroker.PerformWork(ILongWaitBroker broker) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Util\UtilUI.cs:line 123
   at pwiz.Skyline.Controls.LongWaitDlg.RunWork(Action`1 performWork) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Controls\LongWaitDlg.cs:line 232
   --- End of inner exception stack trace ---
   at pwiz.Skyline.Util.Helpers.WrapAndThrowException(Exception x) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Util\Util.cs:line 1854
   at pwiz.Skyline.Controls.LongWaitDlg.PerformWork(Control parent, Int32 delayMillis, Action`1 performWork) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Controls\LongWaitDlg.cs:line 180
   at pwiz.Skyline.Controls.LongWaitDlg.PerformWork(Control parent, Int32 delayMillis, Action`1 performWork) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\Controls\LongWaitDlg.cs:line 132
   at pwiz.Skyline.SkylineWindow.OpenFile(String path, FormEx parentWindow) in C:\proj\skyline_4_2_x64\pwiz_tools\Skyline\SkylineFiles.cs:line 295
---------------------------

Does anyone know if I can salvage this document? Earlier saved versions of the skyline document (saved before the initial error appeared after shutting down VirtualBox), appear to be unaffected.

Thank you for any help.
 
 
Brendan MacLean responded:  2019-07-19
Can you post the .skyl file with the same name as your Skyline document? This is the audit log which seems to have gotten corrupted.

It looks like you are using Skyline 4.2, which had an issue with writing directly to the .skyl file rather than using a write-and-rename patter to make saving a file more atomic and impossible to end up with a partially written file even when the power is cut during a save.

So, we have seen truncated .skyl files from Skyline 4.2. Not super common, but moving to Skyline 19.1 will protect against this issue.

If this is the issue, then your only option is to remove the .skyl file, which will allow you to open the Skyline document at the expense of losing your entire audit log. But there is not much that can be done with a partially saved audit log. You could also roll back to a previously saved version. Or maybe you didn't even know you had an audit log and don't really feel that attached to it.

But, regardless, we would love to have a look at the corrupted audit log to make sure it is not some new issue we haven't seen before.

Thanks for the clear report. Sorry for this issue.

--Brendan
 
hec_vennbio responded:  2019-07-20
Thank you so much for the response and clarification, Brendan. I've attached the .skyl file, which I wasn't aware of and then removed it and now my document is able to open and all looks good. Thank you for this help!