[Scummvm-devel] Discworld 2 video errors in trunk

Johannes Schickel lordhoto at scummvm.org
Thu Apr 15 21:18:22 CEST 2010


On 04/15/2010 09:11 PM, Torbjörn Andersson wrote:
>
> It looks fine for me too. However, Valgrind did complain about this:
>
> ==1682== Thread 1:
> ==1682== Source and destination overlap in memcpy(0x7e2dd20, 0x7e2dd20,
> 274560)
> ==1682==    at 0x4026069: memcpy (mc_replace_strmem.c:482)
> ==1682==    by 0x8845464: Tinsel::PrepBMV(unsigned char*, unsigned char
> const*, int, short) (bmv.cpp:239)
> ==1682==    by 0x88471CB: Tinsel::BMVPlayer::DoBMVFrame() (bmv.cpp:976)
> ==1682==    by 0x8847A05: Tinsel::BMVPlayer::FettleBMV() (bmv.cpp:1169)
> ==1682==    by 0x883E923: Tinsel::TinselEngine::run() (tinsel.cpp:1018)
> ==1682==    by 0x8055EC9: runGame(PluginSubclass<MetaEngine>  const*,
> OSystem&, Common::String const&) (main.cpp:209)
> ==1682==    by 0x805674C: scummvm_main (main.cpp:382)
> ==1682==    by 0x8052D85: main (main.cpp:65)
> ==1682==
>
> Perhaps that could explain it?
>    

Could be the cause, AFAIK it's undefined what happens in case you use 
memcpy on overlapping memory. I guess trying memmove instead and 
checking whether that fixes it would be one possibility.

// Johannes




More information about the Scummvm-devel mailing list