dasmoth / dalliance

Interactive web-based genome browser.
http://www.biodalliance.org/
BSD 2-Clause "Simplified" License
226 stars 68 forks source link

Fix oom when invalid track #153

Closed Traksewt closed 9 years ago

Traksewt commented 9 years ago

When an invalid format was found, the error message in bigwig was not exiting the function, therefore there were cases that it tried to load bogus data, and would result in out of memory at 2 Gb

dasmoth commented 9 years ago

Have merged ad7c13340209f1ae9a452bcdde7647dad07070fe, thanks!

There are a couple of other commits which I guess were included in this PR accidentally. What's the "scale < 0" one for?

Traksewt commented 9 years ago

Sorry the asc snuck in there and the #150 was my sub-optimal merging. The asc was a workaround because sometimes the scale appeared a negative number. and this would get caught in an infinite loop: while (scale * ts(pow) < min) { ++pow; } I haven't narrowed down the cause of the negative scale yet, though it likely has something to do with dalliance initialising offscreen, or potentially loading an invalid track. So it may be fixed with this main commit. I'll keep you posted if I still see it.