Home Dashboard Directory Help
Search

Incorrect Type Name references in defaultvis.natvis visualizers for standard library by mloskot


Status: 

Closed
 as Fixed Help for as Fixed


2
0
Sign in
to vote
Type: Bug
ID: 705993
Opened: 11/18/2011 6:37:29 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
1
Workaround(s)
view
1
User(s) can reproduce this bug

Description

The new style visualizers defined in
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\Debugger\Visualizers\defaultvis.natvis
for elements of the C++ Standard Library have incorrectly defined Type Name attributes.
These definitions refer to std::tr1 whereas the types in Visual Studio 11 are now defined in std:: but not aliased from std::tr1 as it is in Visual Studio 2010.

So, for instance

<Type Name="std::tr1::shared_ptr<*>">

should read

<Type Name="std::shared_ptr<*>">

The incorrect references to std::tr1:: lead to lack of proper visualization while debugging.
Details
Sign in to post a comment.
Posted by Microsoft on 3/1/2012 at 6:37 PM
Hi,

Thanks for reporting this bug. We've fixed it, and the fix will be available in VC11.

The fix went beyond dealing with the std::tr1 => std change. I audited all of the STL's visualizers, for both the old and new engines (the new engine is used by default, reads stl.natvis, and is very robust - while the old engine is used for Edit And Continue and reads autoexp.dat), and fixed various problems that had accumulated during VC11's development. For example, we changed how the STL's iterators work, which affected the visualizers.

As a bonus, an expired weak_ptr now reveals its weak refcount (keeping the control block alive).

If you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by MS-Moderator07 [Feedback Moderator] on 11/20/2011 at 10:22 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by mloskot on 11/18/2011 at 7:10 PM
I have just attached screenshot (vs11-visualizers-broken-2.png) presenting the broken visualization. Hopefully it will get attached here.
Posted by MS-Moderator01 on 11/18/2011 at 6:52 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by mloskot on 11/18/2011 at 6:40 PM
1) Make private copy of the file with visualizers definitions:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\Debugger\Visualizers\defaultvis.natvis
in
C:\Users\<YOUR USERNAME>\Documents\Visual Studio 11\Visualizers\myvisualizers.natvis
whre myvisualizers.natvis can be name of your choice.

2) Open myvisualizers.natvis in a text editor
3) Find "std::tr1::" and replace with "std::"
4) Save the myvisualizers.natvis
5) Relaunch Visual Studio 11
6) You should see STL objects correctly visualized.
File Name Submitted By Submitted On File Size  
vs11-visualizers-broken-2.png 11/18/2011 31 KB