I got a crash from a user. He is using my VST3 plugin inside FL Studio (called Disturia). FL Studio gives a stack trace. But its just numbers, and no function names.
Is there a way to “symbolicate” the stack trace? Similar to how you can do it on Mac. So that you know in which function it crashed.
Here is what the FL Studio crash log looks like (slightly shortened by me):
FL Studio (24.1.0.4225) [64Bit] r37347 has encountered an error and needs to restart.
Exception:
Access violation at address 00007FFD19F650A0 in module 'Disturia.vst3'. Read of address 000000040BE87000
Callstack:
00007FFD17EB0000:00007FFD19F650A0: Disturia.vst3
00007FFD17EB0000:00007FFD19DE54BA: Disturia.vst3
00007FFD17EB0000:00007FFD19DE4681: Disturia.vst3
00007FFD17EB0000:00007FFD19DE1E2B: Disturia.vst3
00007FFD17EB0000:00007FFD19DE1F8C: Disturia.vst3
00007FFD17EB0000:00007FFD1A167EAB: Disturia.vst3
00007FFD17EB0000:00007FFD1A1860B8: Disturia.vst3
00007FFD17EB0000:00007FFD1A1811C1: Disturia.vst3
00007FFD17EB0000:00007FFD1A1D6B49: Disturia.vst3
00007FFD17EB0000:00007FFD19DD8068: Disturia.vst3
00007FFD17EB0000:00007FFD19DD7CE8: Disturia.vst3
00007FFD72E50000:00007FFD72E5EF5C: USER32.dll
00007FFD72E50000:00007FFD72E5E684: USER32.dll
0000000065420000:000000006594D75A: FLEngine_x64.dll
0000000065420000:000000006594D7C8: FLEngine_x64.dll
0000000065420000:000000006594DC9A: FLEngine_x64.dll
0000000065420000:00000000661F4829: FLEngine_x64.dll
00007FF6AEAE0000:00007FF6AEE05C31: FL64.exe
00007FF6AEAE0000:00007FF6AEE05E0E: FL64.exe
00007FF6AEAE0000:00007FF6AEB10956: FL64.exe
00007FFD729E0000:00007FFD729F7374: KERNEL32.DLL
00007FFD74710000:00007FFD7475CC91: ntdll.dll
Modules:
Disturia.vst3: C:\Program Files\Common Files\VST3\Disturia.vst3
USER32.dll: C:\WINDOWS\System32\USER32.dll
FLEngine_x64.dll: C:\Program Files\Image-Line\FL Studio 2024\FLEngine_x64.dll
FL64.exe: C:\Program Files\Image-Line\FL Studio 2024\FL64.exe
KERNEL32.DLL: C:\WINDOWS\System32\KERNEL32.DLL
ntdll.dll: C:\WINDOWS\SYSTEM32\ntdll.dll
You need to get a minidump file. Ableton bundles this in the crash zip file. I’m not sure where FL Studio puts it. Once you have that, you can load it into Visual Studio and you should then get the exact stack trace as if you were running it in the debugger.
Once you get the .dmp file from your user (I think crashlogs end up here C:\Users\<YOUR_USER>\AppData\Local\CrashDumps), here are some notes i wrote for myself a while ago, hope this helps. Haven’t done it for a while bit hopefully this hasn’t changed:
Open Visual Studio
Open the dump file (you can drop it into Visual Studio)
In the tab of your opened dump file, click on “Set Symbols Path”, then add the path to the .pdb file corresponding to the crashed build (note: if you crash the plugin on the same machine that built it, the path to the symbols is already baked into the dump file. you can verify the symbols are actually removed from the build by moving the pdb file somewhere else. on windows i think symbols are always stripped from build anyway…)
Click on “Debug with Native Only”
You should be able to see the symbolicated crashed stack…
If you are symbolicating a dump for a build that was not created on your machine, it will probably ask you for the location of a source file.
Once you locate it (watch out, the code should be the same version as the released one, so check the correct tag on github !), it will likely locate all the other missing source files and you can then navigate in the code as if you reproduced the bug on your machine with the debugger attached: you can see the variables etc, amazing!
If it does not ask you for the source files location and does not show the code, you can try right-clicking on your solution in the solution explorer, then Properties → Debug Source Files → Add your sources folder here
And one note to add:
Apparently the following registry key must be available in Windows, in order for it to generate crash dumps:
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps”