Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!nmtsun!snsrjth From: snsrjth@nmtsun.nmt.edu (- Jeff -) Newsgroups: comp.sources.games.bugs Subject: Re: tetrix INIT_PAUSE Message-ID: <2141@nmtsun.nmt.edu> Date: 11 Mar 89 23:06:39 GMT References: <204@sabin.UUCP> <1816@viscous.sco.COM> <14235@elroy.Jpl.Nasa.Gov> <1085@ur-cc.UUCP> Organization: New Mexico Tech, Socorro NM Lines: 38 In article <1085@ur-cc.UUCP>, lmna_cif@uhura.cc.rochester.edu (Louis Nau) writes: > In article <14235@elroy.Jpl.Nasa.Gov> dave%jplopto@jpl-mil.jpl.nasa.gov writes: > >OK, tetris gives me a segmentation fault when I try to run it. > >What's the problem? > I too have the same problem. Could someone please either post > or mail me as to why it does this? It compiles without any problem, but > just dumps core when run. I am trying to run it on a Sun 3/280S with SunOS. It core dumped when I compiled it too. But I think I have a solution. I found that it is core dumping because of line 77 of main.c. It was dying in strcpy() on line 77: strcpy(tetrisenv, getenv("TETRIS")); because the optional 'TETRIS' environment variable wasn't defined. When I defined it (ie 'setenv TETRIS'), it seemed to run fine. To fix this problem change line 74 in main.c from if(argc<2 && getenv("TETRIS") == NULL) { i=0, j=0, k=0; to if(argc<2 && getenv("TETRIS") != NULL) { i=0, j=0, k=0; Hopefully this should remedy the problem (Or at least it did with the version I have). - Jeff -- +--------------------------------------------------------------------------+ | - Jeff - | snsrjth@nmtsun.nmt.edu | | ERROR: Quote file not found. | {...unmvax!nmtsun!snsrjth} | +--------------------------------------------------------------------------+