[Scummvm-devel] Re: [Scummvm-devel] FT: assert error

pablo at omega.xtr.net.pl pablo at omega.xtr.net.pl
Mon Jan 12 08:03:01 CET 2004


it's fixed in current cvs

> I get this error:
> scummvm: scumm/imuse_digi/dimuse_sndmgr.cpp:390: int32
> Scumm::ImuseDigiSndMgr::getDataFromRegion(Scumm::ImuseDigiSndMgr::soundStruct*,
> int, byte**, int, int): Assertion `region >= 0 && region <
> soundHandle->numRegions' failed.
>
>
> Backtrack of the error:
>
> In scumm/imuse_digi/dimuse.cpp
>
> if (_track[l].curRegion == -1)
> 	switchToNextRegion(l);
> ...
> int result2 = _sound->getDataFromRegion(_track[l].soundHandle,
> _track[l].curRegion, &ptr, offset, mixer_size_12);
>
>
> This will lead to an error in one of the asserts in getDataFromRegion
> because switchToNextRegion can return without changing curRegion if the
> game is Full Throttle, so curRegion will remain -1. The bug is triggered
> if the door to the bar at the beginning is clicked at but no action is
> taken.
>
> void IMuseDigital::switchToNextRegion(int track) {
> 	int num_regions = _sound->getNumRegions(_track[track].soundHandle);
> 	int num_jumps = _sound->getNumJumps(_track[track].soundHandle);
> 	if ((_vm->_gameId == GID_FT) && (num_jumps != 0)) {
> 		_track[track].regionOffset = 0;
> 		return;
> 	}
>
> int32 ImuseDigiSndMgr::getDataFromRegion(soundStruct *soundHandle, int
> region, byte **buf, int32 offset, int32 size) {
> 	...
> 	assert(region >= 0 && region < soundHandle->numRegions);
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Perforce Software.
> Perforce is the Fast Software Configuration Management System offering
> advanced branching capabilities and atomic changes on 50+ platforms.
> Free Eval! http://www.perforce.com/perforce/loadprog.html
> _______________________________________________
> 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