Menu

#277 NumeRe crashes randomly while using the "med()" function

v1.1.x
fixed
None
v1.1.0
Bug Fix
2018-03-05
2018-01-29
Erik Hänel
No

If one uses the med() function on a data set with many NaNs, then it's quite likely that NumeRe crashes or that the result is simply wrong.

Analysis:
The reason for the crash is a missing comparsion with the nCount variable in the Cache and the data class. Add something like

if (nCount == (_vLine.size()*_vCol.size())-nInvalid)
            break;

to solve this issue.

Implementation:
The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.

Documentation:
Not needed - Bug fix.

Tests:
The fix was added to the automatic tests. No deviation detected. Bug fix implemented successfully.

Discussion

  • Erik Hänel

    Erik Hänel - 2018-01-29
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-01-29
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,9 @@
     If one uses the `med()` function on a data set with many `NaN`s, then it's quite likely that NumeRe crashes or that the result is simply wrong.
    +
    +**Analysis:**
    +
    +**Implementation:**
    +
    +**Documentation:**
    +
    +**Tests:**
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-01-29
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,13 @@
     If one uses the `med()` function on a data set with many `NaN`s, then it's quite likely that NumeRe crashes or that the result is simply wrong.
    
     **Analysis:**
    +The reason for the crash is a missing comparsion with the `nCount` variable in the `Cache` and the `data` class. Add something like
    +
    
    +    :::C++
    +    if (nCount == (_vLine.size()*_vCol.size())-nInvalid)
    +                break;
    +
    +to solve this issue.
    
     **Implementation:**
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-01-29
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,7 +10,9 @@
     to solve this issue.
    
     **Implementation:**
    +The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.
    
     **Documentation:**
    +Not needed - Bug fix.
    
     **Tests:**
    
    • status: implementing --> testing
     
  • Erik Hänel

    Erik Hänel - 2018-03-05
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -16,3 +16,4 @@
     Not needed - Bug fix.
    
     **Tests:**
    +The fix was added to the automatic tests. No deviation detected. Bug fix implemented successfully.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB