View Issue Details

IDProjectCategoryView StatusLast Update
0003586Spring engineGeneralpublic2015-07-06 11:07
Reporterraziel Assigned Toabma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version93.2 
Summary0003586: Mandatory absolute data dir paths avoid portability
DescriptionGame refuses to run with relative data dirs
Steps To ReproduceOn Archlinux:
* Download the code from http://sourceforge.net/p/pg4l/code
* Run pacman2appDir -a spring
* Run ./AppRun
Additional InformationI'm trying to create a portable, auto-runnable version of spring for http://www.portablelinuxgames.org/.

In order to make the game work without installation, I patch the binaries to remove absolute paths and translate them to relative paths. However, when I do this with any spring-related game, I get this error:

Error: Spring: Incorrect/Missing content: a datadir may not be specified with a relative path: "./../share/spring/"

According to http://code.metager.de/source/xref/SpringRTS/spring/rts/System/FileSystem/DataDirLocater.cpp in DeterminePermissions() you look for ".." in the path, and automatically mark it as invalid if it's found, even if it has little to do with permissions IMHO.

Why is this check made? Can it be avoided?
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

jK

2013-03-16 15:22

developer   ~0010086

You should read spring's man page
You already have `full` control over the directories it searches for even w/o any code changes.
So you just need the linux static build + the code to embed it in PLG

raziel

2013-03-16 21:57

reporter   ~0010089

Thanks jK, Archlinux package doesn't seem to package such man page. The problem is if all directories are checked for an initial '/', then I cannot use relative paths, and AppImage packages are mounted on directories created with mktemp so absolute paths won't work here.

If removing this check is not possible, I guess I could hot-copy or link the data dir from the package to $HOME/.spring, although I'd like to avoid that.

raziel

2013-03-16 22:00

reporter   ~0010090

Oops, I just found some documentation on http://springrts.com/phpbb/viewtopic.php?t=6497, using SPRING_DATADIR is perfect for me, so this is no longer an issue.

raziel

2013-03-17 10:51

reporter   ~0010096

Done, packaged and uploaded to http://www.portablelinuxgames.org/

The static version fails to run on a Ubuntu LiveCD, because some libraries are not statically linked (libopenal, libSDL, etc). The Archlinux version, which includes *all* libraries and even the linker (ld-linux.so.2), actually runs. For some reason it segfaults after the data dirs are loaded, but it may be related to graphic drivers.

abma

2013-03-21 00:25

administrator   ~0010143

Last edited: 2013-03-21 00:25

to fix the segfault a backtrace and infolog.txt would be useful...

raziel

2013-03-30 11:44

reporter   ~0010323

Last edited: 2013-03-30 11:44

Thanks abma, here's a dump of the strace and program output:
http://pastebin.com/NjJ7Ws5h
http://pastebin.com/WUuseA7z

I got these traces running this package: Kernel Panic 204.4 ( http://sourceforge.net/projects/pg4l/files/Spring%20Kernel%20Panic/Spring%20Kernel%20Panic%204.4-r1-archlinux.run/download ). It only seems to fail on when I run it on an Ubuntu live USB natively on my laptop (Dell XPS L502X), either both 12.04 and 12.10. When I run it on my Archlinux, or on a Ubuntu 10.04 live VirtualBox VM on top of my Archlinux, the game runs fine. This is my hwinfo, extracted from Archlinux: http://pastebin.com/1DkVgyK3

abma

2015-07-06 11:07

administrator   ~0014908

very likely crash was caused by gfx drivers. also the original report is fixed/solved.

if it still crashes, please create a new report.

Issue History

Date Modified Username Field Change
2013-03-16 14:19 raziel New Issue
2013-03-16 15:22 jK Note Added: 0010086
2013-03-16 21:57 raziel Note Added: 0010089
2013-03-16 22:00 raziel Note Added: 0010090
2013-03-17 10:51 raziel Note Added: 0010096
2013-03-21 00:25 abma Note Added: 0010143
2013-03-21 00:25 abma Note Edited: 0010143
2013-03-30 11:44 raziel Note Added: 0010323
2013-03-30 11:44 raziel Note Edited: 0010323
2015-07-06 11:07 abma Note Added: 0014908
2015-07-06 11:07 abma Status new => resolved
2015-07-06 11:07 abma Resolution open => unable to reproduce
2015-07-06 11:07 abma Assigned To => abma
2015-07-06 11:07 abma Resolution unable to reproduce => fixed