Crashing Problems

It Does What It Says on the Tin: Resolved Issues

Moderators: Moderator, Quality Control, Developer, DM

Post Reply
User avatar
cosmic ray
Posts: 803
Joined: Tue Feb 11, 2014 9:54 pm

Crashing Problems

Unread post by cosmic ray »

I've experienced some crashing problems lately since I started playing on Windows 10 and I asked about it on the server discord, but, most likely because nobody could realistically have a clue about this just from the description of the problem, I didn't get an answer, so I'm going to post the description here in the hope that someone some day reads it and might know what it's about.
When I play nwn2 on my windows 10 computer, I get some very weird game crashes that just freeze the game, make this blip sound that you usually get with w10 error messages and eventually make me crash to desktop. I never get to read the error message because the screen just freezes and when it unfreezes, everything is gone and I'm looking at my normal desktop. This never happened on w7. Does anyone know what might be causing this? Is it a known problem?
It doesn't happen all the time, but it's more common than I'm comfortable with.
You are fined one credit for a violation of the Verbal Morality Statute.
mf_hansen
Posts: 49
Joined: Sat Jan 16, 2010 3:19 pm
Location: GMT+1 (18:00-23:00)

Re: Crashing Problems

Unread post by mf_hansen »

Sorry for necro, just want to mention you can find some extra logs and memory.dmp in your %localappdata%\temp\nwn2 folder (or NWN2CliExt_5076 for the client extender in temp also) sometimes it may help figure out what's going on since latest crash. The dumps\memory.dmp file I think is intented for the WinDbg tool to read, you can't open it in notepad and make any sense of it.

https://apps.microsoft.com/store/detail ... GJGD53TN86

https://learn.microsoft.com/en-us/troub ... -dump-file

I got an error "Could not open dump file [<filepath>], HRESULT 0x80004005" trying to open the dmp file so maybe it's for a different tool. The same happens if I use WinDbg provided from the Windows SDK (only installing the debugging tools):

https://developer.microsoft.com/en-us/w ... ndows-sdk/

Anyway just wanted to mention this here if it's any use - I've crashed/frozen NWN2 twice now with latest AMD graphics drivers (no other games/singleplayer crash) and logged back into fugue after server reset, so I may have to reconsider playing on the server. Good luck to all with similar issues!
User avatar
Aspect of Sorrow
Custom Content
Posts: 2633
Joined: Fri Mar 28, 2014 7:11 pm
Location: Reliquary

Re: Crashing Problems

Unread post by Aspect of Sorrow »

mf_hansen wrote: Tue Feb 14, 2023 2:13 am "Could not open dump file [<filepath>], HRESULT 0x80004005"
Run as an administrator.
mf_hansen
Posts: 49
Joined: Sat Jan 16, 2010 3:19 pm
Location: GMT+1 (18:00-23:00)

Re: Crashing Problems

Unread post by mf_hansen »

No luck sadly, but good suggestion! And thanks for the copypaste text tool link :) I read somewhere else that memory dumps sometimes get corrupted when there is a memory leak happening - memory.dmp file is 580 MB large so maybe I'll just keep an eye on NWN2 memory usage while playing if it happens again, it seems to be the starting bandit cave outside Baldur's Gate, the one questing for stolen goods.

Below is the kerneldebug kd.exe command line I used (same result for windbg.exe gui) if anyone is interested (run from admin command prompt):

"C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\kd.exe"
-y "cache*%PROGRAMDATA%\Dbg;srv*http://msdl.microsoft.com/download/symbols"
-i "C:\Program Files (x86)\Neverwinter Nights 2"
-z "%localappdata%\temp\nwn2\Dumps\memory.dmp"

Code: Select all

C:\Program Files (x86)\Windows Kits\10\Debuggers\x86>dumpchk %localappdata%\temp\nwn2\Dumps\memory.dmp
Loading dump file C:\Users\..\memory.dmp

Microsoft (R) Windows Debugger Version 10.0.22621.755 X86
Copyright (c) Microsoft Corporation. All rights reserved.

