Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!tekbspa!optilink!cramer From: cramer@optilink.UUCP (Clayton Cramer) Newsgroups: comp.sys.ibm.pc Subject: Re: null pointer assignment? Keywords: null pointer, R6001, run-time error Message-ID: <977@optilink.UUCP> Date: 21 Feb 89 23:06:13 GMT References: <1413@cod.NOSC.MIL> Organization: Optilink Corporation, Petaluma, CA Lines: 31 In article <1413@cod.NOSC.MIL>, murphys@cod.NOSC.MIL (Steven P. Murphy) writes: > How do you track down a run time null pointer assignment? > > I have written a assembly language subroutine for QuickC, the > routine works ok, but when the program is over I get: > > > run-time error R6001 > - null pointer assignment > > I have tried tracing through it with CodeView, but no luck. So > does any one have any suggestions for locating the problem. > > Murph, What this message means is that when the program got ready to exit, it found that someone had altered the Microsoft copyright message at DS:0. The slowest but easiest way to find this program with CodeView is to set up a tracepoint like this: TPB DS:0 l20 Keep in mind that this will only work once you have reached main, and the DS register is established. Then start the program running, and go get a cup of coffee -- and maybe dinner, and maybe leave it running over night, but eventually it will find the bad function that is overwriting DS:0. -- Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer Disclaimer? You must be kidding! No company would hold opinions like mine!