SteveTownsend/SmartHarvestSE

5.9.1 CTDs

Closed this issue · 5 comments

Hi Mate. Sorry to say CTD with 5.9.1. I have a repeatable CTD on my save now so will make testing easier.
crash-2024-06-20-01-40-42.log

This is a straight-up null pointer in RAX

	[ 0] 0x7FFDFB53C6C4 SmartHarvestSE.dll+008C6C4	call [rax+0x380] |  I:\GitHub\SmartHarvestSE\src\Looting\ReferenceFilter.cpp:288 ?RecordReference@ReferenceFilter@shse@@AEAAXPEAVTESObjectREFR@RE@@@Z
	[ 1] 0x7FFDFB53CB0C SmartHarvestSE.dll+008CB0C	mov rbx, [rbx] |  I:\GitHub\SmartHarvestSE\src\Looting\ReferenceFilter.cpp:404 ?RecordCellReferences@ReferenceFilter@shse@@AEAAXPEAVTESObjectCELL@RE@@_N@Z
	[ 2] 0x7FFDFB53CC2B SmartHarvestSE.dll+008CC2B	add rbx, 0x08 |  I:\GitHub\SmartHarvestSE\src\Looting\ReferenceFilter.cpp:430 ?FilterNearbyReferences@ReferenceFilter@shse@@AEAAXXZ
	[ 3] 0x7FFDFB53FF6A SmartHarvestSE.dll+008FF6A	nop |  I:\GitHub\SmartHarvestSE\src\Looting\ScanGovernor.cpp:575 ?LootAllEligible@ScanGovernor@shse@@AEAAXXZ
	[ 4] 0x7FFDFB54042A SmartHarvestSE.dll+009042A	call 0x00007FFDFB545170 |  I:\GitHub\SmartHarvestSE\src\Looting\ScanGovernor.cpp:659 ?DoPeriodicSearch@ScanGovernor@shse@@QEAAXW4ReferenceScanType@2@@Z
	[ 5] 0x7FFDFB59065E SmartHarvestSE.dll+00E065E	jmp 0x00007FFDFB590370 |  I:\GitHub\SmartHarvestSE\src\PluginFacade.cpp:250 ?ScanThread@PluginFacade@shse@@CAXXZ
	[ 6] 0x7FFDFB58FD59 SmartHarvestSE.dll+00DFD59	int3 |  I:\GitHub\SmartHarvestSE\src\PluginFacade.cpp:126 ?Init@PluginFacade@shse@@QEAA_NXZ
	[ 7] 0x7FFDFB590FD9 SmartHarvestSE.dll+00E0FD9	int3 |  C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\type_traits:1729 ?OnSettingsPushed@PluginFacade@shse@@QEAAXXZ
	[ 8] 0x7FFDFB590FB6 SmartHarvestSE.dll+00E0FB6	int3 |  C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\thread:60 ?OnSettingsPushed@PluginFacade@shse@@QEAAXXZ
	[ 9] 0x7FFEAB9E9333       ucrtbase.dll+0029333
	[10] 0x7FFEAD94257D       KERNEL32.DLL+001257D
	[11] 0x7FFEADF4AF28          ntdll.dll+005AF28

REGISTERS:
	RAX 0x0                (size_t) [0]

More reports

From xLenax

Yup, unfortunately the crash is still happening. Same place, btw. Apparently same crashlog from before.

From himom4

here,
2024-06-20-02-54-10.log - Pastebin.com
I'm in the middle of nowhere, and it just crashed, I'd just opened the game.
Edit: once again right after I reopened the game, 2024-06-20-03-03-36.log - Pastebin.com (just in case it occurred differently)

I tried to reproduce this using Crulek the Ferryman. Could not, on an existing save with CFTO added post facto.
Decided to try with a new game, in case persistent REFRs might not be properly handled in existing save. During the start of the new game I got this and a CTD:

2024-06-20 08:14:46.978     info  34700 Filter 12 persistent REFRS in CELL 0x0000982a
2024-06-20 08:14:46.978    trace  34700 check and record REFR 0x00041fb9
2024-06-20 08:14:46.978    trace  34700 null base object for REFR 0x00041fb9
2024-06-20 08:14:46.978    trace  34700 check and record REFR 0x00000000

