Default VS2019 Exception Settings Prevent Debugging AutoCAD 2023

Default VS2019 Exception Settings Prevent Debugging AutoCAD 2023

Kyudos
Advisor Advisor
650 Views
6 Replies
Message 1 of 7

Default VS2019 Exception Settings Prevent Debugging AutoCAD 2023

Kyudos
Advisor
Advisor

Trying to debug my ARX in ACAD 2023 / VS2019 with the default VS exception settings leads to an access violation error in starting up acad.exe which prevents the debugger from starting (this is before it even gets to loading my ARX).

 

I can ignore access violation errors and everything proceeds, seemingly as normal. But globally ignoring access violations doesn't seem like the best aid to debugging?

 

Is this normal? What else should I / shouldn't I be doing?

 

Cheers.

0 Likes
651 Views
6 Replies
Replies (6)
Message 2 of 7

daniel_cadext
Advisor
Advisor

How are you starting the debugger? I always start AutoCAD, then attach to process, then load my ARX module.

I don’t think I’ve ever seen an exception before On_kInitAppMsg

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes
Message 3 of 7

Kyudos
Advisor
Advisor

I start debugging directly from VS (F5) using the debug command line to launch AutoCAD and load a profile (/P option) that autoloads my debug ARX. This has been working fine until I tried to make my 2023 build. As I say, if I ignore the access violation the ARX loads fine. It also loads fine if I "Start without debugging" or if I start AutoCAD and then APPLOAD my arx.

0 Likes
Message 4 of 7

daniel_cadext
Advisor
Advisor

Are you getting the access violations, debugging without loading your module?

I’m always doing dumb stuff like putting something in On_kInitAppMsg that needs a document, or a working database

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes
Message 5 of 7

Kyudos
Advisor
Advisor

Yes - it seems related to starting AutoCAD from the debugger.

 

Exception details:

 

 

 

 

Exception thrown at 0x00007FFD86ACC439 in acad.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

Stack:
00007ffd86acc439()
00007ffd86acc1b6()
00007ffd86ac9f32()
00007ffd86ac9063()
00007ffd86ac3099()
Acdbmgd.ni.dll!00007ffd931c612b()
Acdbmgd.ni.dll!00007ffd931c559f()
00007ffd8698d9c3()

 

 

 

I find I can F5 through it (twice) but it's still annoying.

 

0 Likes
Message 6 of 7

66713205
Explorer
Explorer

project setting->C/C++->Runtime Library:multithead DLL (/MD)

0 Likes
Message 7 of 7

Kyudos
Advisor
Advisor

Yeah, already using that...

0 Likes