 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Dave Mason
RE: Segmentation fault [ reply ] 2008-05-29 13:32
|
The program does some fitting and outputs some postscript to draw the fitted lines and a region around them; then it draws a scatterplot (which also evaluates the fitted function i.e. references the coef array, and this is always where it segfaults).
Disabling GC around the scatterplot iterations does not resolve the problem. Disabling around the fitting and line/region plot *mostly* resolves the problem. Disabling around both parts seems to resolve the problem.
Multiple runs with same data have different weird coef sizes and values, although it seems to die at the same iteration.
Changing the function I'm trying to fit changes the failure location/iteration.
With GCdisabled just around the fitting, one example accessed the coef array multiple times successfully before the size goes weird and it segfaults.
|
By: Yoshiki Tsunesada
RE: Segmentation fault [ reply ] 2008-05-26 10:07
|
Sorry for late reply.
The error occurs randomly, or at a fixed point?
At present I have no idea to fix that, but there were a similar bug in Ruby/GSL internal object handling in other class. How about in a case disabling the Ruby GC, by "GC.disable"?
|
By: Dave Mason
Segmentation fault [ reply ] 2008-05-07 02:12
|
I have just installed rb-gsl-1.10.3 (although had same problem with rb-gsl-1.7.0).
I get a fault and when I put in some debugging prints I see bizarre values:
@coef.class=GSL::Vector::View::ReadOnly @coef.size=138183872
where @coef is the result of FdfSolver.new(FdfSolver::LMSDER...).position
The code works fine hundreds of times, then I get a dozen or so where the size is weird, but I can still reference the values OK, and then another one with a weird size and it blows up when I attempt to reference the values
|
|
 |