Loading Dump File [C:\Users\..\memory.dmp]
Minidump does not have system info
Minidump does not have system info
Minidump does not have system info
Could not open dump file [C:\Users\..\memory.dmp], HRESULT 0x80004005
    "Unspecified error"
**** DebugClient cannot open DumpFile - error 80004005
User avatar
Aspect of Sorrow
Custom Content
Posts: 2633
Joined: Fri Mar 28, 2014 7:11 pm
Location: Reliquary

Re: Crashing Problems

Unread post by Aspect of Sorrow »

Crashing trying to create a minidump from the primary? Unable to read from the larger dump file?

Can you enable WER and generate the usermode dump to your user's mydoc directory then see if it generates the full file there?
mf_hansen
Posts: 49
Joined: Sat Jan 16, 2010 3:19 pm
Location: GMT+1 (18:00-23:00)

Re: Crashing Problems

Unread post by mf_hansen »

WER is set up now in regedit for full dumptype 2 and I managed to provoke an appcrash in charmap.exe to ensure it works :) https://stackoverflow.com/a/31955238

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps
CustomDumpFlags REG_DWORD=0
DumpCount REG_DWORD=10
DumpFolder REG_EXPAND_SZ=%USERPROFILE%\Documents\CrashDumps
DumpType REG_DWORD=2

Will reply if I manage to cause the NWN2 freeze/crash again, so far it has not crashed actually, after SFC /scannow and a Windows 10 update.

Code: Select all

Microsoft (R) Windows Debugger Version 10.0.25200.1003 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\..\Documents\CrashDumps\charmap.exe.1084.dmp]
User Mini Dump File with Full Memory: Only application data is available


