Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

Segfault with constant input and exact=F #17

Open
vspinu opened this issue Sep 7, 2015 · 1 comment
Open

Segfault with constant input and exact=F #17

vspinu opened this issue Sep 7, 2015 · 1 comment

Comments

@vspinu
Copy link

vspinu commented Sep 7, 2015

Tested on two linux machines (rehel and ubuntu) with R3.1.1.

> library(BreakoutDetection)
> breakout(rep.int(20, 1000),  exact = F)

 *** caught segfault ***
address 0xfffffffc039ffa30, cause 'memory not mapped'

Traceback:
 1: .Call("BreakoutDetection_EDM_tail", PACKAGE = "BreakoutDetection",     Z, min_size, alpha, quant)
 2: Analysis(Zcounts, min.size, alpha)
 3: breakout(rep.int(20, 1000), exact = F)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
@vspinu vspinu changed the title Sigfault with constant input and exact=F Segfault with constant input and exact=F Sep 7, 2015
@putnam120
Copy link
Contributor

I think what is happening is that the method is trying to transform the data so that it maps to the interval [0,1]. However, since all of the values are the same there will be a division by 0. So R returns NaN, but I don't thin that the C++ code knows how to handle this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants