Opened 18 months ago

Last modified 15 months ago

#14174 new defect

When installed via "make dist-generic", theme folder isn't automatically found unless supported by backend

Reported by: mikrosk Owned by: lephilousophe
Priority: normal Component: Common
Version: Keywords: data, configure
Cc: Game: Full Throttle

Description

I have noticed this while testing https://downloads.scummvm.org/frs/demos/scumm/ft-dos-demo-en.zip.

Basically configure any backend with --datadir=data, make && make dist-generic, add game ft-demo and watch... a segmentation fault!

./scummvm 
WARNING: Couldn't initialize text to speech through speech-dispatcher!
User picked target 'ft-demo' (engine ID 'scumm', game ID 'ft')...
   Looking for a plugin supporting this target... SCUMM [v0-v6 games, v7 & v8 games]
WARNING: SearchSet::add: archive 'data' already present!
NutRenderer::loadFont() Can't open font file: icons.nut!
Segmentation fault (core dumped)

Apparently, scummvm realizes that "data" has been already added to the search set (the system one) and skips the "data" for given game, therefore leading to a crash because a font file has not been found.

I can imagine that if scummvm expands every relative path to an absolute one before adding to the search set (in runtime) would fix this kind of issues.

Change History (6)

comment:1 by lephilousophe, 17 months ago

Owner: set to lephilousophe
Resolution: wontfix
Status: newpending

--datadir is not intended to be a relative path. It's used by some platform to customize where in the system the data is installed.

comment:2 by mikrosk, 17 months ago

Hmm, so how to interpret --datadir="data" (what I've seen quite often on various places) then? It's true that in the meantime I have discovered "make dist-generic" but that doesn't solve this problem either.

I can't test it right now but I see that "make dist-generic" even with basic ./configure (no further parameters) installs stuff into a relative (next to the scummmvm executable) "data" so are you sure that this problem wouldn't show up in such case anyway? (I can confirm this for you in the evening).

comment:3 by mikrosk, 17 months ago

Resolution: wontfix
Status: pendingnew

Phew, I was wrong. Plain ./configure && make && make dist-generic creates a relative "data" folder but doesn't lead to the crash anymore.

However: when *not* specifying --datadir="data", the theme is not loaded / found automatically in the "dist-generic" layout (I need to go to the Paths tab and set the absolute path manually). When I do specify it, it is loaded / found automatically.

I think this justifies reopening this ticket because it is directly related to the --datadir switch (although the fix would be in a different area, ScummVM should perhaps know that "data" is the default *relative* path for loading themes unless overriden with a *absolute* path via --datadir).

comment:4 by lephilousophe, 17 months ago

./configure --data-dir= is used to specify the directory to use when scummvm is installed on the user computer.
This setup is done using make install, not make dist-generic.

make dist-generic is used to prepare a package for users and, as its name indicates, is generic and called by specific platforms: it is not intended to be used by end-user.

comment:5 by mikrosk, 17 months ago

I'm not end-user, I'm a packager and I have packaged ScummVM using "make dist-generic". And found out that the themes are not loaded anymore. Using --datadir="data" worked for me until I found out about the FT Demo but I agree with you, it shouldn't be perhaps used like that.

Is this wrong medium to report bugs like this? (i.e. is this bug tracker indented for end-users only?)

I'm a new contributor so it's possible I have overlooked some obvious processes.

comment:6 by mikrosk, 15 months ago

Summary: ./configure --datadir=data and game "data" folder conflictWhen installed via "make dist-generic", theme folder isn't automatically found unless supported by backend
Note: See TracTickets for help on using tickets.