[ scummvm-Bugs-1483450 ] ALL: Valgrind warnings in our file-handling classes

SourceForge.net noreply at sourceforge.net
Sun May 7 20:22:51 CEST 2006


Bugs item #1483450, was opened at 2006-05-07 20:22
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1483450&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Unknown Crash/Other
Group: All Games
Status: Open
Resolution: None
Priority: 5
Submitted By: Torbjörn Andersson (eriktorbjorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: ALL: Valgrind warnings in our file-handling classes

Initial Comment:
I just had a strange problem when trying to start Kyra
1. Two or three times in a row, ScummVM complained that
it couldn't find any game in the specified directory. I
haven't been able to reproduce that since then, but it
did prompt me to run Valgrind.

It seems that when starting *some* games, Valgrind will
warn about uninitialized variable(s) in our
file-handling classes. The warnings seem to indicate
that _isDirectory isn't initialized, but so far I've
been unable to figure out why. Maybe Valgrind is
imagining things, but that doesn't explain the problem
I had...

Since Valgrind is very slow, I only tried a couple of
games. I got warning messages for Kyra 1, Broken Sword
2 and Simon the Sorcerer 1, but not for Monkey Island
2, Beneath a Steel Sky or Flight of the Amazon Queen.

There seemed to be two different warnings: One about
File::exists(), and one about FilesystemNode::listDir().

Example warnings:

==31046== Conditional jump or move depends on
uninitialised value(s)
==31046==    at 0x81059F7:
Common::File::exists(Common::String const&) (file.cpp:312)
==31046==    by 0x4D9F6CD:
Kyra::KyraEngine_v1::setupGameFlags() (plugin.cpp:276)
==31046==    by 0x4D9DE07: Kyra::KyraEngine::init()
(kyra.cpp:109)
==31046==    by 0x807627B: runGame(Plugin const*,
OSystem&, Common::String const&) (main.cpp:244)
==31046==    by 0x8076EFE: scummvm_main (main.cpp:362)
==31046==    by 0x8074271: main (sdl.cpp:99)


==31834==    at 0x80FD382:
FilesystemNode::listDir(FSList&,
FilesystemNode::ListMode) const (fs.cpp:103)
==31834==    by 0x8104C8F:
Common::File::addDefaultDirectoryRecursive(FilesystemNode
const&, int) (file.cpp:128)
==31834==    by 0x8104F52:
Common::File::addDefaultDirectory(Common::String
const&) (file.cpp:111)
==31834==    by 0x4CB761A:
Sword2::Sword2Engine::Sword2Engine(OSystem*)
(sword2.cpp:126)
==31834==    by 0x4CB798F:
Engine_SWORD2_create(OSystem*, Engine**) (sword2.cpp:116)
==31834==    by 0x4CB79C7: PLUGIN_createEngine
(sword2.cpp:120)
==31834==    by 0x807D7FA:
DynamicPlugin::createInstance(OSystem*, Engine**) const
(plugins.cpp:162)
==31834==    by 0x8075CB7: runGame(Plugin const*,
OSystem&, Common::String const&) (main.cpp:201)
==31834==    by 0x8076EFE: scummvm_main (main.cpp:362)
==31834==    by 0x8074271: main (sdl.cpp:99)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1483450&group_id=37116




More information about the Scummvm-tracker mailing list