Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!mcsun!news.funet.fi!ousrvr.oulu.fi!ousrvr.oulu.fi!nix From: nix@rainbow.oulu.fi (Tero Manninen) Newsgroups: comp.sys.amiga.programmer Subject: Re: Does Execute() work the same on A3000? Message-ID: Date: 27 Jun 91 15:33:51 GMT Article-I.D.: rainbow.NIX.91Jun27173351 References: <1991Jun25.224054.24632@wehi.dn.mu.oz> Sender: news@ousrvr.oulu.fi Reply-To: nix@stekt.oulu.fi Organization: University of Oulu, Computer Services Centre. Lines: 35 In-reply-to: baxter_a@wehi.dn.mu.oz's message of 25 Jun 91 22:40:54 GMT On 25 Jun 91 22:40:54 GMT, baxter_a@wehi.dn.mu.oz said: [...] baxter> if (argc == 0) /* running under workbench */ baxter> { 1. baxter> _ufbs[0].ufbfh = NULL; baxter> _ufbs[1].ufbfh = _ufbs[0].ufbfh; baxter> _ufbs[1].ufbflg = UFB_NC; baxter> _ufbs[2].ufbfh = _ufbs[0].ufbfh; baxter> _ufbs[2].ufbflg = UFB_NC; 2. baxter> handle = (struct FileHandle *)(_ufbs[0].ufbfh << 2); baxter> process = (struct Process *)FindTask(0); 3. baxter> process->pr_ConsoleTask = (APTR)handle->fh_Type; baxter> x = 0; baxter> } baxter> else /* running under CLI */ [...] baxter> Which replaces the similar code from Lattice umain.c. baxter> This works fine on my A500, and has no problem when later I use: baxter> Execute("failat >Nil: Nil: However, on the A3000, under 1.3 or 2.0, it crashes. I don't know about the cli part of your startup code, but clearly in the workbench part you have an illegal memory reference: - at point 1 you set stdin handle to zero - at point 2 handle is set to (zero << 2) which is a null pointer. - at point 3 you try to get pr_ConsoleTask from null filehandle [ (struct FileHandle * 0)->fh_Type; ] !! ++Tero