SmartHarvestSE icon indicating copy to clipboard operation
SmartHarvestSE copied to clipboard

CTDs

Open SteveTownsend opened this issue 9 months ago • 1 comments

A couple of dups with this in callstack

Unhandled exception "EXCEPTION_ACCESS_VIOLATION" at 0x7FF7464672DF SkyrimSE.exe+0C072DF
 
SYSTEM SPECS:
    OS: Microsoft Windows 10 Home 22H2 19045.4291
    CPU: AuthenticAMD AMD Ryzen 5 5600G with Radeon Graphics         
    GPU #1: AMD Radeon(TM) Graphics
    GPU #2: Microsoft Basic Render Driver
    RAM: 10.26 GiB/11.87 GiB
    PAGE FILE: 18.07 GiB/24.43 GiB
 
PROBABLE CALL STACK:
    [0 ] 0x7FF7464672DF       SkyrimSE.exe+0C072DF
        cmp [rdi],eax
    [1 ] 0x7FF745985F0C       SkyrimSE.exe+0125F0C
        nop
    [2 ] 0x7FF745AF6C54       SkyrimSE.exe+0296C54
        test al,al
    [3 ] 0x7FFEB177367B SmartHarvestSE.dll+00A367B
        movzx esi,al
    [4 ] 0x7FFEB177E3FF SmartHarvestSE.dll+00AE3FF
        mov rbx,[rsp+0B0h]
    [5 ] 0x7FF746AB09E9       SkyrimSE.exe+12509E9
        test al,al
CrashLoggerSSE v1-13-0-0 Apr  2 2024 17:58:19

Unhandled exception "EXCEPTION_ACCESS_VIOLATION" at 0x7FF7F26990CF SkyrimSE.exe+0CC90CF	cmp [rdi], eax

SYSTEM SPECS:
	OS: Microsoft Windows 11 Home v10.0.22631
	CPU: GenuineIntel 12th Gen Intel(R) Core(TM) i3-12100F
	GPU #1: AMD Polaris 20 XL [Radeon RX 580 2048SP]
	GPU #2: Microsoft Basic Render Driver
	PHYSICAL MEMORY: 19.69 GB/31.81 GB
	GPU MEMORY: 5.68/7.08 GB
	Detected Virtual Machine: Thread Expert (100%)

PROBABLE CALL STACK:
	[ 0] 0x7FF7F26990CF       SkyrimSE.exe+0CC90CF -> 68233+0xF	cmp [rdi], eax
	[ 1] 0x7FF7F1B3D2B4       SkyrimSE.exe+016D2B4 -> 12043+0x34	nop
	[ 2] 0x7FF7F1CBACFC       SkyrimSE.exe+02EACFC -> 19796+0xDC	movzx r13d, byte ptr [rbp+0x7F]
	[ 3] 0x7FF84EA0367B SmartHarvestSE.dll+00A367B
	[ 4] 0x7FF84EA0E3FF SmartHarvestSE.dll+00AE3FF
	[ 5] 0x7FF7F2E0DE05       SkyrimSE.exe+143DE05 -> 104651+0x205	test al, al
	[ 6] 0x7FF7F2E1EAF9       SkyrimSE.exe+144EAF9 -> 104853+0x789	mov r14d, eax

The callstack references IniSettingCollection which is only used in ActivateItem for HUD manipulation, suspect that WriteSetting here is not needed since the Setting object is a direct accessor for the value:

	bool ActivateItem(RE::StaticFunctionTag*, RE::TESObjectREFR* target, RE::TESObjectREFR* activator, bool suppressMessage, int activateCount)
	{
		RE::Setting* setting(nullptr);
		RE::INISettingCollection* iniSettingCollection(nullptr);
		bool showHUD(false);
		if (suppressMessage)
		{
			iniSettingCollection = RE::INISettingCollection::GetSingleton();
			setting = iniSettingCollection ? iniSettingCollection->GetSetting("bShowHUDMessages:Interface") : nullptr;
    		showHUD = (setting && setting->GetType() == RE::Setting::Type::kBool) ? setting->GetBool() : false;
		}
		if (showHUD)
		{
			setting->data.b = false;
			iniSettingCollection->WriteSetting(setting);
		}
		bool result(target->ActivateRef(activator, 0, nullptr, activateCount, false));
		if (showHUD)
		{
			setting->data.b = true;
			iniSettingCollection->WriteSetting(setting);
		}
		return result;
	}

SteveTownsend avatar May 06 '24 11:05 SteveTownsend