Issue 788: Need better handling for IO problems in library load

issues
Status:closed
Assigned To:Guest
Type:Defect
Area:Skyline
Priority:3
Milestone:4.3
Opened:2021-04-09 09:34 by Brian Pratt
Changed:2022-02-16 13:01 by Brian Pratt
Resolved:2022-02-16 13:01 by Brian Pratt
Resolution:Fixed
Closed:2022-02-16 13:01 by Brian Pratt
2021-04-09 09:34 Brian Pratt
Title»Need better handling for IO problems in library load
Assigned To»Brian Pratt
Type»Defect
Area»Skyline
Priority»3
For example (interestingly, this wasn't actually Brendan):

Exception | UtilIO.cs:line 786 | 20.2.0.343-a7a9e8c4f | f3e062758f42
Guest created this exception at 2021-04-08
Skyline version: 20.2.0.343-a7a9e8c4f (64-bit)
Installation ID: fd77b015-12d9-4cc3-83cf-f3e062758f42
Exception type: Exception
Error message: Failed loading library 'C:\Users\brendanx\Documents\LibraryExplorer\labeled_15N.blib'.
Access Denied: unable to create a file in the folder "C:\Users\brendanx\Documents\LibraryExplorer". Adjust the folder write permissions or retry the operation after moving or copying files to a different folder.
Format: BiblioSpec
LSID: urn:lsid:buckinstitute.org:spectral_library:bibliospec:nr:N14_N15_Aldolase_0921_2010_v2
FileRevision: 1
SchemaVersion: 0

--------------------

System.Exception: Failed loading library 'C:\Users\brendanx\Documents\LibraryExplorer\labeled_15N.blib'.
Access Denied: unable to create a file in the folder "C:\Users\brendanx\Documents\LibraryExplorer". Adjust the folder write permissions or retry the operation after moving or copying files to a different folder.
Format: BiblioSpec
LSID: urn:lsid:buckinstitute.org:spectral_library:bibliospec:nr:N14_N15_Aldolase_0921_2010_v2
FileRevision: 1
SchemaVersion: 0 ---> System.IO.IOException: Access Denied: unable to create a file in the folder "C:\Users\brendanx\Documents\LibraryExplorer". Adjust the folder write permissions or retry the operation after moving or copying files to a different folder.
   at pwiz.Skyline.Util.FileStreamManager.GetTempFileName(String basePath, String prefix, UInt32 unique) in C:\proj\skyline_20_2_x64\pwiz_tools\Skyline\Util\UtilIO.cs:line 786
   at pwiz.Skyline.Model.Lib.BiblioSpecLiteLibrary.CreateCache(ILoadMonitor loader, IProgressStatus status, Int32 percent) in C:\proj\skyline_20_2_x64\pwiz_tools\Skyline\Model\Lib\BiblioSpecLite.cs:line 581
   at pwiz.Skyline.Model.Lib.BiblioSpecLiteLibrary.Load(ILoadMonitor loader, IProgressStatus status, Boolean cached, Exception& failureException) in C:\proj\skyline_20_2_x64\pwiz_tools\Skyline\Model\Lib\BiblioSpecLite.cs:line 949
   --- End of inner exception stack trace ---
   at pwiz.Skyline.Model.Lib.BiblioSpecLiteLibrary.Load(ILoadMonitor loader) in C:\proj\skyline_20_2_x64\pwiz_tools\Skyline\Model\Lib\BiblioSpecLite.cs:line 927
   at pwiz.Skyline.Model.Lib.BiblioSpecLiteLibrary.Load(BiblioSpecLiteSpec spec, ILoadMonitor loader) in C:\proj\skyline_20_2_x64\pwiz_tools\Skyline\Model\Lib\BiblioSpecLite.cs:line 150
   at pwiz.Skyline.Model.Lib.LibraryManager.LoadLibrary(LibrarySpec spec, Func`1 getMonitor) in C:\proj\skyline_20_2_x64\pwiz_tools\Skyline\Model\Lib\Library.cs:line 295
   at pwiz.Skyline.Model.Lib.LibraryManager.LoadBackground(IDocumentContainer container, SrmDocument document, SrmDocument docCurrent) in C:\proj\skyline_20_2_x64\pwiz_tools\Skyline\Model\Lib\Library.cs:line 124
   at pwiz.Skyline.Model.BackgroundLoader.OnLoadBackground(IDocumentContainer container, SrmDocument document) in C:\proj\skyline_20_2_x64\pwiz_tools\Skyline\Model\BackgroundLoader.cs:line 130
Exception caught at:
   at pwiz.Skyline.Model.BackgroundLoader.OnLoadBackground(IDocumentContainer container, SrmDocument document) in C:\proj\skyline_20_2_x64\pwiz_tools\Skyline\Model\BackgroundLoader.cs:line 130
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

2022-02-16 13:01 Brian Pratt
resolve as Fixed
Statusopen»resolved
Fixed in Commit f1d1b0f947845f0844945b3a3dbce11da6b68c45
Author: nickshulman <nicksh@proteinms.net>
Date: Wednesday, November 17, 2021 12:47 PM
Parent: 09bb3cac

Fix loading libraries when cache file cannot be written (Issue 844) (#1843)

* Make it so that libraries (BiblioSpec and EncyclopeDIA) can be loaded even if it is not possible to save a cache file in the folder containing the library.

2022-02-16 13:01 Brian Pratt
close
Statusresolved»closed
Assigned ToBrian Pratt»Guest