psiberx/cp2077-red-hot-tools

CTD on archive reload

Closed this issue · 2 comments

Cyberpunk crashes to desktop after pressing the "Hot Reload" button in WolvenKit or the one inside the CET addon. the .archive i was working on is an ArchiveXL clothes item and i was trying to change its .mlsetup. the crash always happens, regardless of .archive or type of modification though. RHT used to work reliably pre 2.11 and is a very helpful tool that saves a ton of time! i would very much like to be able to use it again!

red4ext log:

[2024-02-06 18:38:56.260] [info] [ArchiveWatcher] Watching "C:\Program Files (x86)\GOG Galaxy\Games\Cyberpunk 2077\archive\pc\hot" for changes...
[2024-02-06 18:38:56.262] [info] [ResourceRegistry] Loading metadata...
[2024-02-06 18:38:56.978] [info] [ResourceRegistry] Loaded 122143 predefined hashes.
[2024-02-06 18:42:48.002] [info] [ArchiveLoader] Archives reload requested...
[2024-02-06 18:42:48.003] [info] [ArchiveLoader] Found archives:
[2024-02-06 18:42:48.003] [info] [ArchiveLoader] - Ear_Plugs.archive
[2024-02-06 18:42:48.003] [info] [ArchiveLoader] Unloading game archives...

stacktrace.txt from the games crash report:

Error reason: Unhandled exception
Expression: EXCEPTION_ACCESS_VIOLATION (0xC0000005)
Message: The thread attempted to write to an inaccessible address at 0x7FF66B262ED8.
File: <Unknown>(0)

the log from the CET plugin is empty.

Fixed in 0.8.1.

hey, thanks for getting to this issue quickly! while my game doesn't crash anymore when reloading, RHT doesn't reload the .archive i'm currently working on and the updated .archive remains in .\archive\pc\hot. however, hot reloading does work properly with a different mod. the one where reloading doesn't work uses the dynamic appearances feature, while the other one uses the older method of registering appearances. dunno if this means anything.

here's another red4ext log:

[2024-02-07 16:14:55.070] [info] [ArchiveWatcher] Watching "C:\Program Files (x86)\GOG Galaxy\Games\Cyberpunk 2077\archive\pc\hot" for changes...
[2024-02-07 16:14:55.071] [info] [ResourceRegistry] Loading metadata...
[2024-02-07 16:14:55.251] [info] [ResourceRegistry] Loaded 122143 predefined hashes.
[2024-02-07 16:18:07.276] [info] [ArchiveLoader] Archives reload requested...
[2024-02-07 16:18:07.276] [info] [ArchiveLoader] Found archives:
[2024-02-07 16:18:07.276] [info] [ArchiveLoader] - void_Ear_Plugs.archive
[2024-02-07 16:18:07.276] [info] [ArchiveLoader] Unloading game archives...
[2024-02-07 16:18:07.277] [info] [ArchiveLoader] Moving updated archives...
[2024-02-07 16:18:07.277] [error] C:\Program Files (x86)\GOG Galaxy\Games\Cyberpunk 2077\archive\pc\mod\void_Ear_Plugs.archive: unknown error
[2024-02-07 16:18:07.277] [info] [ArchiveLoader] Loading updated archives...
[2024-02-07 16:18:07.277] [info] [ArchiveLoader] Resetting resource cache...
[2024-02-07 16:18:07.277] [info] [ArchiveLoader] Reloading archive extensions...
[2024-02-07 16:18:07.302] [info] [ArchiveLoader] Archives reload completed.
[2024-02-07 16:18:37.023] [info] [ArchiveLoader] Archives reload requested...
[2024-02-07 16:18:37.023] [info] [ArchiveLoader] Found archives:
[2024-02-07 16:18:37.023] [info] [ArchiveLoader] - void_Ear_Plugs.archive
[2024-02-07 16:18:37.023] [info] [ArchiveLoader] Unloading game archives...
[2024-02-07 16:18:37.023] [info] [ArchiveLoader] Moving updated archives...
[2024-02-07 16:18:37.023] [error] C:\Program Files (x86)\GOG Galaxy\Games\Cyberpunk 2077\archive\pc\mod\void_Ear_Plugs.archive: unknown error
[2024-02-07 16:18:37.023] [info] [ArchiveLoader] Loading updated archives...
[2024-02-07 16:18:37.023] [info] [ArchiveLoader] Resetting resource cache...
[2024-02-07 16:18:37.024] [info] [ArchiveLoader] Reloading archive extensions...
[2024-02-07 16:18:37.049] [info] [ArchiveLoader] Archives reload completed.

the CET log specific to RHT is empty, but scripting.log contains the following line:
[2024-02-07 16:14:58 UTC+01:00] [4980] Mod RedHotTools loaded! ('C:\Program Files (x86)\GOG Galaxy\Games\Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\mods\RedHotTools')