[comp.sys.atari.st] Please help because I get bombs.

gwa@mentor.cc.purdue.edu (James D. Yegerlehner) (02/19/90)

A friend and I are developing a neural network simulation program
for the ST, but we've come to a grinding halt because our code 
 crashes from a bus error (2 bombs) and we can't figure out why.  

We've observed several things about the crashes:
  1.  It occurs only when fprintf is called.  By using the source
      and assembly level debuggers (Mark Williams C), we've found that
      it is happening within "lmalloc", which is called by malloc(), which is
      called ultimately by fprintf.  Specifically, there is a some symbol
      in lmalloc called "_a_scanp_" which is used as a pointer, and which 
      apparrently gets clobbered or gets a bad value for some reason, which
      results in the bus error.   

  2.  It occurs consistently for any particular compilation of the
      code, but is sensitive to things like changing the stack size or
      otherwise rearranging memory; when this is done, it sometimes goes
      away, only to come back later when still more changes are made.

Since I'm not an experienced GEM programmer, I thought that the above
symptoms might have implications of which I am oblivious.  If any of you 
GEM/TOS/C gurus have any suggestions for me, I would much appreciate it.
Thanks, 
Jim
yegerleh@en.ecn.purdue.edu