.NET

Reply
Mentor
Rob.O
Posts: 259
Registered: ‎06-25-2007
Message 1 of 9 (373 Views)

VS Debugging crashes AutoCAD frequently

373 Views, 8 Replies
03-20-2012 08:06 AM

Hi everyone!

 

Just out of curiosity... does anyone else have a problem with AutoCAD crashing frequently when using it as the debug startup program from VS?  I would say it crashes (or locks up) 6 out of every 10 times I start debugging from VS.  The crash always occurs at the loading screen (logo screen).

 

Sometimes it will crash 3-4 times in a row before it finally loads without a crash.  This occurs with 2011 and 2012.  Not a big deal, just a minor anoyance.

 

Just wondering if anyone else has experienced this?

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 2 of 9 (368 Views)

Re: VS Debugging crashes AutoCAD frequently

03-20-2012 08:40 AM in reply to: Rob.O

My guess would be to change the .net target to 3.5, I've seen where 4.0 has issues.

---------------------------



(defun botsbuildbots() (botsbuildbots))
Mentor
Rob.O
Posts: 259
Registered: ‎06-25-2007
Message 3 of 9 (352 Views)

Re: VS Debugging crashes AutoCAD frequently

03-20-2012 12:28 PM in reply to: arcticad

Makes sense, but I only target .Net 3.5, so I don't think that's it.

 

I am not possitive, but itt seems like I used to have this issue on my old desktop machine (from over a year ago) as well.

*Expert Elite*
chiefbraincloud
Posts: 752
Registered: ‎02-13-2008
Message 4 of 9 (318 Views)

Re: VS Debugging crashes AutoCAD frequently

03-27-2012 03:06 PM in reply to: Rob.O

1. Check your system event logs to see if there is any useful information there about the error.

2.  try opening the task manager and watching the memory usage when you start the debug session.

3.  try running Process Monitor and filtering for process name = ACAD.  It's a pain to try and got through the thousands of lines in the log, but theoretically, you should be focused on the very end of the list.

 

for what it is worth, I have worked with VS 2005 professional and ACAD 2007, 2009, 2010, and I have been working with VS 2010 professional and ACAD 2012, and I have never had any major repeatable problem with AutoCAD hanging when I start a debug session.

 

Dave O.                                                                  Sig-Logos32.png
*Expert Elite*
Alfred.NESWADBA
Posts: 8,982
Registered: ‎06-29-2007
Message 5 of 9 (316 Views)

Re: VS Debugging crashes AutoCAD frequently

03-27-2012 03:14 PM in reply to: Rob.O

Hi,

 

have you installed

  • Framework-updates?
  • VS2010 SP1?
  • latest AutoCAD servicepacks?

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Member
sbarlage
Posts: 5
Registered: ‎12-14-2009
Message 6 of 9 (278 Views)

Re: VS Debugging crashes AutoCAD frequently

04-10-2012 02:54 AM in reply to: Alfred.NESWADBA

With SDK files from 2012 it crashes in debug, with 2011 files not. Debugging is only working at XP 32 Bit. This is what I find out the hard way here.

 

I am using Plant 3D 2012 and VS 2010

*Expert Elite*
Alfred.NESWADBA
Posts: 8,982
Registered: ‎06-29-2007
Message 7 of 9 (273 Views)

Re: VS Debugging crashes AutoCAD frequently

04-10-2012 03:00 AM in reply to: sbarlage

Hi,

 

there are questions above for "servicepacks installed"? Have you installed them (FrameWork, AutoCAD, VisualStudio) or not?

 

One additional question to this sentence:

>> With SDK files from 2012

What do you mean with that? What SDK and what SDK-files do you use?

If you mean the DLL's like acDbMgd.dll, acMgd.dll, .... then try to use the ones that are stored in the AutoCAD--installation-directory and not the one from the ObjectARX-kit (what I now imagine you are speaking about).

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Member
sbarlage
Posts: 5
Registered: ‎12-14-2009
Message 8 of 9 (269 Views)

Re: VS Debugging crashes AutoCAD frequently

04-10-2012 03:09 AM in reply to: Alfred.NESWADBA

I am using files from the Object ARX SDK and from the Plant 2012 SDK on AutoCAD Plant 3D 2012 SP 1 German. All Microsoft updates and service packs are installed. VS 2010 is up to date too. .NET 4.0 or 3.5 does not matter, both are not working if the debugger is running. No problems running it outside of VS 2010.

 

If I am using the Interops from applications folder nothing is working. I have to use the files from the SDK.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,982
Registered: ‎06-29-2007
Message 9 of 9 (262 Views)

Re: VS Debugging crashes AutoCAD frequently

04-10-2012 03:34 AM in reply to: sbarlage

Hi,

 

>> .NET 4.0 or 3.5 does not matter, both are not working if the debugger is running

What makes you thinking that dotNET-based DLL's don't need Framework while running in debug-mode?

At least Framework 4 is active when you run an AutoCAD 2012-based vertical product. You may have a switch in the config-file that enables to use Framework 3.5 but that would be a workaround that's not stable (for me), so if you use this then try to switch to 4.0.

 

>> If I am using the Interops from applications folder nothing is working

If you show one time the TLB-file to be references in a sample-project VS creates a corresponding Interop-file. I copy this created Interop-file to a folder where I have stored all my lib's and for future projects when I have to add references I point to these Interop-files.

 

BTW. if you are using a lot of COM-based libs have you set the property "Embedd...." for the reference to false? Default it's set to true and that may end in troubles.

 

Viel Erfolg, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.