Xref: utzoo comp.sys.ibm.pc:32118 comp.lang.c:20182 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!apple!vsi1!altos86!elxsi!len From: len@elxsi.UUCP (Len Mills) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: Re: C program won't run by itself Keywords: C, QuickC Message-ID: <2836@elxsi.UUCP> Date: 25 Jul 89 19:14:36 GMT References: <538@dcscg1.UUCP> Reply-To: len@elxsi.UUCP (Len Mills) Distribution: usa Organization: ELXSI Super Computers, San Jose Lines: 46 In article <538@dcscg1.UUCP> drezac@dcscg1.UUCP (Duane L. Rezac) writes: > When the program is run under Quick-c, it runs fine. When I try to > run it from DOS, It will lock up at the same point each time. No > errors show on the compile, and CCheck gives it a clean bill of > health. > ... Any Suggestions ? I've had this symptom from three types of bugs. The easy bug is a change in environment and the failure to rebuild a production program. If you can run the program under QC, then exit QC, then run the program and get a failure without changing the environment, this isn't the cause. The harder bug is, of course, the wild pointer. Do you have the stack checking option On in QC? You may have to resort to checking the pointers and data structures at run-time in order to track this condition. The last one is related to console I/O; QC will, in some way I have not throughly researched, "protect" the programmer due to its interception of the keyboard vector. I once had an erroneous getch() following a screen write. Of course, QC switched screens on the write, and, since I had some breakpoints set, I was using the function keys to continue execution. After a little while, I noticed that I was having to hit the key twice (blaming my keyboard getting dirty (:-)), but eventually noticed a pattern, and found my problem. Happy exterminating! > Duane L. Rezac > > >-- >+-----------------------+---------------------------------------------------+ >| Duane L. Rezac |These views are my own, and NOT representitive of my place| >| dsacg1!dcscg1!drezac drezac@dcscg1.dcsc.dla.mil of Employment. | >+-----------------------+---------------------------------------------------+ -- Len Mills ... {uunet,ucbvax!sun,lll-lcc!lll-tis,altos86,bridge2}!elxsi!len