Confusion with watch values during debugging

The debuggee is a mixed (MFC + /clr:OldSyntax) exe. The application is linked with some assemblies (MFC extension DLL's, /clr:OldSyntax enabled)
Compiler settings: Release build, Unicode, Disable optimzation

After a breakpoint is reached, I will watch some values. Here is a look at my watch window:

+ this                      0x01010a8c
+ this->Node                0x00d81718
  this->Node->Name          "Processor"
+ Node                      <undefined vaue>   // Why Node is undefined
- this
   + ObjectBaseData^        0x01010a8c         
   - Node                   0x00d81710         // Why the addresses is not 0x00d81718
      - GroupNet^           ....
      + Containers          0x00d81148         // Why the addresses are equal
      + GroupRoot           0x00d81148
      ...
        Name                {...}              // I can't see the name "Processor".o 


Answer this question

Confusion with watch values during debugging

  • Michel To

    Hi Jens,

    It really looks like you've found a bug in the product. Could you log a bug in the feedback page (http://msdn.microsoft.com/productfeedback). Make sure to put sufficient information to help the team reproduce the problem (sample project is ideal) and we will look at fixing it.

    Thanks,

  • Kris M.

    In addition, it might be helpful if you could paste the full output from the watch window, including the types listed to the left.

    Thanks,

  • Deluxdecals

    Hi, Boris!
    Here is the watch list with the type column

    + this                      0x01010a8c         AIS::VAC::Sys::Designer::GroupData^
    + this->Node                0x00d81718         AIS::VAC::Sys::Designer::DesignerGroup^
      this->Node->Name          "Processor"        System::String^
    + Node                      <undefined vaue>   AIS::VAC::Sys::Designer::DesignerGroup^
                                          // Why Node is undefined
    - this                                         AIS::VAC::Sys::Designer::GroupData^
       + ObjectBaseData^        0x01010a8c         AIS::VAC::Sys::Designer::ObjectBaseData^
       - Node                   0x00d81710         AIS::VAC::Sys::Designer::DesignerGroup^
                                          // Why the address is not 0x00d81718 (this->Node)
          - GroupNet^           ....               AIS::VAC::Sys::Designer::GroupNet^
            + Containers        0x00d81148         AIS::VAC::Sys::Designer::ContainerCollection^
            + GroupRoot         0x00d81148         AIS::VAC::Sys::Designer::GroupRootNet^
            ...                           // Why both addresses are equal 0x00d81148
              Name              {...}              System::String^
                                          // I can't see the name "Processor" 


  • jstark

    Thanks for the answer.

    No, there isn't the same underlying type. 


  • Dan Drew

    Is it possible that you are doing some casting of the "Node" element It can often lead to misaligned information.

    Thanks,

  • Rune &amp;#216;ynes

    A couple of things:
    First, we have fixed some bugs since Beta 2 that would help for this scenario (pick up June/July CTP if you can to double-check). It might well be that your top complaint won't be addressed though. However, we are continuing to investigate it. Is it possible that this->Node->GroupNet->Containers and this->Node->GroupNet->GroupRoot point to the same underlying address (do they instantiate the same underlying type )

    Thanks

  • Confusion with watch values during debugging