Inconsistent crash on unity3d : 'Attempt to access invalid address.' (Address: 0000000061BEBED5)

Im getting a crash on unity3d builds with nuitrack. It isn’t very consistent. Possibly having to due with movements, but I’m not sure. The crash log gives a “Attempt to access invalid address” error.

one of the lines of the stack trace mentions “gesture_recognition” : ZNK5boost7archive6detail19pointer_oserializerINS0_13text_oarchiveEN3tdv19gesture_recognition19AnalogousRecognizerEE15save_object_ptrERNS1_14basic_oarchiveEPKv

which I’m not doing gesture recognition. Just skeletal tracking (using the first project example project)

Any suggestions on how narrow down the bug.

NuiTrack ver v0.33.0 <- shown in activation tool
Unity Package version (v0.33.0)
Unity version 2019.4.f11.1

ntdll.dll caused an Access Violation (0xc0000005)
in module ntdll.dll at 0033:d37b6003.

Error occurred at 2020-10-02_165316.
C:\UnityProject\App\App.exe, run by Developer.

Stack Trace of Crashed Thread 11636:
0x00007FFBD37B6003 (ntdll) memset
0x00007FFBD3725D21 (ntdll) RtlFreeHeap
0x00007FFBD17E9C9C (msvcrt) free
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 0000000061BEBED5)
0x0000000061BEBED5 (NuitrackModule) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00000000618A0EA1)
0x00000000618A0EA1 (NuitrackModule) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00000000618A1C75)
0x00000000618A1C75 (NuitrackModule) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 000000006187EB38)
0x000000006187EB38 (NuitrackModule) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 000000006185E93D)
0x000000006185E93D (NuitrackModule) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 000000006181FB62)
0x000000006181FB62 (NuitrackModule) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00000000618218BA)
0x00000000618218BA (NuitrackModule) (function-name not available)
0x0000000061DE36F0 (NuitrackModule) ZNK5boost7archive6detail19pointer_oserializerINS0_13text_oarchiveEN3tdv19gesture_recognition19AnalogousRecognizerEE15save_object_ptrERNS1_14basic_oarchiveEPKv
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 000000006192136C)
0x000000006192136C (NuitrackModule) (function-name not available)
0x00007FFBD180AF5A (msvcrt) beginthreadex
0x00007FFBD180B02C (msvcrt) endthreadex
0x00007FFBD2926FD4 (KERNEL32) BaseThreadInitThunk
0x00007FFBD375CEC1 (ntdll) RtlUserThreadStart

Stacks for Running Threads:

Call Stack for Thread 8:
0x00007FFBD37AC444 (ntdll) ZwDelayExecution
0x00007FFBD14E818E (KERNELBASE) SleepEx
0x00007FFB9318E3CA (UnityPlayer) UnityMain
0x00007FFB931901A6 (UnityPlayer) UnityMain
0x00007FFB933D0E24 (UnityPlayer) UnityMain
0x00007FFB933C5707 (UnityPlayer) UnityMain
0x00007FFB933C57A3 (UnityPlayer) UnityMain
0x00007FFB933C7BAB (UnityPlayer) UnityMain
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFB93184B7E)
0x00007FFB93184B7E (UnityPlayer) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFB931838DA)
0x00007FFB931838DA (UnityPlayer) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFB9318779C)
0x00007FFB9318779C (UnityPlayer) (function-name not available)
0x00007FFB9318B23B (UnityPlayer) UnityMain
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FF6D7CD11F2)
0x00007FF6D7CD11F2 (App) (function-name not available)
0x00007FFBD2926FD4 (KERNEL32) BaseThreadInitThunk
0x00007FFBD375CEC1 (ntdll) RtlUserThreadStart

Hello,
You can ignore this bug report above…I figured out what happened…

this bug was actually if you call Appplication.Quit(); the dll doesn’t get gracefully unloaded. No error message is shown to the user, but there is a nasty looking stack trace that gets written. Which can be safely ignored… So i think the solution here is to hook into the quit callback to unload nui track the full quit happens or just write a log message in big friendly letters to say “DONT PANIC”\

Sorry about the false bug report. :100:

2 Likes

Dear DrDoob!

Could you describe your issue in more detail?

How exactly do you unload Nuitrack? You call NuitrackManager.Instance.StopNuitrack() or nuitrack.Nuitrack.Release() (the correct way is to call NuitrackManager.Instance.StopNuitrack())?

quit callback to unload nui track

Do you mean the OnApplicationQuit method?

Looking forward to your feedback.