[ODE] Rare segmentation faults in dSolveLCP
Adam D. Moss
adam at gimp.org
Thu Nov 18 02:17:38 MST 2004
Daniel Marbach wrote:
> For a long time now I have a bad problem: Sometimes, in some 'special'
> situations, my simulations crash. The problem occurs in dSolveLCP, it's a
> segmentation fault:
[...]
> I am not an expert, is this correct? Is there a more elegant way to do this
> (e.g. when compiling)? I found that ld has an argument -stack_size but the man
> pages are not very clear...
You can add something like this to your linking line (if linking via gcc):
-Wl,--stack,128000000
> It seems to me that the crashes are less frequent now (after changing .cshrc),
> but this might just be coincidence. Do you agree that limited stack size could
> be the reason for these segmentation faults?
Sure could be, this is very much a FAQ (and I'm fairly sure it's
covered in the manual...)
> Most importantly: Is there a way to recover from a segmentation fault (SIGSEGV)?
> I guess not...
There are OS-specific ways to catch/ignore a segfault, but
you usually wouldn't want to in the context of 'fixing' anything.
Another option for avoiding stack overflow in most circumstances
is to use dWorldQuickStep() instead of dWorldStep().
--Adam
--
Adam D. Moss . ,,^^ adam at gimp.org http://www.foxbox.org/ co:3
More information about the ODE
mailing list