************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*http://msdl.microsoft.com/download/symbols
Symbol search path is: srv*http://msdl.microsoft.com/download/symbols
Executable search path is: 
Windows 10 Version 19045 MP (4 procs) Free x64
Product: WinNt, suite: SingleUserTS
Edition build lab: 19041.1.amd64fre.vb_release.191206-1406
Machine Name:
Debug session time: Wed Feb 15 23:25:42.000 2023 (UTC + 1:00)
System Uptime: 0 days 6:27:36.505
Process Uptime: 0 days 0:07:40.000
..............................................
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(43c.1d44): Access violation - code c0000005 (first/second chance not available)
For analysis of this file, run !analyze -v
ntdll!NtWaitForMultipleObjects+0x14:
00007ffd`62f4dc14 c3              ret
mf_hansen
Posts: 49
Joined: Sat Jan 16, 2010 3:19 pm
Location: GMT+1 (18:00-23:00)

Re: Crashing Problems

Unread post by mf_hansen »

Ah there we go, had another freeze inside Baldur's Gate (the Wide near Three Kegs Tavern). I used .dump command to create a mindump out of the full 2GB memory dump: https://www.dropbox.com/s/8opz7ts6g8bja ... 0.dmp?dl=1 + https://www.dropbox.com/s/8opz7ts6g8bja ... 1.dmp?dl=1

!analyze -v mentions some kind of NWN2_MemoryMgr.dll access violation halfway down, not sure what to make of it, maybe my install is just broken - no overrides installed but maybe I should do a fresh reinstall and bgtscc download.

My nwn.ini from game folder (not documents) had the following settings if relevant (trying memory access 1 and disable point light shadows now):
[Game Options]
Memory Level=1
Memory Access=0
Debug Text=0
Object Selection Mode=3
DebugMode=1

Code: Select all

Microsoft (R) Windows Debugger Version 10.0.22621.755 X86
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\Mikkel\AppData\Local\temp\nwn2\Dumps\memory.dmp]
User Mini Dump File: Only registers, stack and portions of memory are available


************* Path validation summary **************
Response                         Time (ms)     Location
OK                                             C:\Program Files (x86)\Neverwinter Nights 2

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       cache*C:\ProgramData\Dbg
Deferred                                       srv*http://msdl.microsoft.com/download/symbols
Symbol search path is: cache*C:\ProgramData\Dbg;srv*http://msdl.microsoft.com/download/symbols
Executable search path is: C:\Program Files (x86)\Neverwinter Nights 2
Windows 10 Version 19045 MP (4 procs) Free x86 compatible
Product: WinNt, suite: SingleUserTS
Edition build lab: 19041.1.amd64fre.vb_release.191206-1406
Machine Name:
Debug session time: Fri Feb 17 23:04:18.000 2023 (UTC + 1:00)
System Uptime: not available
Process Uptime: 0 days 1:14:36.000
................................................................
................................................................
...............................................
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(205c.2130): Access violation - code c0000005 (first/second chance not available)
For analysis of this file, run !analyze -v
eax=00000000 ebx=00000000 ecx=58244489 edx=003ad000 esi=00000000 edi=00001e0c
eip=773e2b1c esp=0019f464 ebp=0019f4d4 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000202
ntdll!NtWaitForSingleObject+0xc:
773e2b1c c20c00          ret     0Ch
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

*** WARNING: Unable to verify checksum for nwn2main.exe
*** WARNING: Unable to verify checksum for mss32.dll
Failed to request MethodData, not in JIT code range

KEY_VALUES_STRING: 1

    Key  : AV.Fault
    Value: Write

    Key  : Analysis.CPU.mSec
    Value: 62468

    Key  : Analysis.DebugAnalysisManager
    Value: Create

    Key  : Analysis.Elapsed.mSec
    Value: 289032

    Key  : Analysis.Init.CPU.mSec
    Value: 608

    Key  : Analysis.Init.Elapsed.mSec
    Value: 9347

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 236

    Key  : CLR.BuiltBy
    Value: NET48REL1LAST_B

    Key  : CLR.Engine
    Value: CLR

    Key  : CLR.MissingMetaData
    Value: clr!g_pConfig

    Key  : CLR.Version
    Value: 4.8.4614.0

    Key  : Timeline.Process.Start.DeltaSec
    Value: 4476

    Key  : WER.OS.Branch
    Value: vb_release

    Key  : WER.OS.Timestamp
    Value: 2019-12-06T14:06:00Z

    Key  : WER.OS.Version
    Value: 10.0.19041.1

    Key  : WER.Process.Version
    Value: 1.0.23.1765


FILE_IN_CAB:  memory.dmp

CONTEXT:  (.ecxr)
eax=9b8d0000 ebx=1eb33590 ecx=58244489 edx=003ad000 esi=0043bd2c edi=01108e0f
eip=10002ad7 esp=0019fd90 ebp=00000000 iopl=0         nv up ei ng nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010286
NWN2_MemoryMgr!NWN2_Heap::Deallocate+0x1820:
10002ad7 894804          mov     dword ptr [eax+4],ecx ds:002b:9b8d0004=????????
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 10002ad7 (NWN2_MemoryMgr!NWN2_Heap::Deallocate+0x00001820)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000001
   Parameter[1]: 9b8d0004
Attempt to write to address 9b8d0004

PROCESS_NAME:  nwn2main.exe

WRITE_ADDRESS:  9b8d0004 

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  00000001

EXCEPTION_PARAMETER2:  9b8d0004

STACK_TEXT:  
00000000 00000000     00000000 00000000 00000000 NWN2_MemoryMgr!NWN2_Heap::Deallocate+0x1820


STACK_COMMAND:  ~0s; .ecxr ; kb

SYMBOL_NAME:  NWN2_MemoryMgr+1820

MODULE_NAME: NWN2_MemoryMgr

IMAGE_NAME:  NWN2_MemoryMgr.dll

FAILURE_BUCKET_ID:  INVALID_POINTER_WRITE_c0000005_NWN2_MemoryMgr.dll!Unknown

BUCKET_ID_MODPRIVATE: 1

OS_VERSION:  10.0.19041.1

BUILDLAB_STR:  vb_release

OSPLATFORM_TYPE:  x86

OSNAME:  Windows 10

IMAGE_VERSION:  1.0.23.1765

FAILURE_ID_HASH:  {3dae4ee9-977b-4fbf-8318-cc697643a951}

Followup:     MachineOwner
---------

Post Reply

Return to “Solved Problems”