https://bugs.kde.org/show_bug.cgi?id=363861

            Bug ID: 363861
           Summary: closed loop in Bucket::deleteItem (itemrepository.h)
           Product: kdevplatform
           Version: git master
          Platform: Compiled Sources
                OS: OS X
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: rjvber...@gmail.com

I currently have a session that ends up in a closed loop at exit
systematically, in the following block in itemrepository.h:

```
      //Fix the follower-link by setting the follower of the previous item to
the next one, or updating m_objectMap
      while(currentIndex != index) {
        previousIndex = currentIndex;
        currentIndex = followerIndex(currentIndex);
        //If this assertion triggers, the deleted item was not registered under
the given hash
        Q_ASSERT(currentIndex);
      }
      Q_ASSERT(currentIndex == index);
```

all loop variables are optimised away, but I think that loop has 1 glaring
omission of an end-condition : `previousIndex == followerIndex(currentIndex`.


Reproducible: Always

Steps to Reproduce:
1. open an affected session
2. sit back and wait until all activity ends
3. quit KDevelop without doing anything else

Actual Results:  
KDevelop burns CPU

Expected Results:  
KDevelop exits normally

When I attach a debugger and jump to the assert on line 552 immediately after
the loop, a normal exit follows.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to