Progress reporter implementation should detect and handle negative values due to integer wrap around
|Reported by:||Nicklas Nordborg||Owned by:||Martin Svensson|
For a background see #864.
Since external plug-ins are likely to have the same problem we intend to make the job progress reporter implementation more robust. If it detects a negative value it should assume that a wrap-around has occurred. This can probably be solved by remembering the last positive value and adding an offset that is the difference between the negative and positive values. Thus if the wrap occurs at 30% the next value is -30% and the offset will be 60. This offset is added until the next wrap-around, which is in this example happens at 90% (=30+60), when a new offset is calculated.
Note! There is no real harm done in reporting negative values. Everything will still work, though it may look a bit strange to users and also make them unsure if it really is working or if some nasty error has occurred.