dailey@lasspvax.UUCP (John Dailey) (03/25/85)
{ a free line } I am new at this so please bear with me. We have the game trek that was distributed with with BSD 4.2. Unfortunately, after playing a few minutes we get a segmentation fault. This occurs, or appears to occur, independently of what commands had been issued during the game. Does anyone know what the problem could be? Thanks in advance. |----------------------------------------------------------------------------| | John H. Dailey | | {decvax,ihnp4,cmcl2,vax135}!cornell!amvax!dailey (USENET) | | amvax.dailey@cornell.arpa (ARPANET) | |----------------------------------------------------------------------------|
cpf@lasspvax.UUCP (Footenay Courtman) (03/25/85)
> >I am new at this so please bear with me. We have the game trek that was >distributed with with BSD 4.2. Unfortunately, after playing a few minutes >we get a segmentation fault. > The problem is in the code for events.c. There are three bmove calls right in a row: bmove(Quad,...), bmove(Event,...), bmove(New,...). Quad and Event are arrays, New is a structure. The argument for the third bmove should be &New: i = (int)bmove((char *)Quad, (char *)i, sizeof (Quad)); i = (int)bmove((char *)Event, (char *)i, sizeof(Event)); i = (int)bmove((char *)&Now, (char *)i, sizeof (Now)); I no longer have the original source, so I can not post a diff. I have added all the casts myself, so the thing will pass lint. The source originaly read: i = bmove(Quad, i, sizeof (Quad)); i = bmove(Event, i, sizeof(Event)); i = bmove(Now, i, sizeof (Now)); Note the absence of the ampersand. Segmention faults are the unsuprising result of this bug. Note that the README file is unduly scary; I don't think anything else had to be changed to run on 4.2. I say "I don't think" because I hacked the code until most of it passed lint. -- Courtenay Footman arpa: cpf@lnsvax Newman Lab. of Nuclear Studies usenet: cornell!lnsvax!cpf Cornell University
avr@purdue.UUCP (Andrew V. Royappa) (03/11/86)
Yes, well, I read a file in the DOC directory of our trek distribution, which shed some light on this matter. The author is Eric Allman, not Kirk McKusick (KMcK's name appeared in the README file, EA's name appeared in DOC/read_me.nr). Anyway, apparently EA wrote the game and knew there were bugs in it. Also, I think "version 6" refers to the fact that the distribution we have is for "version 6 unix" (whatever that might be), not version 6 of the game. Grumble. All it boils down to is: my trek don't work, I want one that does. Thank you. Andrew V. Royappa {ihnp4, pur-ee, decvax, ucbvax}!purdue!avr avr@mordred