satisfactorymodding / SatisfactoryModManager

A mod manager for easy installation of mods and modloader for Satisfactory
GNU General Public License v3.0
360 stars 77 forks source link

Invalid string length #81

Closed mkaito closed 3 years ago

mkaito commented 3 years ago

Hi,

I'm honestly not sure what it is trying to do. The log isn't very enlightening, but maybe I just don't know what to look for.

I get this, and then it gets stuck loading.

debug info

mircearoata commented 3 years ago

Hi mkaito!

You're right, the log isn't very helpful... maybe the devtools console log can help?

mkaito commented 3 years ago

These two seem relevant:

renderer.js:1 RangeError: Invalid string length
    at Object.setDllOverrides (/usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/satisfactory-mod-manager-api/lib/installfinders/linux/wineHelpers.js:31)
    at /usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/satisfactory-mod-manager-api/lib/installfinders/linux/legendary.js:36
    at Array.forEach (<anonymous>)
    at Object.getInstalls (/usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/satisfactory-mod-manager-api/lib/installfinders/linux/legendary.js:23)
    at Object.getInstalls (/usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/satisfactory-mod-manager-api/lib/installfinders/linux/index.js:11)
    at getInstalls (/usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/satisfactory-mod-manager-api/lib/installfinders/index.js:11)
    at renderer.js:1
    at i (renderer.js:1)
    at Generator._invoke (renderer.js:1)
    at Generator.next (renderer.js:1)
showError @ renderer.js:1
renderer.js:1 TypeError: Cannot read property 'readManifest' of null
    at Store.refreshInstalledMods (renderer.js:1)
    at wrappedMutationHandler (/usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/vuex/dist/vuex.common.js:842)
    at commitIterator (/usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/vuex/dist/vuex.common.js:464)
    at Array.forEach (<anonymous>)
    at /usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/vuex/dist/vuex.common.js:463
    at Store._withCommit (/usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/vuex/dist/vuex.common.js:622)
    at Store.commit (/usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/vuex/dist/vuex.common.js:462)
    at boundCommit (/usr/share/satisfactory-mod-manager/resources/app.asar/node_modules/vuex/dist/vuex.common.js:407)
    at renderer.js:1
    at i (renderer.js:1)
mircearoata commented 3 years ago

Line 31 is wineConfig = wineConfig.slice(0, dllOverridesBegin) + dllOverridesSection + wineConfig.slice(dllOverridesEnd); and I tried to slice with negative numbers, big numbers, none giving that error.

One thing you can check is if winePrefix/user.reg contains [Software\\Wine\\DllOverrides] (and then at least 2 newlines after the section). If it doesn't either add it and let SMM add the dlloverrides, or you can add them yourself

"xinput1_3"="native,builtin"
"msdia140"="native,builtin"
mkaito commented 3 years ago

This is what that looks like in a fresh pfx, including the two surrounding sections for reference:

[Software\\Wine\\Debug] 1603141984
#time=1d6a65ca248ec02
"RelayExclude"="ntdll.RtlEnterCriticalSection;ntdll.RtlTryEnterCriticalSection;ntdll.RtlLeaveCriticalSection;kernel32.48;kernel32.49;kernel32.94;kernel32.95;kernel32.96;kernel32.97;kernel32.98;kernel32.TlsGetValue;kernel32.TlsSetValue;kernel32.FlsGetValue;kernel32.FlsSetValue;kernel32.SetLastError"
"RelayFromExclude"="winex11.drv;winemac.drv;user32;gdi32;advapi32;kernel32"

[Software\\Wine\\DllOverrides] 1603141984
#time=1d6a65ca25e02d6
"api-ms-win-crt-conio-l1-1-0"="native,builtin"
"api-ms-win-crt-heap-l1-1-0"="native,builtin"
"api-ms-win-crt-locale-l1-1-0"="native,builtin"
"api-ms-win-crt-math-l1-1-0"="native,builtin"
"api-ms-win-crt-runtime-l1-1-0"="native,builtin"
"api-ms-win-crt-stdio-l1-1-0"="native,builtin"
"api-ms-win-crt-time-l1-1-0"="native,builtin"
"atl100"="native,builtin"
"atl110"="native,builtin"
"atl120"="native,builtin"
"atl140"="native,builtin"
"concrt140"="native,builtin"
"msvcp100"="native,builtin"
"msvcp110"="native,builtin"
"msvcp120"="native,builtin"
"msvcp140"="native,builtin"
"msvcr100"="native,builtin"
"msvcr110"="native,builtin"
"msvcr120"="native,builtin"
"msvcr140"="native,builtin"
"ucrtbase"="native,builtin"
"vcomp100"="native,builtin"
"vcomp110"="native,builtin"
"vcomp120"="native,builtin"
"vcomp140"="native,builtin"
"vcruntime140"="native,builtin"

[Software\\Wine\\Drivers\\winepulse.drv] 1614725129
#time=1d70fb5bebe445a

I've added the overrides myself, but SMM throws the exact same error.

I see in the stack trace that it's being called from legendary.js, but I'm using Steam. Turns out that legendary thought it had a copy of SF installed, even though I nuked it ages ago. I had to reinstall the game through legendary, then uninstall it again. That fixed it.