Line number info missing when Windows DLL gets EXCEPTION_ACCESS_VIOLATION

The DLL was compiled using MSVC toolchain with debug configuration. A .pdb file was generated alongside the .dll file. But it seems line number information is not being made available to Julia’s access violation handler:

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x7fffc435ed0e -- testCPPClient at C:\Users\kirby\MyDrive\Documents\TWS_API\build\Debug\TestCppClientLib.dll (unknown line)
in expression starting at none:0
testCPPClient at C:\Users\kirby\MyDrive\Documents\TWS_API\build\Debug\TestCppClientLib.dll (unknown line)
testCPPClient at C:\Users\kirby\MyDrive\Documents\TWS_API\build\Debug\TestCppClientLib.dll (unknown line)
testCPPClient at C:\Users\kirby\MyDrive\Documents\TWS_API\build\Debug\TestCppClientLib.dll (unknown line)
testCPPClient at C:\Users\kirby\MyDrive\Documents\TWS_API\build\Debug\TestCppClientLib.dll (unknown line)
testCPPClient at C:\Users\kirby\MyDrive\Documents\TWS_API\build\Debug\TestCppClientLib.dll (unknown line)
testCPPClient at C:\Users\kirby\MyDrive\Documents\TWS_API\build\Debug\TestCppClientLib.dll (unknown line)
testCPPClient at C:\Users\kirby\MyDrive\Documents\TWS_API\build\Debug\TestCppClientLib.dll (unknown line)
reqHistoricalData at C:\Users\kirby\.julia\packages\CxxWrap\VnssN\src\CxxWrap.jl:624
unknown function (ip: 0000027df9f3910a)
send at c:\Users\kirby\MyDrive\Documents\fourthwave\pkg\TwsApi\src\eventqueue.jl:217
unknown function (ip: 0000027df9f38c36)
receive at c:\Users\kirby\MyDrive\Documents\fourthwave\pkg\TwsApi\src\eventqueue.jl:267
unknown function (ip: 0000027df9f32142)
#6 at c:\Users\kirby\MyDrive\Documents\fourthwave\pkg\TwsApi\src\eventqueue.jl:302
#627 at .\channels.jl:134
unknown function (ip: 0000027df9f279f3)
jl_apply at C:/workdir/src\julia.h:1879 [inlined]
start_task at C:/workdir/src\task.c:1092
Allocations: 8437371 (Pool: 8432131; Big: 5240); GC: 12

I see that other people who have used DLL’s do get line number info. I’m using Julia 1.9.2 and CxxWrap.jl. Any pointers on how to report the line numbers?

Thanks!

Have you tried compiling with MinGW? For Visual Studio see the following on how to set that up.

Also you can try Clang:

1 Like

Haven’t tried that yet. I do see some people have had their DLL’s with MinGW environment and they got the line numbers. I wonder if it’s a MSVC compiler flag that happened to go with the MinGW environment? Thanks for your tip.