Weird driver behavior on frame change I came across some weird driver behavior and hope someone can explain this to me.

I was trying to create a wheel that rotates automatically on the floor when it is moved along. (Just like real world wheels do.)

To achieve this, I wanted to use a driver. (Use position to calculate rotation -> rotate the wheel)
However, I got different results for the same frame while scrubbing on the timeline:



Note that I'm always on frame 44 and the xLocation is also equal. But the driver result varies and the wheel's rotation vary.

I found the difference to be dependent on whether I scrub using the mouse or the keyboard, and also from which direction I reach the frame.
(44 is arbitrary - it's the same for any other frame)

This is the Driver:


(not the solution, yet ;) )

Pressing "update dependencies" seems to fix it, but it is very impractical in this situation, because I'm trying to see if the wheel slips on the floor, and I need to jump quickly back and forth between frames and can't press the button each time.

Thinking this has sth. to do with the Dependency Graph, I tried to open this file in 2.8 and got the same result. Also in 2.79b and 2.79.5.

I would expect to get consistent values on the same frame. Any ideas why this happens? Thanks!!
This is the just the dependencies graph not updating in the right time just as you speculated. The value 101° is actually the result of the driver at frame 45 while the value 96.2° is actually the result of the driver at frame 43. The true value of the driver at frame 44 is 98.5°.

When you approach the frame 44 from the left, the last computed value is at frame 45, so its value is used. When you approach the frame 44 from the right, the last computed value is at frame 43, so its value is used. If you updated the dependencies at the frame 44, the true value is used.

I don't think there is an easy way to solve this, and this is one of many reasons I stopped using drivers. I recommend using Animation Nodes instead.