[comp.sources.d] Possible BUG in atc!!!

alden@osupyr.UUCP (Dave Alden) (01/07/87)

Hello,
  I have discovered a possible bug in atc.  When redrawing
the screen, it seems that the process is a forked process.
This screws up the screen when using 1200 baud.  Everytime
I try to redraw the screen, in the middle of the re-draw,
it tries to update the positions of the planes, and then it
quits re-drawing the screen, EVEN IF IT DIDN'T FINISH!!!!
This is a major pain, seeing as how I am VERY HOOKED on this
game.  If anyone has found this problem and fixed it I would
greatly apreciate the fixes.  Please, someone fix this so
I can play the game at home!!!

...Dave Alden
...Ohio State University
...alden%osupyr@cbosgd.UUCP

ps  -  In case you didn't catch on, I LOVE THIS GAME!!!!!

gregg@okstate.UUCP (Gregg Wonderly) (01/12/87)

in article <116@osupyr.UUCP>, alden@osupyr.UUCP (Dave Alden) says:
> Xref: okstate comp.sources.d:53 net.sources.bugs:22
> 
> Hello,
>   I have discovered a possible bug in atc.  When redrawing
> the screen, it seems that the process is a forked process.
> This screws up the screen when using 1200 baud.  Everytime
> I try to redraw the screen, in the middle of the re-draw,
> it tries to update the positions of the planes, and then it
> quits re-drawing the screen, EVEN IF IT DIDN'T FINISH!!!!

This behavior seems to be attributed to a race condition caused by the alarm(2)
that is waiting to go off.  Essentially, you type CTRL-L to refresh the screen.
While this is happening, the time period expires, and the alarm(2) goes to the
update() routine specified in the signal(SIGALRM,update) call.  The result is
that curses data structures are corrupted because your CTRL-L update has not
finished yet.  I have fixed this, and made some other modifications to the
program (like made it work under System 5).  I will be posting diffs, or the
complete thing to the net shortly.  I have modified the makefiles to allow you
to specify which version to build.  The system 5 stuff is #ifdef'd in as well.
The modifications I made allow more than 9 beacon's, airports, and exits.  This
allowed me to create a super TCA for use on a DMD 5620.


-----
Gregg Wonderly
Department of Computing and Information Sciences
Oklahoma State University

UUCP: {cbosgd, ea, ihnp4, isucs1, mcvax, uokvax}!okstate!gregg
ARPA:  gregg@A.CS.OKSTATE.EDU