Thanks for the replys guys. As I would like to understand the bug first I will try the workarounds after that.
After you pointed me to the sorting, I did some more research.
Can someone explain the strange stepping through the code in QtCreator?
(the order of the steps when I use "Step Over" are placed at the end of the code lines)
Qt Code:
  1. case RS2::EntityCircle:
  2. a = center.angleTo(*v); 1.
  3. dist = reversed?
  4. fmod(sa - a + 2.*M_PI,2.*M_PI): 3.
  5. fmod(a - sa + 2.*M_PI,2.*M_PI); 2. 4. 6.
  6. // qDebug("angle centerTostartPoint: %f",sa);
  7. // qDebug("angle centerToNextIntersection: %f",a);
  8. // qDebug("distance: %f",dist);
  9. qDebug("counted the useres: %d",v.use_count()); 5. 7.
  10. break;
To copy to clipboard, switch view to plain text mode 

I would have expected the following order of the stepping:
line2
line5 (until now that's the same what QtCreator does; reversed is false)
line9