[Scummvm-devel] Major "bug" / misfeature in the Stream system

Schrijvers Luc Begasus at skynet.be
Mon Sep 15 12:48:06 CEST 2008


Not sure it it's all related to the new changes but the BeOS/SDL port
crashes when I try to start a game. The engines build ok en ScummVM even
starts up ok, I can load a game also (lure and Simon are the 2 ones I
try out here).

When I hit (Start) the engine crashes and I don't get a lot of output
from the debugger, I'll write down what I have so far.

scummvm:sc
	frame		retaddr
non-resident page encountered - cannot determine if leaf routine. Sorry!
scummvm: st
	^ Ambiguous symbol
scummvm:

When I delete the setting file in my home folder and start scummvm I get
this in the Terminal:

WARNING: File::open: Trying to open a FilesystemNode wich does not
exist!
Used picked target 'lure' (gameid 'lure') ...
	Looking for a plugin supporting this gameid... Lure of the Tempress
Engine
	Starting 'Lure of the Tempress'
Segmentation violation

The last line is when it actualy tries to start the game.

Hope this gives someone a clue as to what is happening here.

Luc aka Begasus

On zo, 2008-09-14 at 22:30 +0000, Willem Jan Palenstijn wrote:
> Hi all,
> 
> As a follow-up to Max's Stream patch from yesterday, I committed a more
> invasive change to Stream:
> 
> * eos() now only returns true _after_ trying to read past the end
>     of the stream. This is consistent with how stdio's feof() works
> 
> As supporting changes around this:
> 
> * seek() resets the end-of-stream flag if successful
> * read() sets the end-of-stream flag when trying to read more data than
>      available
> * err() returns true if an I/O error occurred. (Reading past the end of
>      the stream is not considered an I/O error)
> * clearErr() resets the I/O error flag and the end-of-stream flag
> 
> For backward compatibility:
> 
> * ioFailed() is now equal to eos() || err()
> * clearIoFailed() calls clearErr()
> 
> [All above references to eos() only apply to ReadStreams. WriteStreams
> don't have the concept of end-of-stream, but do have the err() and
> clearErr() functions for I/O errors.]
> 
> 
> 
> I have attempted to update the custom Stream/File implementations in the
> platform backends (dc, ds, ps2, symbian), but am unfortunately not able
> to test these. Porters, please double-check and test the modifications.
> I also hope the new eos() semantics may allow you to reduce the amount
> of custom code because it now closer matches the behaviour feof().
> 
> I have also attempted to update all uses of eos() in the engines, but
> am also not able to test all of those, because I do not have all
> required games.
> 
> 
> To minimize the impact of this patch, I have not yet updated:
> * graphics/iff.cpp (PackBitsReadStream)
> * engines/parallaction (Parallaction::Archive and usage of PackBitsReadStream)
> * engines/gob/dataio.cpp (Gob::DataStream)
> 
> 
> What remains to be done:
> * a lot of regression testing
> * update eos() in PackBitsReadStream,Parallaction::Archive,Gob::DataStream
> * replace all uses of ioFailed() with correct usage of err() and/or eos()
> * add additional unit tests for the Stream classes
> 
> Volunteers are, of course, welcome :-)
> 
> 
> 
> If you encounter any problems, or if there are any areas in the Stream
> documentation in common/stream.h which are unclear or ambiguous, please
> let me know.
> 
> 
> -Willem Jan
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel





More information about the Scummvm-devel mailing list