Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash due to lack of temporary files. #801

Closed
Antsiscool opened this issue Apr 6, 2015 · 3 comments
Closed

Crash due to lack of temporary files. #801

Antsiscool opened this issue Apr 6, 2015 · 3 comments
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN Windows Issues specific for Windows ★☆☆

Comments

@Antsiscool
Copy link

When installing mods on a windows computer, if there are more than 65535 temporary files, ckan will throw an exception with the text "the file exists.". This is a shared limit for all programs on the computer. would it be possible to use a custom temporary directory for downloads, or warn the user with a more specific error message if no temporary files can be created.

System.IO.IOException was unhandled by user code
  HResult=-2147024816
  Message=The file exists.

  Source=mscorlib
  StackTrace:
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.Path.InternalGetTempFileName(Boolean checkHost)
       at CKAN.NetAsyncDownloader.NetAsyncDownloaderDownloadPart..ctor(Uri url, Int64 expectedSize, String path) in c:\Users\Ants\Documents\CKAN\CKAN-core\Net\NetAsyncDownloader.cs:line 40
       at CKAN.NetAsyncDownloader.<Download>b__0(KeyValuePair`2 url) in c:\Users\Ants\Documents\CKAN\CKAN-core\Net\NetAsyncDownloader.cs:line 81
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
       at CKAN.NetAsyncDownloader.Download(ICollection`1 urls) in c:\Users\Ants\Documents\CKAN\CKAN-core\Net\NetAsyncDownloader.cs:line 81
       at CKAN.NetAsyncDownloader.DownloadModules(NetFileCache cache, IEnumerable`1 modules) in c:\Users\Ants\Documents\CKAN\CKAN-core\Net\NetAsyncDownloader.cs:line 148
       at CKAN.ModuleInstaller.InstallList(ICollection`1 modules, RelationshipResolverOptions options, NetAsyncDownloader downloader) in c:\Users\Ants\Documents\CKAN\CKAN-core\ModuleInstaller.cs:line 215
       at CKAN.ModuleInstaller.InstallList(List`1 modules, RelationshipResolverOptions options, NetAsyncDownloader downloader) in c:\Users\Ants\Documents\CKAN\CKAN-core\ModuleInstaller.cs:line 158
       at CKAN.Main.InstallList(HashSet`1 toInstall, RelationshipResolverOptions options, NetAsyncDownloader downloader) in c:\Users\Ants\Documents\CKAN\CKAN-GUI\MainInstall.cs:line 280
       at CKAN.Main.InstallMods(Object sender, DoWorkEventArgs e) in c:\Users\Ants\Documents\CKAN\CKAN-GUI\MainInstall.cs:line 228
       at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
  InnerException: 

@pjf
Copy link
Member

pjf commented Apr 7, 2015

Oh my! I've never even heard of this before. Since this is something that's likely to affect the user for many operations (not just the CKAN) I imagine our best option here is to inform the user that their temp files allocation is full.

Thank you so much for your report!

~ Paul

@pjf pjf added Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN ★☆☆ Windows Issues specific for Windows labels Apr 7, 2015
@Postremus Postremus added this to the Temp File Issues milestone Aug 20, 2015
@embix
Copy link

embix commented May 3, 2016

How about choosing another temp file naming algorithm? GUID seems like a good fit.

@HebaruSan
Copy link
Member

We don't download mods to temporary files anymore as of #3666; instead the target file for NetAsyncDownloader is in the downloading subfolder of the cache, so interrupted downloads can be resumed. Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN Windows Issues specific for Windows ★☆☆
Projects
None yet
Development

No branches or pull requests

5 participants