Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!mips!ptimtc!nntp-server.caltech.edu!eql7.caltech.edu!rankin From: rankin@eql7.caltech.edu (Pat Rankin) Newsgroups: comp.lang.c Subject: Re: WHY is this crashing???!!! Message-ID: <7JUN91150442@eql7.caltech.edu> Date: 7 Jun 91 22:04:42 GMT References: <6246@mahendo.Jpl.Nasa.Gov> Sender: news@nntp-server.caltech.edu Reply-To: rankin@eql.caltech.edu Organization: Environmental Quality Laboratory, Caltech Lines: 16 News-Software: VAX/VMS VNEWS V1.4-a4 In article <6246@mahendo.Jpl.Nasa.Gov>, robert@triton.jpl.nasa.gov (Robert Angelino) writes... > I have this code that keeps going out to lunch. Any suggestions > are welcome. Why all the VMS-specific date/time manipulation? time(), mktime() and asctime() work fine. If you can't use mktime() for some reason, then SYS$NUMTIM() will fill in an array of date/time fields. > date->tm_year = atoi(ptr); > It CRASHES at the "atoi" call. > %SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=00000014, 'date' is almost certainly a NULL pointer. Perhaps it's time to learn how to use the debugger? Pat Rankin, rankin@eql.caltech.edu