Debugging in mixed mode (.NET/CLR/Native) and asserts

Debugging in mixed mode (.NET/CLR/Native) and asserts

OysteinW
Advocate Advocate
505 Views
4 Replies
Message 1 of 5

Debugging in mixed mode (.NET/CLR/Native) and asserts

OysteinW
Advocate
Advocate

Hi!

I'm experiencing issues while debugging our application and some assert fails.

(For instance when triggering assertWriteEnabled() on an object only opened for kForRead.)

 

The issue I'm having is that the assert window never appears on the AutoCAD screen, and at the same time everything just completely hangs. It's not possible to break or exit the debugger process from Visual Studio or AutoCAD, and the call stack is empty. The only way out is to kill acad.exe through the Windows task manager. 

 

This issue does not occur while debugging in pure managed mode, and also if I set my ObjectArx project as startup and debug in pure native mode, it works as expected. It's only when using a .NET project as startup with "Enable native code debugging" activated that this problem occurs.

 

Visual Studio 2022 (17.7.0), AutoCAD 2023 / 2024. 

 

Does any one else experience the same problem, or have found a solution?

 

Best regards,

Øystein Wiger

Focus Software AS

0 Likes
506 Views
4 Replies
Replies (4)
Message 2 of 5

moogalm
Autodesk Support
Autodesk Support

Is it possible to create a simple repro project, do you see this problem on poly sample, or maybe you can use that as reference point, btw Poly sample is part of ObjectARX SDK [D:\Work\ArxSdks\ObjectARX2024\samples\entity\polysamp]

Message 3 of 5

OysteinW
Advocate
Advocate

Ok, sure. 

I've added a little snippet to mgPolyTestApp Class1.vb that shows the problem. 

 

OysteinW_0-1694086545798.png

I added the output folder to my support files path, and loaded adskpolyui.arx like this:

 

OysteinW_1-1694086562223.png

I then loaded the mgPolyTestVb project manually using NETLOAD and ran the "TestCreate" command.

-Problem occurs.

 

My modified polysamp is attached in the zip file.

 

Thanks for investigating! 

Best regards,

Øystein Wiger

Focus Software AS

 

0 Likes
Message 4 of 5

moogalm
Autodesk Support
Autodesk Support

I can replicate this at my end, it stalls debugger. I will keep you posted.

0 Likes
Message 5 of 5

OysteinW
Advocate
Advocate

Great, thanks!

 

Best regards,

Øystein Wiger

Focus Software AS

0 Likes