Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-18055

Qt creator reporting invalid (outdated) data in locals while stepping through the program. Data is not updated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.4.0-beta1
    • Qt Creator 4.2.1
    • Debugger
    • None

    Description

      consider the small code sample:

      int main(int argc, char *argv[]) {
      
        int val_init[]= {10,20,30,40,50,51,52,53,54,55,56,57,58,59,60};
        std::valarray<int> val_fourth (val_init,15);                   // 10 20 30 40
        std::size_t strides[]= {3,2,1};
      
        std::gslice mygslice (1,
                              std::valarray<std::size_t>(strides,2),
                              std::valarray<std::size_t>(strides,3));
      
        auto gsla = val_fourth[mygslice];
        int a = 1;
        int b = 2;
        int c = a+b;
      
      

      If I place a breakpoint on line

       auto gsla = val_fourth[mygslice];

      and i execute the program step by step i will get the result as displayed in the attached screen shot.
      Not all the members of the gsla structure are updated. More specifically the member gsla._M_index._M_size keeps its old value.
      When inspecting the value, (add Watcht expression), the value is ok in the watcher, but faulty in the main local display!

      Attachments

        Activity

          People

            hjk hjk
            toolinfo stephane petithomme
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: