Thread: [Super-tux-devel] seg fault
Brought to you by:
wkendrick
From: Duong-Khang N. <neo...@us...> - 2004-02-19 10:53:12
|
Hey, What is going wrong with the current CVS ? I can't even launch the game, it crashes when I choose "start game". However when I try to play via Level Editor, it works. I have just updated my working directory. It's 10:40 am GMT here. ====================================== [neurone@Neo workst]$ ./supertux Warning: No joysticks are available. name found Fatal signal: Segmentation Fault (SDL Parachute Deployed) ====================================== -- Never say if I could turn back the time, life is going on ! |
From: <ri...@ae...> - 2004-02-19 17:12:39
|
=20 Hi,=20 =20 This leads to a question, is SuperTux ready for the 0.0.6?=20 C'mon, all the gameplay is screwed up and now this...=20 =20 Anyway, I don't like the way that the data directory is found...=20 The data directory is setuped during the make, which is not that=20 brilliant, since a simple move of the game makes it not to work.=20 I think that the installation directory should be setuped during=20 the make process, but the current dir, when the game is not=20 installed should use some hack like this one (from myself):=20 http://rpmcruz.planetaclix.pt/repository/system/index.html#curdir=20 =20 Tobias, what do you think?=20 =20 Ricardo Cruz=20 =20 Citando Duong-Khang NGUYEN <neo...@us...>:=20 =20 > Hey,=20 > =20 > What is going wrong with the current CVS ? I can't even launch the=20 game, it=20 > =20 > crashes when I choose "start game". However when I try to play via=20 Level =20 > Editor, it works.=20 > =20 > I have just updated my working directory. It's 10:40 am GMT here.=20 > =20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 > [neurone@Neo workst]$ ./supertux=20 > Warning: No joysticks are available.=20 > name found=20 > Fatal signal: Segmentation Fault (SDL Parachute Deployed)=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 > =20 > =20 _________________________________________________________ Screensavers e wallpapers gr=E1tis: http://freegames.online.pt |
From: Bill K. <nb...@so...> - 2004-02-19 22:21:35
|
On Thu, Feb 19, 2004 at 05:07:03PM +0000, ri...@ae... wrote: > Anyway, I don't like the way that the data directory is found... > The data directory is setuped during the make, which is not that > brilliant, since a simple move of the game makes it not to work. > I think that the installation directory should be setuped during > the make process, but the current dir, when the game is not > installed should use some hack like this one (from myself): > http://rpmcruz.planetaclix.pt/repository/system/index.html#curdir I just noticed this in Makefile, which is damned silly: ifeq ($(PREFIX),) ifeq ($(USERNAME),root) PREFIX=/usr/local ... So ONLY if they compile it as root, will it install in /usr/local??? I NEVER compile stuff as root! I always do: $ ./configure <-- if necessary $ make $ su # make install # exit $ I'm sure in the original 0.0.4/0.0.5 Super Tux, I was doing my stupid old system where it ASSUMED you were installing into your home dir, or just running out of the untar'd directory. I've learned, since then, that it's best to let the user CHOOSE to do this, but DEFAULT to install in /usr/local/ So now, things like Tux Paint will ASSUME data will be stored in, say, "/usr/local/share/tuxpaint/" or some-such, and the user must then do a "make install" as root to get the Makefile to copy data to there. -bill! |
From: Tobias <tob...@gm...> - 2004-02-19 22:29:12
|
Am Do, den 19.02.2004 schrieb Bill Kendrick um 17:15: > On Thu, Feb 19, 2004 at 05:07:03PM +0000, ri...@ae... wrote: > > Anyway, I don't like the way that the data directory is found... > > The data directory is setuped during the make, which is not that > > brilliant, since a simple move of the game makes it not to work. > > I think that the installation directory should be setuped during > > the make process, but the current dir, when the game is not > > installed should use some hack like this one (from myself): > > http://rpmcruz.planetaclix.pt/repository/system/index.html#curdir > > I just noticed this in Makefile, which is damned silly: > > ifeq ($(PREFIX),) > ifeq ($(USERNAME),root) > PREFIX=/usr/local > ... > > > So ONLY if they compile it as root, will it install in /usr/local??? You are wrong Dot :) If no PREFIX is set on the command line and you are ROOT then it will automatically choose /usr/local, because only then a "User" is assumed to have write-access to this directory. In any other situation the $PWD is choosen. Greetz... Tobias Gläßer |
From: Ingo R. <gr...@gm...> - 2004-02-20 00:13:54
|
ri...@ae... writes: > http://rpmcruz.planetaclix.pt/repository/system/index.html#curdir > > Tobias, what do you think? Changing current directory is kind of evil, better they where you are and just open the files from whereever they are, the tricky part is always to find out where they are, since programms in linux are very often launched from PATH. Most programms use ugly evil hardcoded paths in the binary. Luckily the /proc filesystem provides the absolute location of an executable, so no need for hardcompiled stuff, code looks like: char exe_file[PATH_MAX]; if (readlink("/proc/self/exe", exe_file, PATH_MAX) < 0) { throw CL_Error(strerror(errno)); } else { return std::string(dirname(exe_file)) + "/"; } -- WWW: http://pingus.seul.org/~grumbel/ JabberID: gr...@ja... ICQ: 59461927 |
From: Bill K. <nb...@so...> - 2004-02-19 22:45:21
|
On Thu, Feb 19, 2004 at 11:28:27PM -0500, Tobias Gl=E4=DFer wrote: > > So ONLY if they compile it as root, will it install in /usr/local??? >=20 > You are wrong Dot :) >=20 > If no PREFIX is set on the command line and you are ROOT then it will > automatically choose /usr/local, because only then a "User" is assumed > to have write-access to this directory. > In any other situation the $PWD is choosen. Okay, sorry... "ONLY if they compile as root, OR remember to set PREFIX", it will want to install /usr/local I think it should DEFAULT to /usr/local/ _UNLESS_ they override it. Otherwise, if they do this: $ make $ su # make install as a normal person, who is used to configure scripts and other programs, = would, it will simply try to 'install' back into $PWD D'OH! -bill! |
From: Tobias <tob...@gm...> - 2004-02-19 22:52:55
|
Am Do, den 19.02.2004 schrieb Bill Kendrick um 17:39: > On Thu, Feb 19, 2004 at 11:28:27PM -0500, Tobias Gläßer wrote: > > > So ONLY if they compile it as root, will it install in /usr/local??? > > > > You are wrong Dot :) > > > > If no PREFIX is set on the command line and you are ROOT then it will > > automatically choose /usr/local, because only then a "User" is assumed > > to have write-access to this directory. > > In any other situation the $PWD is choosen. > > Okay, sorry... "ONLY if they compile as root, OR remember to set PREFIX", > it will want to install /usr/local > > I think it should DEFAULT to /usr/local/ _UNLESS_ they override it. > Otherwise, if they do this: > > $ make > $ su > # make install > > as a normal person, who is used to configure scripts and other programs, would, > it will simply try to 'install' back into $PWD > > D'OH! > > -bill! Hmm, this is useful for development, because you don't need to change (set parameters in Makefile etc. ) anything and can directly try out your latest one liner. I agree, for releases this should be changed. ;) Greetz... Tobias Gläßer |
From: Tobias <tob...@gm...> - 2004-02-19 23:16:44
|
Am Do, den 19.02.2004 schrieb Duong-Khang NGUYEN um 05:40: > Hey, > > What is going wrong with the current CVS ? I can't even launch the game, it > crashes when I choose "start game". However when I try to play via Level > Editor, it works. > > I have just updated my working directory. It's 10:40 am GMT here. This segfault should be fixed. I forgot to add a few files to the CVS. :( Sorry ... Additionally a new check ensures that a segfault is prevented. Greetz... Tobias Gläßer |
From: Tobias <tob...@gm...> - 2004-02-19 23:52:04
|
Am Fr, den 20.02.2004 schrieb Tobias Gläßer um 00:15: > Am Do, den 19.02.2004 schrieb Duong-Khang NGUYEN um 05:40: > > Hey, > > > > What is going wrong with the current CVS ? I can't even launch the game, it > > crashes when I choose "start game". However when I try to play via Level > > Editor, it works. > > > > I have just updated my working directory. It's 10:40 am GMT here. > > This segfault should be fixed. I forgot to add a few files to the CVS. > :( > > Sorry ... > > Additionally a new check ensures that a segfault is prevented. > > Greetz... > > Tobias Gläßer Well, the code works properly for me but at least Ingo is reporting, that it still doesn't work like expected. There is no reason to send further bug reports on this matter, I'm on it. Greetz... Tobias Gläßer |