Path: utzoo!attcan!uunet!husc6!uwvax!speedy!engber
From: engber@speedy.cs.wisc.edu (Mike Engber)
Newsgroups: comp.sys.mac.programmer
Subject: Re: LSC bug
Summary: bug solved
Message-ID: <6152@spool.cs.wisc.edu>
Date: 17 Aug 88 21:13:53 GMT
Sender: news@spool.cs.wisc.edu
Reply-To: engber@speedy.cs.wisc.edu (Mike Engber)
Organization: U of Wisconsin CS Dept
Lines: 17

In a previous posting I discussed a bug that only appeared when not using the
LSC debugger. Here's the problem:

I was doing generic C programming using stdio so I wasn't doing any of the
Mac initializations myself. However, I was also using the QuickDraw routine,
Random(). Whenever I used Random() before calling printf the system would
crash. I deduce that the problem is that QuickDraw wasn't initialized until
I called printf and that the debugger initializes it automatically so that's
why it never happened while using it.

I am unable to verify this because I can't find the initialization calls in
the library source to printf (and I don't know what the debugger does). If
anyone knows any more I'd appreciate comments.

Hope this saves someone else the hassle it caused me.

-ME