Crash log says:

	[RSP+0  ] 0x7FFC87E49819     (void* -> SmartHarvestSE.dll+0229819	test rax, rax |  I:\GitHub\SmartHarvestSE\build\_deps\commonlibsse-src\src\RE\T\TESObjectREFR.cpp:626 ?Is3DLoaded@TESObjectREFR@RE@@QEBA_NXZ I:\GitHub\SmartHarvestSE\build\_deps\commonlibsse-src\src\RE\T\TESObjectREFR.cpp:627 ?Is3DLoaded@TESObjectREFR@RE@@QEBA_NXZ)
	[RSP+8  ] 0x0                (size_t) [0]
	[RSP+10 ] 0x2011B7E4E80      (TESObjectCELL*)
		File: "Unofficial Skyrim Special Edition Patch.esp"
		Modified by: Skyrim.esm -> Update.esm -> Unofficial Skyrim Special Edition Patch.esp
		Flags: 0x0004000B 
		EditorID: "HelgenExterior02"
		FormID: 0x0000982A
		FormType: Cell (60)
		File: "Unofficial Skyrim Special Edition Patch.esp"
		Modified by: Skyrim.esm -> Update.esm -> Unofficial Skyrim Special Edition Patch.esp
		Flags: 0x0004000B kDestructible | kAltered | kInitialized
		EditorID: "HelgenExterior02"
		FormID: 0x0000982A
		FormType: Cell (60)
	[RSP+18 ] 0x200CDC37700      (void*)
	[RSP+20 ] 0xD4CA2FF890       (void*)
	[RSP+28 ] 0x20122C886F0      (void*)
	[RSP+30 ] 0x7FFC87D5F3F5     (void* -> SmartHarvestSE.dll+013F3F5	test al, al |  I:\GitHub\SmartHarvestSE\src\Looting\ReferenceFilter.cpp:288 ?RecordReference@ReferenceFilter@shse@@AEAAXPEAVTESObjectREFR@RE@@@Z)
	[RSP+38 ] 0x0                (size_t) [0]
	[RSP+40 ] 0x7FFD512C364B     (void* -> ucrtbase.dll+001364B	test eax, eax)
	[RSP+48 ] 0x2018879B270      (void*)
	[RSP+50 ] 0x7FFC87C70382     (void* -> SmartHarvestSE.dll+0050382	movzx ecx, byte ptr [rax] |  I:\GitHub\SmartHarvestSE\build\_deps\commonlibsse-src\include\REL\Module.h:84 ?get@Module@REL@@SAAEAV12@XZ)
	[RSP+58 ] 0xD4CA2FF4E8       (void*)
	[RSP+60 ] 0xB                (size_t) [11]
	[RSP+68 ] 0xD4CA2FF460       (void*)
	[RSP+70 ] 0x7FFC87C9CFB6     (void* -> SmartHarvestSE.dll+007CFB6	add rsp, 0x160 |  I:\GitHub\SmartHarvestSE\build\_deps\spdlog-src\include\spdlog\logger.h:335 ??$log_@I@logger@spdlog@@IEAAXUsource_loc@1@W4level_enum@level@1@V?$basic_string_view@DU?$char_traits@D@std@@@std@@$$QEAI@Z)
	[RSP+78 ] 0x0                (size_t) [0]
	[RSP+80 ] 0x0                (size_t) [0]
	[RSP+88 ] 0x0                (size_t) [0]
	[RSP+90 ] 0x3D112C9BD1871B   (size_t) [17188856869783323]
	[RSP+98 ] 0x7FFC8800BCD8     (char*) "check and record REFR 0x{:08x}"
	[RSP+A0 ] 0x1E               (size_t) [30]
	[RSP+A8 ] 0x0                (size_t) [0]
	[RSP+B0 ] 0x0                (size_t) [0]
	[RSP+B8 ] 0x0                (size_t) [0]
	[RSP+C0 ] 0x0                (size_t) [0]
	[RSP+C8 ] 0x20176EA2B40      (char*) "Filter 12 persistent REFRS in CELL 0x0000982a"
	[RSP+D0 ] 0x2D               (size_t) [45]
	[RSP+D8 ] 0x20176EA2B40      (char*) "Filter 12 persistent REFRS in CELL 0x0000982a"
	[RSP+E0 ] 0x0                (size_t) [0]
	[RSP+E8 ] 0x2D               (size_t) [45]
	[RSP+F0 ] 0x2F               (size_t) [47]
	[RSP+F8 ] 0x4000000000000000 (size_t) [4611686018427387904]
	[RSP+100] 0x2000000000000008 (size_t) [2305843009213693960]
	[RSP+108] 0xC                (size_t) [12]
	[RSP+110] 0x7FFC0000982A     (size_t) [140720308525098]
	[RSP+118] 0x0                (size_t) [0]
	[RSP+120] 0x2018879B160      (void*)
	[RSP+128] 0x20122C32E10      (void*)
	[RSP+130] 0xD4CA2FF890       (void*)
	[RSP+138] 0xD4CA2FF529       (void*)
	[RSP+140] 0x7FFC87D5FD2C     (void* -> SmartHarvestSE.dll+013FD2C	mov rbx, [rbx] |  I:\GitHub\SmartHarvestSE\src\Looting\ReferenceFilter.cpp:404 ?RecordCellReferences@ReferenceFilter@shse@@AEAAXPEAVTESObjectCELL@RE@@_N@Z)

