none
windbg is not interpreting natvis file correctly RRS feed

  • Question

  • What version of natvis does windbg 10 understand?  I've gotten an error that says:

    "c:\visualizers\caseview.natvis": Error (0x800705b9): Mismatched end tag for 'AutoVisualizer' node (line 2218 (@ 5))

    Which terminates at the end of a Type tag

      </Type>
         ^ points here
    

    The natvis file is valid and I've been using it in VS2015 without issue.  It also says:

    Successfully loaded visualizers in "c:\visualizers\caseview.natvis"

    Which I would assume means that it may have skipped over the rest of the file maybe?  Or skipped over some of it, as there are a lot of structures that are defined in the natvis file that are not being interpreted.

    Is there any additional diagnostics that I can bring up to find out what is happening here?

    Thanks,

    A


    I don't mind someone marking a post as "Proposed as answer", but DO NOT mark it as "Answered". If I am the OP, I will decide if a post actually answers my post or not. Thank you.



    • Edited by A D R I A N Tuesday, June 14, 2016 11:05 PM
    Tuesday, June 14, 2016 11:04 PM

Answers

  • About the links:

    >>D I post quite a bit, can you please post a link?<<
    Would have thought it was from
    https://social.msdn.microsoft.com/Forums/de-DE/56002031-faa1-49ef-b21e-56d3e7e0ef87/is-there-a-way-to-watch-a-static-function-variable-outside-of-the-functions-scope?forum=vsdebug

    >>Um, that debugging tools site you posted, is dated 2001.  Is that actually the site you intended to post?<<
    Not intended. 
    Because of VS integration not quite sure about connect (2012):
    https://connect.microsoft.com/VisualStudio/feedback/details/758723/intellitrace-window-shows-up-when-starting-windbg-debugger
    but FAIK email address is still valid, though probably somewhat 'monosyllabic'
    https://developer.microsoft.com/en-us/windows/hardware/download-symbols
    https://social.msdn.microsoft.com/Forums/en-US/76ef56c5-c7e6-4487-8c5e-08cfcb9faf50/windows-7-sp1-kernel-symbol-ntkrnlmppdb-has-no-information-for-data-types-but-functions?forum=windbg

    Could it be, that it gets confused about combination of brackets '[()]' here: 

    <Item Name="unused">memptr,[memsize - (memptr-membase)]</Item>

    (No experience with natvis)

    With kind regards

    • Marked as answer by A D R I A N Wednesday, June 15, 2016 8:51 PM
    Wednesday, June 15, 2016 8:00 PM

