BG3ModManager
BG3ModManager copied to clipboard
[Bug]: Error when importing mods
Operating System
Linux via Bottles (Wine)
BG3 Mod Manager Version
1.0.10.0
BG3 Game Version
Full Release Patch 5
Bug Summary
When trying to import a mod I get the following error in the log and UI reports the mod has no pak file (it does)
File: A:\BG3 Modding\Mods\Bags Bags Bags-880-11-1693217745.zip
Error:
System.IO.IOException: Invalid parameter
at System.IO.FileStream.ReadData (System.Runtime.InteropServices.SafeHandle safeHandle, System.Byte[] buf, System.Int32 offset, System.Int32 count) [0x0002d] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
at System.IO.FileStream.ReadInternal (System.Byte[] dest, System.Int32 offset, System.Int32 count) [0x00026] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_delegate_end_invoke(object,intptr)
at (wrapper delegate-end-invoke) <Module>.end_invoke_int__this___IAsyncResult(System.IAsyncResult)
at System.IO.FileStream.EndRead (System.IAsyncResult asyncResult) [0x0003c] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
at System.IO.Stream+<>c.<BeginEndReadAsync>b__45_1 (System.IO.Stream stream, System.IAsyncResult asyncResult) [0x00000] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
at System.Threading.Tasks.TaskFactory`1+FromAsyncTrimPromise`1[TResult,TInstance].Complete (TInstance thisRef, System.Func`3[T1,T2,TResult] endMethod, System.IAsyncResult asyncResult, System.Boolean requiresSynchronization) [0x00000] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
--- End of stack trace from previous location where exception was thrown ---
at DivinityModManager.ViewModels.MainWindowViewModel.ImportArchiveAsync (System.Collections.Generic.Dictionary`2[TKey,TValue] builtinMods, DivinityModManager.Models.App.ImportOperationResults taskResult, System.String archivePath, System.Boolean onlyMods, System.Threading.CancellationToken cts, System.Boolean toActiveList) [0x00178] in <ac236cd350e5488dad991e1874b11b64>:0
This is almost certainly a wine issue. However, if I can get some pointers on further debugging steps that'd be most apprehended.
Links
No response
Here is the full program log from opening it and trying to import a mod
[MainWindowViewModel.cs:LoadAppConfig(4722)] Loading resources from 'A:\BG3 Modding\BG3ModManager_Latest\Resources'
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(Gustav) UUID(991c9c7a-fb80-40cb-8f0d-b92d4e80e9b1)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(GustavDev) UUID(28ac9ce2-2aba-8cda-b3b5-6e922f71b6b8)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(Shared) UUID(ed539163-bb70-431b-96a7-f5b2eda5376b)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(SharedDev) UUID(3d0c5ff8-c95d-c907-ff3e-34b204f1c630)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(FW3) UUID(e5c9077e-1fca-4f24-b55d-464f512c98a8)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(Engine) UUID(9dff4c3b-fda7-43de-a763-ce1383039999)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(Game) UUID(Game)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(DiceSet_01) UUID(e842840a-2449-588c-b0c4-22122cfce31b)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(DiceSet_02) UUID(b176a0ac-d79f-ed9d-5a87-5c2c80874e10)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(DiceSet_03) UUID(e0a4d990-7b9b-8fa9-d7c6-04017c6cf5b1)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(DiceSet_04) UUID(77a2155f-4b35-4f0c-e7ff-4338f91426a4)
[MainWindowViewModel.cs:SetGamePathways(1419)] Larian documents folder set to '%LOCALAPPDATA%\Larian Studios\Baldur's Gate 3'.
[MainWindowViewModel.cs:ShowAlert(4348)] Error saving keybindings at 'A:\BG3 Modding\BG3ModManager_Latest\Data\keybindings.json': System.IO.IOException: (32) Sharing violation: [A:\BG3 Modding\BG3ModManager_Latest\Data\keybindings.json]
at Alphaleonis.Win32.NativeError.ThrowException (System.UInt32 errorCode, System.String readPath, System.String writePath) [0x00320] in <402c4a96f4a946529374e9d0e6d47216>:0
at Alphaleonis.Win32.NativeError.ThrowException (System.Int32 errorCode, System.Nullable`1[T] isFolder, System.String readPath) [0x0001b] in <402c4a96f4a946529374e9d0e6d47216>:0
at Alphaleonis.Win32.Filesystem.NativeMethods.CloseHandleAndPossiblyThrowException (System.Runtime.InteropServices.SafeHandle handle, System.Int32 lastError, System.Nullable`1[T] isFolder, System.String path, System.Boolean throwException) [0x0001d] in <402c4a96f4a946529374e9d0e6d47216>:0
at Alphaleonis.Win32.Filesystem.File.CreateFileCore (Alphaleonis.Win32.Filesystem.KernelTransaction transaction, System.Nullable`1[T] isFolder, System.String path, Alphaleonis.Win32.Filesystem.ExtendedFileAttributes attributes, System.Security.AccessControl.FileSecurity fileSecurity, System.IO.FileMode fileMode, System.Security.AccessControl.FileSystemRights fileSystemRights, System.IO.FileShare fileShare, System.Boolean checkPath, System.Boolean continueOnException, Alphaleonis.Win32.Filesystem.PathFormat pathFormat) [0x000b6] in <402c4a96f4a946529374e9d0e6d47216>:0
at Alphaleonis.Win32.Filesystem.File.OpenCore (Alphaleonis.Win32.Filesystem.KernelTransaction transaction, System.String path, System.IO.FileMode mode, System.Security.AccessControl.FileSystemRights rights, System.IO.FileShare share, Alphaleonis.Win32.Filesystem.ExtendedFileAttributes attributes, System.Nullable`1[T] bufferSize, System.Security.AccessControl.FileSecurity security, Alphaleonis.Win32.Filesystem.PathFormat pathFormat) [0x00076] in <402c4a96f4a946529374e9d0e6d47216>:0
at Alphaleonis.Win32.Filesystem.File.WriteAppendAllLinesCore (Alphaleonis.Win32.Filesystem.KernelTransaction transaction, System.String path, System.Collections.Generic.IEnumerable`1[T] contents, System.Text.Encoding encoding, System.Boolean isAppend, System.Boolean addNewLine, Alphaleonis.Win32.Filesystem.PathFormat pathFormat) [0x0001c] in <402c4a96f4a946529374e9d0e6d47216>:0
at Alphaleonis.Win32.Filesystem.File.WriteAllText (System.String path, System.String contents) [0x00013] in <402c4a96f4a946529374e9d0e6d47216>:0
at DivinityModManager.ViewModels.AppKeys.SaveKeybindings (System.String& result) [0x0008f] in <ac236cd350e5488dad991e1874b11b64>:0
[MainWindowViewModel.cs:RefreshAsync(2371)] Refreshing data asynchronously...
[MainWindowViewModel.cs:RefreshAsync(2394)] Loading mods...
[MainWindowViewModel.cs:LoadModsAsync(1653)] Loading base game mods from data folder...
[MainWindowViewModel.cs:LoadModsAsync(1655)] GameDataPath is 'A:\GoG\Baldurs Gate 3\Baldurs Gate 3\Data'.
[DivinityModDataLoader.cs:LoadModFromModInfo(2027)] Added base mod: Name(DiceSet_01) UUID(e842840a-2449-588c-b0c4-22122cfce31b) Author() Version(36028797018963968)
[DivinityModDataLoader.cs:LoadModFromModInfo(2027)] Added base mod: Name(DiceSet_02) UUID(b176a0ac-d79f-ed9d-5a87-5c2c80874e10) Author() Version(36028797018963968)
[DivinityModDataLoader.cs:LoadModFromModInfo(2027)] Added base mod: Name(DiceSet_03) UUID(e0a4d990-7b9b-8fa9-d7c6-04017c6cf5b1) Author() Version(36028797018963968)
[DivinityModDataLoader.cs:LoadModFromModInfo(2027)] Added base mod: Name(DiceSet_06) UUID(ee4989eb-aab8-968f-8674-812ea2f4bfd7) Author() Version(36028797018963968)
[DivinityModDataLoader.cs:LoadModFromModInfo(2027)] Added base mod: Name(GustavDev) UUID(28ac9ce2-2aba-8cda-b3b5-6e922f71b6b8) Author() Version(144818875521766790)
[DivinityModDataLoader.cs:LoadModFromModInfo(2027)] Added base mod: Name(Honour) UUID(b77b6210-ac50-4cb1-a3d5-5702fb9c744c) Author() Version(36028797023098246)
[DivinityModDataLoader.cs:LoadModFromModInfo(2027)] Added base mod: Name(Gustav) UUID(991c9c7a-fb80-40cb-8f0d-b92d4e80e9b1) Author() Version(36029301681017806)
[DivinityModDataLoader.cs:LoadModFromModInfo(2027)] Added base mod: Name(Shared) UUID(ed539163-bb70-431b-96a7-f5b2eda5376b) Author() Version(36029297386049870)
[DivinityModDataLoader.cs:LoadModFromModInfo(2027)] Added base mod: Name(SharedDev) UUID(3d0c5ff8-c95d-c907-ff3e-34b204f1c630) Author() Version(36028797022984680)
[DivinityModDataLoader.cs:LoadBuiltinModsAsync(2067)] Took 0.12 seconds(s) to load builtin mods.
[MainWindowViewModel.cs:LoadModsAsync(1694)] Loading mods from '%LOCALAPPDATA%\Larian Studios\Baldur's Gate 3\Mods'.
[DivinityModDataLoader.cs:LoadModPackageDataAsync(744)] Mod Packages: 1
[DivinityModDataLoader.cs:LoadModPackageDataAsync(767)] Split mod loading into 8 partitions.
[DivinityModDataLoader.cs:LoadModDataFromPakAsync(691)] Error loading mod pak '%LOCALAPPDATA%\Larian Studios\Baldur's Gate 3\Mods\BasketEquipmentNSFW.pak':
System.IO.IOException: Attempted to Seek before the beginning of the stream
at System.IO.FileStream.Seek (System.Int64 offset, System.IO.SeekOrigin origin) [0x0006e] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
at LSLib.LS.PackageReader.Read (System.IO.Stream mainStream) [0x0000d] in <8d24fb494d4c4a4e8c52588fd30a1e54>:0
at LSLib.LS.PackageReader.Read () [0x0000f] in <8d24fb494d4c4a4e8c52588fd30a1e54>:0
at DivinityModManager.Util.DivinityModDataLoader.LoadModDataFromPakAsync (System.String pakPath, System.Collections.Generic.Dictionary`2[TKey,TValue] builtinMods) [0x00020] in <f1114e5104f248809ddef05dc2c81a7b>:0
at DivinityModManager.Util.DivinityModDataLoader.LoadModDataFromPakAsync (System.String pakPath, System.Collections.Generic.Dictionary`2[TKey,TValue] builtinMods, System.Threading.CancellationToken cts) [0x0006e] in <f1114e5104f248809ddef05dc2c81a7b>:0
[DivinityModDataLoader.cs:LoadModPackageDataAsync(770)] Took 0.04 second(s) to load mod paks.
[MainWindowViewModel.cs:LoadModsAsync(1720)] Loaded '13' mods.
[MainWindowViewModel.cs:RefreshAsync(2399)] Loading profiles...
[MainWindowViewModel.cs:LoadProfilesAsync(1760)] Loading profiles from '%LOCALAPPDATA%\Larian Studios\Baldur's Gate 3\PlayerProfiles'.
[MainWindowViewModel.cs:LoadProfilesAsync(1763)] Loaded '1' profiles.
[MainWindowViewModel.cs:LoadProfilesAsync(1766)] Public | 5769ca2d-9ccf-c2ff-b78d-13c97a802969
[MainWindowViewModel.cs:RefreshAsync(2406)] Loading current profile...
[DivinityModDataLoader.cs:GetSelectedProfileUUIDAsync(1242)] Loading playerprofiles at '%LOCALAPPDATA%\Larian Studios\Baldur's Gate 3\PlayerProfiles\playerprofiles8.lsf'
[DivinityModDataLoader.cs:GetSelectedProfileUUIDAsync(1250)] ActiveProfile | '5769ca2d-9ccf-c2ff-b78d-13c97a802969'
[MainWindowViewModel.cs:RefreshAsync(2424)] Loading external load orders...
[MainWindowViewModel.cs:LoadExternalLoadOrdersAsync(2583)] Attempting to load saved load orders from 'A:\BG3 Modding\BG3ModManager_Latest\Orders'.
[MainWindowViewModel.cs:RefreshAsync(2435)] No saved orders found.
[MainWindowViewModel.cs:RefreshAsync(2438)] Setting up mod lists...
[MainWindowViewModel.cs:LoadAppConfig(4722)] Loading resources from 'A:\BG3 Modding\BG3ModManager_Latest\Resources'
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(Gustav) UUID(991c9c7a-fb80-40cb-8f0d-b92d4e80e9b1)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(GustavDev) UUID(28ac9ce2-2aba-8cda-b3b5-6e922f71b6b8)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(Shared) UUID(ed539163-bb70-431b-96a7-f5b2eda5376b)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(SharedDev) UUID(3d0c5ff8-c95d-c907-ff3e-34b204f1c630)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(FW3) UUID(e5c9077e-1fca-4f24-b55d-464f512c98a8)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(Engine) UUID(9dff4c3b-fda7-43de-a763-ce1383039999)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(Game) UUID(Game)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(DiceSet_01) UUID(e842840a-2449-588c-b0c4-22122cfce31b)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(DiceSet_02) UUID(b176a0ac-d79f-ed9d-5a87-5c2c80874e10)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(DiceSet_03) UUID(e0a4d990-7b9b-8fa9-d7c6-04017c6cf5b1)
[MainWindowViewModel.cs:LoadAppConfig(4839)] Ignored mod added: Name(DiceSet_04) UUID(77a2155f-4b35-4f0c-e7ff-4338f91426a4)
[MainWindowViewModel.cs:RefreshAsync(2478)] Set profile to (Public)[0]
[MainWindowViewModel.cs:BuildModOrderList(1816)] UUID 28ac9ce2-2aba-8cda-b3b5-6e922f71b6b8 is missing from the profile's active mod list.
[MainWindowViewModel.cs:BuildModOrderList(1832)] Profile order:
[MainWindowViewModel.cs:BuildModOrderList(1847)] Setting next order index to [0/0].
[MainWindowViewModel.cs:LoadModOrder(2143)] Loading mod order 'Current'.
[MainWindowViewModel.cs:RefreshAsync(2548)] Finalizing refresh operation.
[MainWindowViewModel.cs:OnMainProgressComplete(3020)] Main progress is complete.
[MainWindowViewModel.cs:LoadExtenderSettingsBackground(863)] Loading extender settings.
[MainWindowViewModel.cs:CheckForLatestExtenderUpdaterRelease(760)] Checking for latest DWrite.dll release at 'https://github.com/Norbyte/bg3se'.
[MainWindowViewModel.cs:CheckForLatestExtenderUpdaterRelease(791)] Script Extender latest release url found: https://github.com/Norbyte/bg3se/releases/download/updater-20231028/BG3SE-Updater-20231028.zip
[MainWindowViewModel.cs:CheckExtenderUpdaterVersion(650)] Looking for Script Extender at 'A:\GoG\Baldurs Gate 3\Baldurs Gate 3\bin\DWrite.dll'.
[MainWindowViewModel.cs:CheckExtenderUpdaterVersion(691)] Extender updater DWrite.dll not found.
[MainWindowViewModel.cs:CheckExtenderInstalledVersion(750)] Extender Local AppData folder not found at '%LOCALAPPDATA%\BG3ScriptExtender'. Skipping.
[MainWindowViewModel.cs:CheckExtenderInstalledVersion(750)] Extender Local AppData folder not found at '%LOCALAPPDATA%\BG3ScriptExtender'. Skipping.
[MainWindowViewModel.cs:ImportArchiveAsync(3465)] Error extracting package: System.IO.IOException: Invalid parameter
at System.IO.FileStream.ReadData (System.Runtime.InteropServices.SafeHandle safeHandle, System.Byte[] buf, System.Int32 offset, System.Int32 count) [0x0002d] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
at System.IO.FileStream.ReadInternal (System.Byte[] dest, System.Int32 offset, System.Int32 count) [0x00026] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_delegate_end_invoke(object,intptr)
at (wrapper delegate-end-invoke) <Module>.end_invoke_int__this___IAsyncResult(System.IAsyncResult)
at System.IO.FileStream.EndRead (System.IAsyncResult asyncResult) [0x0003c] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
at System.IO.Stream+<>c.<BeginEndReadAsync>b__45_1 (System.IO.Stream stream, System.IAsyncResult asyncResult) [0x00000] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
at System.Threading.Tasks.TaskFactory`1+FromAsyncTrimPromise`1[TResult,TInstance].Complete (TInstance thisRef, System.Func`3[T1,T2,TResult] endMethod, System.IAsyncResult asyncResult, System.Boolean requiresSynchronization) [0x00000] in <de4d51d88e3b4eea89a8d6a3a9854818>:0
--- End of stack trace from previous location where exception was thrown ---
at DivinityModManager.ViewModels.MainWindowViewModel.ImportArchiveAsync (System.Collections.Generic.Dictionary`2[TKey,TValue] builtinMods, DivinityModManager.Models.App.ImportOperationResults taskResult, System.String archivePath, System.Boolean onlyMods, System.Threading.CancellationToken cts, System.Boolean toActiveList) [0x00178] in <ac236cd350e5488dad991e1874b11b64>:0
[MainWindowViewModel.cs:ShowAlert(4348)] Error extracting archive (check the log): Invalid parameter
[MainWindowViewModel.cs:OnMainProgressComplete(3020)] Main progress is complete.
[MainWindowViewModel.cs:ShowAlert(4348)] Skipped importing mod - No .pak file found
I don't think this is a Wine specific issue. I've tried running on both Wine and Windows 10 directly, and I'm getting this issue on both.
Any solutions to this? I've just experienced this today.
For now, you can get around it by moving PAK files to %LOCALAPPDATA%/Larian Studios/Baldur's Gate 3/Mods
BG3 Mod Manager Version - 1.0.10.0 Wine Version - Wine-GE 8.25 Linux Info - Fedora 38