Here are the actual persistent REFRs in this cell

	Line   70051: 2024-06-20 08:11:47.234    trace  34544 Persistent REFR 0x000654f5 to item Imperial Soldier/0x00047cba Placed in CELL (4,-20)
	Line   70514: 2024-06-20 08:11:47.236    trace  34544 Persistent REFR 0x000654ee to item Stormcloak Soldier/0x000cd6bc Placed in CELL (4,-20)
	Line   71048: 2024-06-20 08:11:47.240    trace  34544 Persistent REFR 0x000e1e93 to item Imperial Soldier/0x000e1e95 Placed in CELL (4,-20)
	Line   73113: 2024-06-20 08:11:47.252    trace  34544 Persistent REFR 0x000654ef to item Stormcloak Soldier/0x001098a1 Placed in CELL (4,-20)
	Line   74145: 2024-06-20 08:11:47.258    trace  34544 Persistent REFR 0x000f824b to item Bandit/0xff00087c Placed in CELL (4,-20)
	Line   77574: 2024-06-20 08:11:47.281    trace  34544 Persistent REFR 0x000654f0 to item Stormcloak Soldier/0x000cd6bd Placed in CELL (4,-20)
	Line   79368: 2024-06-20 08:11:47.292    trace  34544 Persistent REFR 0x000654fb to item Lokir/0x0004679a Placed in CELL (4,-20)
	Line   81039: 2024-06-20 08:11:47.302    trace  34544 Persistent REFR 0x000e491e to item Imperial Soldier/0x000e4920 Placed in CELL (4,-20)
	Line   81059: 2024-06-20 08:11:47.302    trace  34544 Persistent REFR 0x000aaf96 to item Gunnar Stone-Eye/0x00013643 Placed in CELL (4,-20)
	Line   81071: 2024-06-20 08:11:47.302    trace  34544 Persistent REFR 0x000654f6 to item Imperial Soldier/0x00047cba Placed in CELL (4,-20)
	Line   81075: 2024-06-20 08:11:47.302    trace  34544 Persistent REFR 0x000654ed to item Stormcloak Soldier/0x000f778f Placed in CELL (4,-20)
	Line   82721: 2024-06-20 08:11:47.312    trace  34544 Persistent REFR 0x000d56d7 to item Imperial Soldier/0x000d7d8e Placed in CELL (4,-20)
	Line 1503256: 2024-06-20 08:14:46.957     info  34700 Cell 0x0000982a at (4,-20) is adjacent to player

Here is new handling at startup

2024-06-20 09:37:22.479    trace  38604 Skip persistent REFR 0x1c014c81
2024-06-20 09:37:22.479    trace  38604 Actor 0x1c014c81 Base Crulek/0x1c014c80 does not Start Dead

Regarding player log
The only persistent REFR in scope at the time of their CTD will now be filtered out

2024-06-20 15:29:12.204    trace   6608 Persistent REFR 0x00045a05 to item Cave Bear/0xff001c99 Placed in CELL (-21,-11)
2024-06-20 15:29:12.204    trace   6608 Actor 0x00045a05 Base Cave Bear/0xff001c99 does not Start Dead
2024-06-20 15:36:26.622     info  13524 Cell 0x00009b22 at (-21,-11) is adjacent to player
2024-06-20 15:37:32.793     info  13524 Filter 1 persistent REFRS in CELL 0x00009b22
2024-06-20 15:37:32.793    trace  13524 check and record REFR 0x46dbcb92