.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugger crash on Dictionary visualizer

6 REPLIES 6
Reply
Message 1 of 7
alex_b
284 Views, 6 Replies

Debugger crash on Dictionary visualizer

Hi,

 

I'm not sure this is Autocad specific, but I haven't been able to find anything on the issue anywhere else.

I use this Dictionary <string, Dictionary<string, int>> to gather data from several dwg files.

The program works Ok but when I try to expand the dictionary in the VS 2008 debugger it (the debugger) invariably crashes

(after a few seconds) and Autocad exits with 'Recursion too deep; the stack overflowed' error.

The dictionary is very small, typically a few dozens of items.

Has anyone seen this before?

 

Thanks for your help,

 

alex

6 REPLIES 6
Message 2 of 7
fieldguy
in reply to: alex_b

Your going to have to post some code, or explain what you are trying to accomplish.

 

>I use this Dictionary <string, Dictionary<string, int>> to gather data from several dwg files.

>The dictionary is very small, typically a few dozens of items.

 

This is not enough information.

 

Message 3 of 7
alex_b
in reply to: fieldguy

HI fieldguy,

 

As I said, the crash occurs only when the debugger tries to open the dictionary.

The program works fine. I can access the dictionary, iterate through it, etc.

I just can't open it in the visualizer.

And due to its small size, how can it cause a stack overflow?

 

Thanks,

 

alex

Message 4 of 7
fieldguy
in reply to: alex_b

Have you tried a dump file?  http://msdn.microsoft.com/en-us/library/d5zhxt22(v=vs.90).aspx

 

If you post some code, someone can try it for confirmation.  In your 1st message, you said the debugger crashes and Autocad exits - generating the "Recursion too deep - stack overflowed error".  It should be easy to re-create.

 

Are you using readdwg, or are the dwg files open in the editor?

 

 

Message 5 of 7
alex_b
in reply to: fieldguy

Hi fieldguy,

 

Sorry, my bad. Something you wrote got me looking harder and surely there was a bug in the dictionary-derived class accessors, which indeed led to an infinite loop when the debugger tried to look inside the object (at least I think this is the answer, although I don't know what the debugger does exactly).

If it is of interest I could post the [bad] code.

What blinded me was the fact that the program used the class w/o any problem, it was only when the debugger looked, so I blamed the innocent debugger.

 

Apologies and thanks again,

 

alex

Message 6 of 7
fieldguy
in reply to: alex_b

I'm glad you figured it out.  Your post caught my eye because I do a lot of sql - linq - datatable - datagridview stuff and use multi dimension dictionaries regularly (best thing since cheese buns).

Message 7 of 7
fieldguy
in reply to: fieldguy

Don't forget to mark your answer as the solution.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost