[Scummvm-tracker] [ScummVM :: Bugs] #14892: DOTT: Crash when trying to play MM on Ed's computer
ScummVM :: Bugs
trac at scummvm.org
Tue Jan 30 09:06:46 UTC 2024
#14892: DOTT: Crash when trying to play MM on Ed's computer
---------------------+----------------------------------
Reporter: alexbevi | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCUMM
Version: | Resolution:
Keywords: | Game: Day of the Tentacle
---------------------+----------------------------------
Comment (by eriktorbjorn):
I was able to reproduce it with a scummvm.ini where Day of the Tentacle
was the only game I had added.
At this point, it's looping through all installed games trying to find one
that's installed in a "maniac" sub-folder to the current one. One of the
games it checks is Day of the Tentacle itself, i.e. it will check if a
path is relative to itself.
This leads to Path::extract("", nullptr) being called, where "" is one
byte after what it calculates as the string's end point. Then it tries to
create a new string from that begin/end, and that's where it crashes. I
think.
We could easily check that path != currentPath in the startManiac() loop,
but it seems to me that path.relativeTo(currentPath) shouldn't be allowed
to crash when path.isRelativeTo(currentPath) is true. Which leads to the
question, should a path be considered relative to itself or not? Seems
like a question for Le Philousophe.
By the way, we could probably replace the
path.toString('/').matchString("*maniac*", ...) check with something
simpler now, after the recent "Migrate engine to Path" changes? Perhaps
check (case insensitive) what path.getLastComponent() points to? It looks
like that would strip away any trailing path separators, which was the
point of using matchString() to begin with.
--
Ticket URL: <https://bugs.scummvm.org/ticket/14892#comment:9>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list