Closed Pickysaurus closed 1 month ago
The exception is caused by an empty file:
@Sewer56 you might wanna take a look at this.
00:01:26.241 [ERROR] (NexusMods.App.Program) Encountered an exception published to an object with an unobserved ThrownExceptions property|System.ArgumentException: A positive capacity must be specified for a Memory Mapped File backed by an empty file.
at System.IO.MemoryMappedFiles.MemoryMappedFile.CreateFromFile(String path, FileMode mode, String mapName, Int64 capacity, MemoryMappedFileAccess access)
at NexusMods.Archives.Nx.FileProviders.OutputFileProvider..ctor(String outputFolder, String relativePath, FileEntry entry)
at NexusMods.DataModel.NxFileStore.<>c__DisplayClass7_1.<ExtractFiles>b__2(Int32 x) in /_/src/NexusMods.DataModel/NxFileStore.cs:line 182
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()
I know what this is.
I had to add a workaround like this in the App already, same exact issue. .NET APIs don't allow memory map of 0 sized files, unlike some native counterparts. I'll slap a workaround for it in Nx
This should be fixed in 0.6.0. Been fixed a few weeks back.
Bug Report
Summary
When installing the CP2077 mod "Car Modification Shop", and then attempting to apply it the UI hangs and/or crashes.
This may be related to files in the mod that do not have a file extension(?)
Steps to reproduce
What is the expected behaviour?
The app does not crash.
Other information
nexusmods.app.slim.current.log nexusmods.app.main.current.log
https://github.com/user-attachments/assets/8dd25ca6-d1a3-4196-862b-ce989544cf96