[comp.sys.amiga] dumb workbench question

jonathan@jvc.UUCP (Jonathan Hue) (02/28/89)

I'm trying to convert a program which runs from the CLI to also run
from the workbench.  It still runs fine from the CLI, but when I run
it from the workbench, I keep getting "Software Error - Task Held"
when it exits.  It works just fine until it returns from main.  I am
using Lattice 5.0 and compiling with "lc -L filename.c".  Even the
simple "echo" program from the RKM:Libraries and Devices fails the
exact same way as my program, as does the "seeilbm" program I found on
FF16.  What am I doing wrong?


-Jonathan	uunet!jvc!jonathan

lel@wuphys.UUCP (Lyle E. Levine) (03/03/89)

In article <319@jvc.UUCP> jonathan@jvc.UUCP (Jonathan Hue) writes:
>
>I'm trying to convert a program which runs from the CLI to also run
>from the workbench.  It still runs fine from the CLI, but when I run
>it from the workbench, I keep getting "Software Error - Task Held"
>when it exits.  It works just fine until it returns from main.  I am
>using Lattice 5.0 and compiling with "lc -L filename.c".  Even the
>simple "echo" program from the RKM:Libraries and Devices fails the
>exact same way as my program, as does the "seeilbm" program I found on
>FF16.  What am I doing wrong?
>
I don't think this belongs in comp.sys.amiga but since you didn't
post in the .tech group, maybe you don't get it. 

You aren't doing anything wrong.  Using Lattice 5.0 programs from
Workbench results in a crash upon exiting in certain situations.
I won't go into these here.  I reported the bug quite a while ago
to Lattice and it has been fixed in Lattice 5.02.  I just tried it.
It now works correctly.  If you MUST use Lattice 5.0, then there
exists a work-around:

Put the line "extern int _nufbs;" in your header stuff and add the
line "_nufbs--;" anywhere within the body of your program. It
should be executed once.

Actually, this bug existed in Lattice 4.0 as well but for some strange
reason, it didn't cause a crash...  Very weird...

Still a happy Lattice 5.02 hacker,

=========================
IBM is a Division of Sirius Cybernetics Corporation
"their fundamental design flaws are completely hidden by their
superficial design flaws."  
			- "So Long And Thanks For All The Fish"

			Lyle Levine
 Paths:
	UUCP -> ...!uunet!wucs1!wugate!wuphys!lel
	Internet -> lel@wuphys.wustl.edu

	Best way: (314)889-6379 (work)