Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!hsdndev!dartvax!eleazar.dartmouth.edu!sean From: sean@eleazar.dartmouth.edu (Sean P. Nolan) Newsgroups: comp.sys.mac.programmer Subject: Think C Agony! Message-ID: <1991Mar7.063549.14081@dartvax.dartmouth.edu> Date: 7 Mar 91 06:35:49 GMT Sender: news@dartvax.dartmouth.edu (The News Manager) Organization: Dartmouth College, Hanover, NH Lines: 36 Hi there. I'm having a problem that is making my eyes cross and my head spin around on my shoulders. PLEASE, if you can help here let me know, I'm up against a deadline! The following code, run without the Think Debugger, crashes with an addr error at the (**hclusterNew).LearningRate = (**network).DefaultBiasLearningRate assignment. Now here's the trick. Put in a Debugger() command right before the assignment, and both handles (hclusternew and network) are perfectly valid, and no crash occurs! Take away the Debugger(), and there's a reproducible crash. Also, the same code run under the Think Debugger does not crash. Help! I seem to remember something like this being discussed. Anyone? Anything? Thanks.... --- Sean /* allocate bias matrix */ if (!((**hclusterNew).prgbiasstruct = (BIASSTRUCT**) NewHandle(NumNodes * sizeof(BIASSTRUCT)))) { DisposHandle(hclusterNew); return(FALSE); } (**hclusterNew).LearningRate = (**network).DefaultBiasLearningRate; (**hclusterNew).fBiasesFrozen = FALSE; RandomizeBiases(network,hclusterNew); +----------------------------------------------------------------------------+ | Sean P. Nolan | sean@eleazar.dartmouth.edu | "That's not a | | Dartmouth College | | baby, that's a | | Hinman Box 2658 | SCALP 'EM! | Mr. Potatohead!" | | Hanover, NH 03755 | | --- A.W.O.T.M. | +----------------------------------------------------------------------------+