All replies

  • Normally, windbg output can be set to a more 'verbose mode' by
    .outmask (Control Output Mask)
    https://msdn.microsoft.com/en-us/library/windows/hardware/ff564625(v=vs.85).aspx
    though would not expect that much from natvis ...
    Not sure if you want to look into dbgeng.dll. In your case probably
    dbgeng!Debugger::DataModel::Provider::NatVis::NatVisParser::_ParseAutoVisualizer
    With kind regards
    Wednesday, June 15, 2016 3:13 PM
  • Thanks MaybeCompletelyW,

    I turned on all of the .outmaks without anything new outputted.

    I'm a noob in regards to WinDbg, so I'm not exactly sure what you are pointing at with your last statement.  Could you explain further?

    Thanks,


    A


    I don't mind someone marking a post as "Proposed as answer", but DO NOT mark it as "Answered". If I am the OP, I will decide if a post actually answers my post or not. Thank you.



    • Edited by A D R I A N Wednesday, June 15, 2016 3:58 PM
    Wednesday, June 15, 2016 3:56 PM
  • Sorry, taking a brief look, that's function, which outputs "Mismatched end tag for 'AutoVisualizer'".
    Sometimes people apply a workaround debugging the debugger - though most times it is not that simple like in this case
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/2358ae45-b742-44ea-9290-4476131d970e/in-windbg-how-do-i-avoid-getting-last-set-context-message-after-using-cxr?forum=windbg
    and more a waste of time ...
    Besides, the simple natvis example you sent eventually in the 'Visual Studio Diagnostics' forum, works on my side for Windows Debugger Version 10.0.10586.567 AMD64
    0:000> x
    000000c8`8f7cf884 h = 0n-858993460
    000000c8`8f7cf864 x = struct my_struct
    000000c8`8f7cf848 cp = class CPoint
    000000c8`8f7cf8a4 z = 0n-858993460
    0:000> dx -r1 (*((ContextOp!my_struct *)0xc88f7cf864))
    (*((ContextOp!my_struct *)0xc88f7cf864))                 [Type: my_struct]
        [<Raw View>]     [Type: my_struct]
        test is worksing : true

    but I seriously doubt that's the one you are referring to.

    With kind regards

    Addendum:
    An excellent place for people interested in 'Debugging Tools' is certainly (windbg forum) at
    http://www.osronline.com/
    Not sure where to put in 'Microsoft Connect', there exists the possibility to send an email to windbgfb for suggestions or bug reports
    https://msdn.microsoft.com/en-us/library/bb742599.aspx

    Wednesday, June 15, 2016 5:32 PM

  • Besides, the simple natvis example you sent eventually in the 'Visual Studio Diagnostics' forum, works on my side for Windows Debugger Version 10.0.10586.567 AMD64
    0:000> x
    000000c8`8f7cf884 h = 0n-858993460
    000000c8`8f7cf864 x = struct my_struct
    000000c8`8f7cf848 cp = class CPoint
    000000c8`8f7cf8a4 z = 0n-858993460
    0:000> dx -r1 (*((ContextOp!my_struct *)0xc88f7cf864))
    (*((ContextOp!my_struct *)0xc88f7cf864))                 [Type: my_struct]
        [<Raw View>]     [Type: my_struct]
        test is worksing : true

    but I seriously doubt that's the one you are referring to.

    I would say that isn't the one I was referring to, because, I don't even remember that one. :D I post quite a bit, can you please post a link?

    Addendum:
    An excellent place for people interested in 'Debugging Tools' is certainly (windbg forum) at
    http://www.osronline.com/
    Not sure where to put in 'Microsoft Connect', there exists the possibility to send an email to windbgfb for suggestions or bug reports
    https://msdn.microsoft.com/en-us/library/bb742599.aspx

    Great, I'll take a look there.

    Edit:  Um, that debugging tools site you posted, is dated 2001.  Is that actually the site you intended to post?

    Thanks,

    A


    I don't mind someone marking a post as "Proposed as answer", but DO NOT mark it as "Answered". If I am the OP, I will decide if a post actually answers my post or not. Thank you.



    • Edited by A D R I A N Wednesday, June 15, 2016 6:10 PM
    Wednesday, June 15, 2016 6:06 PM
  • Hmm, looks like it doesn't like this type definition:

      <Type Name="MemoryFile">
        <DisplayString>{{ size={memptr - membase} capacity={memsize} stored={membase,[memptr-membase]} }}</DisplayString>
        <Expand>
          <Item Name="size">memptr - membase</Item>
          <Item Name="capacity">memsize</Item>
          <Item Name="available">memsize - (memptr-membase)</Item>
          <Item Name="stored">membase,[memptr-membase]</Item>
          <Item Name="unused">memptr,[memsize - (memptr-membase)]</Item>
        </Expand>
      </Type>

    If I comment this definition out, it reads the whole natvis file.  If I move this definition to another part of the file, the problem follows it.

    There doesn't seem to be anything wrong with this definition that I can see.   The error reported is the end </Type> tag.  

    Very strange...

    A


    I don't mind someone marking a post as "Proposed as answer", but DO NOT mark it as "Answered". If I am the OP, I will decide if a post actually answers my post or not. Thank you.

    Wednesday, June 15, 2016 6:36 PM
  • About the links:

    >>D I post quite a bit, can you please post a link?<<
    Would have thought it was from
    https://social.msdn.microsoft.com/Forums/de-DE/56002031-faa1-49ef-b21e-56d3e7e0ef87/is-there-a-way-to-watch-a-static-function-variable-outside-of-the-functions-scope?forum=vsdebug

    >>Um, that debugging tools site you posted, is dated 2001.  Is that actually the site you intended to post?<<
    Not intended. 
    Because of VS integration not quite sure about connect (2012):
    https://connect.microsoft.com/VisualStudio/feedback/details/758723/intellitrace-window-shows-up-when-starting-windbg-debugger
    but FAIK email address is still valid, though probably somewhat 'monosyllabic'
    https://developer.microsoft.com/en-us/windows/hardware/download-symbols
    https://social.msdn.microsoft.com/Forums/en-US/76ef56c5-c7e6-4487-8c5e-08cfcb9faf50/windows-7-sp1-kernel-symbol-ntkrnlmppdb-has-no-information-for-data-types-but-functions?forum=windbg

    Could it be, that it gets confused about combination of brackets '[()]' here: 

    <Item Name="unused">memptr,[memsize - (memptr-membase)]</Item>

    (No experience with natvis)

    With kind regards

    • Marked as answer by A D R I A N Wednesday, June 15, 2016 8:51 PM
    Wednesday, June 15, 2016 8:00 PM
  • Hi MaybeCompletelyW,

    Could it be, that it gets confused about combination of brackets '[()]' here: 

    <Item Name="unused">memptr,[memsize - (memptr-membase)]</Item>

    Hmm, you appear to be right.  Removing the parenthesizes and multiplying the contents with -1, or even just moving the parenthetical section to the beginning of the  formula fixed the problem.  This is apparently a parse error of some sort.  I'm not aware of a closing parenthesis followed by a closing bracket with 0 or more whitespace in between meaning something special in XML.

    I'll try and post this as a bug to that email address you gave me. 

    Thanks,


    A


    I don't mind someone marking a post as "Proposed as answer", but DO NOT mark it as "Answered". If I am the OP, I will decide if a post actually answers my post or not. Thank you.

    Wednesday, June 15, 2016 8:51 PM