[gambit-list] Tracking Down a Segfault

Joel J. Adamson <adamsonj@email.unc.edu> adamsonj at email.unc.edu
Thu Sep 4 17:03:09 EDT 2008


Dear Gambit-List,

I've been accumulating a library of functions for simulating population
processes (called "genxic"), and I'm running into some pesky errors.
This code includes quite a lot of foreign functions, interfacing with
the GNU Scientific Library.

1)  When running numerically intense simulations, I'll get a segfault:

,----
| Process scheme segmentation fault
`----

This might be after 50 iterations of a simulation when I'd planned to do
1152.

Where do I go from there?  I've tried running gsc and gsi in GDB, but
pretty often I can't get a backtrace after the segfault.  The conditions
under which the segfault occurs varies.  Sometimes I get it after
loading the library.

2)  I've gotten this bizarre error from one of my procedures, and would
like to know where to go to debug it:

,----
| *** ERROR IN | genxic.o1#31| -- (Argument 1) F64VECTOR expected
| (f64vector-ref
|  '#u16(47806 51966 47806 51966 47806 51966 47806 51966 47806 51966 47806 519...
|  1)
`----

I am not initializing any u16 vectors (that I know of), so how can I
tell where this comes from, and how do I investigate, or find what
procedure genxic.o1#31 is?  I tried repeating the compilation, and this
is what I got

Dumping:
  #<primitive | genxic.o2|>
  #<primitive | genxic.o2#0|>
  #<primitive | genxic.o2#1|>
  #<primitive | genxic.o2#2|>
  #<primitive | genxic.o2#3|>
...
  #<primitive | genxic.o2#30|>
  #<primitive | genxic.o2#31|>
  #<procedure 1+>
  #<procedure 1->
  #<procedure atom?>
  #<procedure xcons>
  #<procedure make-list>...
 
How are these procedures labeled, and how do I figure out which one it
is?

Thanks,
Joel
-- 
Joel J. Adamson
University of North Carolina at Chapel Hill
CB #3280, Coker Hall
Chapel Hill, NC 27599-3280

Before you reply to this email, please read
http://www.unc.edu/~adamsonj/email-howto.html



More information about the Gambit-list mailing list