There are indeed two ".vegastrike-0.5.0" directories--the one in the data directory has playlists that come with the game, and the one in the home directory has everything else. For future releases we can try to get rid of the one in data since it is mostly redundant I think.
So I'm wondering if you have changed anything. How had you gotten it to recognize the data directory?
It should be looking in Version.txt to determine the name of the home folder...I'm worried if it doesn't find that, it might default to blank or something.
If nothing changed in the code and you don't know why it's trying to write to the wrong place, would it be possible to strace (or ptrace) the setup program, and send the stderr to a file with 2> strace.log
There's a chance that doing this could allow me to see if there's anything in the data or home directory code that's acting weird on FreeBSD or soemthing of the sort.
Compiling on FreeBSD
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
-
- Explorer
- Posts: 14
- Joined: Mon May 05, 2008 5:30 pm
I'm using source tarballs. .vegastrike-0.5.0 comes from there unchanged, yes.safemode wrote:make sure your vegastrike.config is unchanged from svn.
Via passing --datadir to configureace123 wrote:So I'm wondering if you have changed anything. How had you gotten it to recognize the data directory?
Seems like there's no problem with this - it says `Found data in /usr/local/share/vegastrike' and [ks]trace shows Version.txt is opened successfully.ace123 wrote:It should be looking in Version.txt to determine the name of the home folder...I'm worried if it doesn't find that, it might default to blank or something.
Please see amdmi3.ru/vegastrike, there are both strace and ktrace (FreeBSD specific tool afaik, somewhat more informative judging from log size) logs.ace123 wrote:If nothing changed in the code and you don't know why it's trying to write to the wrong place, would it be possible to strace (or ptrace) the setup program, and send the stderr to a file with 2> strace.log
Some search led me to this (setup/src/include/file.cpp:294):
Code: Select all
// tmp1="/usr/local/share/vegastrike/vegastrike.config"
if ((wp = fopen(tmp1.c_str(), "w")) == NULL) {
// wp = NULL,
// but this is not displayed... maybe because buffers don't get flushed?
fprintf (stderr, "Unable to write to %s\n", CONFIG.config_file );
}
while ((p = fgets(line, MAX_READ, rp)) != NULL) {
// wp = 0 -> segfault
fprintf(wp, line);
}
PS. Btw, vegastrike itself runs normally, creates ~/.vegastrike-0.5.0 and populates it with some files.
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
You're right--The code is completely broken--I don't know what I was thinking when I added the mkdir.
Go to setup.cpp, line 208, and move that "chdir" line to be after the call to "mkdir"... that way the directory is guaranteed to exist.
Now I'm just confused why nobody has complained about this after the release?
I suppose it's because it's such an obscure bug--only happens the first time you run "vssetup", and only if you hadn't run "vegastrike" beforehand.
Go to setup.cpp, line 208, and move that "chdir" line to be after the call to "mkdir"... that way the directory is guaranteed to exist.
Now I'm just confused why nobody has complained about this after the release?
I suppose it's because it's such an obscure bug--only happens the first time you run "vssetup", and only if you hadn't run "vegastrike" beforehand.
-
- Explorer
- Posts: 14
- Joined: Mon May 05, 2008 5:30 pm
Doesn't help. I've tried setup.cpp from SVN.ace123 wrote:You're right--The code is completely broken--I don't know what I was thinking when I added the mkdir.
Go to setup.cpp, line 208, and move that "chdir" line to be after the call to "mkdir"... that way the directory is guaranteed to exist.
I suppose most people use VS inplace after unpacking the tarball/checking out SVN.ace123 wrote: Now I'm just confused why nobody has complained about this after the release?
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
I was only fixing the problem where it doesn't make the ".vegastrike-0.5.0" directory the first time you run it.
Are you sure that you have at least revision 12203 that was backported to the 0.5.0 tag on April 26? you can also update to latest SVN which now includes the mkdir change I was talking about.
In the latest SVN, vegastrike/setup/src/include/file.cpp has on line 304:
CONFIG.config_file should be within your home directory, and only if it fails it will try the one in the game directory... Only if that fails will it call "exit(1)".
The code segment you pasted looks like old vssetup code. [I'm pretty sure the source tarball included this change as well since that was only two days after the initial release...]
If you're still having the crash, would it be possible to compile vssetup with debug symbols so I know what line on Modconfig() was causing the crash? [I don't think it's possible for wp to be NULL at that point since it calls exit(1) before that]
Are you sure that you have at least revision 12203 that was backported to the 0.5.0 tag on April 26? you can also update to latest SVN which now includes the mkdir change I was talking about.
In the latest SVN, vegastrike/setup/src/include/file.cpp has on line 304:
Code: Select all
string tmp1 = CONFIG.config_file;
/*
if(origconfig) {
tmp1 = mangle_config (CONFIG.config_file);
}
*/
if ((wp = fopen(tmp1.c_str(), "w")) == NULL) {
tmp1 = mangle_config (CONFIG.config_file);
if ((wp = fopen(tmp1.c_str(), "w")) == NULL) {
tmp1 = CONFIG.config_file;
if ((wp = fopen(tmp1.c_str(), "w")) == NULL) {
fprintf (stderr, "Unable to write to %s\n", CONFIG.config_file );
exit(1);
}
}
}
while ((p = fgets(line, MAX_READ, rp)) != NULL) {
fprintf(wp, line);
}
The code segment you pasted looks like old vssetup code. [I'm pretty sure the source tarball included this change as well since that was only two days after the initial release...]
If you're still having the crash, would it be possible to compile vssetup with debug symbols so I know what line on Modconfig() was causing the crash? [I don't think it's possible for wp to be NULL at that point since it calls exit(1) before that]
-
- Explorer
- Posts: 14
- Joined: Mon May 05, 2008 5:30 pm
Oops, sorry. I thought the tarball had latest revision of file.cpp. After updating to _really_ latest revision everything works finally - no crashes, both dotdir and config are created.
So the mission is now complete, I've just submitted the ports, they should be added into the tree in a week or so. I'll notify you then.
Thanks for your help, thanks for a great game and keep up the good work :)
So the mission is now complete, I've just submitted the ports, they should be added into the tree in a week or so. I'll notify you then.
Thanks for your help, thanks for a great game and keep up the good work :)
-
- Explorer
- Posts: 14
- Joined: Mon May 05, 2008 5:30 pm
Vega strike is now in FreeBSD ports. You can count FreeBSD as supported platform :)
http://www.freshports.org/games/vegastrike/
http://www.freshports.org/games/vegastrike-data/
http://www.freshports.org/games/vegastrike/
http://www.freshports.org/games/vegastrike-data/
-
- The Shepherd
- Posts: 5841
- Joined: Fri May 13, 2005 8:37 pm
- Location: Ottawa
- Contact:
Great news might add that to my announcement at the LXF forum
Enjoy the Choice
Enjoy the Choice
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact: