Opened 17 years ago
Closed 17 years ago
#864 closed defect (fixed)
Some core plug-ins report negative progress values in large experiments
Reported by: | Nicklas Nordborg | Owned by: | Martin Svensson |
---|---|---|---|
Priority: | major | Milestone: | BASE 2.5.1 |
Component: | coreplugins | Version: | |
Keywords: | Cc: |
Description (last modified by )
In experiments where the number of spots is larger than ~20M, the progress reporter for some plug-ins (Lowess and possible all other core plug-ins), suddenly wraps around and starts reporting negative values. This is caused by the way the progress is calculated:
int progress = (normalizedSpots * 100) / numSpots;
The problem is that the multiplication by 100 is done before the division. The multiplication causes the int value to wrap around to the negative side if the value is bigger than ~20M. The fix is not simply to do the division first. Since it is an integer division it will always yield 0 or 1 as the result. So, we either have to do the multiplication with 'long' values or do the division with 'float' values.
See also #865 for a suggested solution to make the progress reporter more stable.
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.
Change History (3)
comment:1 by , 17 years ago
Description: | modified (diff) |
---|
comment:2 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [4050]) Fixes #864 Some core plug-ins report negative progress values in large experiments.