[Scummvm-tracker] [ScummVM :: Bugs] #14431: XEEN: crash at showCloudsEnding2 and 3

ScummVM :: Bugs trac at scummvm.org
Sat Apr 22 10:54:15 UTC 2023


#14431: XEEN: crash at showCloudsEnding2 and 3
-------------------------------------------+--------------------------
Reporter:  yarolig                         |      Owner:  (none)
    Type:  patch                           |     Status:  new
Priority:  normal                          |  Component:  Engine: Xeen
 Version:                                  |   Keywords:
    Game:  Might and Magic: World of Xeen  |
-------------------------------------------+--------------------------
 I finished the clouds side and get a crash at cutscene...

 This patch will fix it for branch 2-7 (need different path for master):
 {{{
 diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.cpp
 b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
 index 4f1657fd5af..85815588602 100644
 --- a/engines/xeen/worldofxeen/clouds_cutscenes.cpp
 +++ b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
 @@ -688,6 +688,7 @@ bool CloudsCutscenes::showCloudsEnding2() {
         WAIT(5);

         Graphics::ManagedSurface savedBg;
 +       savedBg.create(screen.w, screen.h, screen.format);
         savedBg.blitFrom(screen);

         // Close up of King Roland
 @@ -767,6 +768,7 @@ bool CloudsCutscenes::showCloudsEnding3() {

         // Zooming into the mirror
         screen.freePages();
 +       savedBg.create(screen.w, screen.h, screen.format);
         savedBg.blitFrom(screen);

         const int XLIST3[9] = { 0, -5, -10, -15, -24, -30, -39, -50, -59
 };
 }}}


 Backtrace I got:
 {{{
 (gdb) bt
 #0  __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
 #1  0x00007ffff6a2d859 in __GI_abort () at abort.c:79
 #2  0x00007ffff6a2d729 in __assert_fail_base
     (fmt=0x7ffff6bc3588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
 assertion=0x555555ee9b28 "destFormat.bytesPerPixel == 1 ||
 destFormat.bytesPerPixel == 2 || destFormat.bytesPerPixel == 3 ||
 destFormat.bytesPerPixel == 4", file=0x555555ee9b08
 "graphics/managed_surface.cpp", line=293, function=<optimized out>) at
 assert.c:92
 #3  0x00007ffff6a3efd6 in __GI___assert_fail
     (assertion=0x555555ee9b28 "destFormat.bytesPerPixel == 1 ||
 destFormat.bytesPerPixel == 2 || destFormat.bytesPerPixel == 3 ||
 destFormat.bytesPerPixel == 4", file=0x555555ee9b08
 "graphics/managed_surface.cpp", line=293, function=0x555555ee9a88 "void
 Graphics::ManagedSurface::blitFromInner(const Graphics::Surface&, const
 Common::Rect&, const Common::Rect&, const uint32*)") at assert.c:101
 #4  0x0000555555b246f1 in
 Graphics::ManagedSurface::blitFromInner(Graphics::Surface const&,
 Common::Rect const&, Common::Rect const&, unsigned int const*)
 (this=0x7fffffffc790, src=..., srcRect=..., destRect=..., srcPalette=0x0)
     at graphics/managed_surface.cpp:293
 #5  0x0000555555b244c5 in
 Graphics::ManagedSurface::blitFrom(Graphics::ManagedSurface const&,
 Common::Rect const&, Common::Point const&) (this=0x7fffffffc790, src=...,
 srcRect=..., destPos=...) at graphics/managed_surface.cpp:261
 #6  0x0000555555b2430e in
 Graphics::ManagedSurface::blitFrom(Graphics::ManagedSurface const&)
 (this=0x7fffffffc790, src=...) at graphics/managed_surface.cpp:249
 #7  0x000055555591a655 in
 Xeen::WorldOfXeen::CloudsCutscenes::showCloudsEnding2()
 (this=0x5555574c3d40) at engines/xeen/worldofxeen/clouds_cutscenes.cpp:691
 #8  0x0000555555918e2c in
 Xeen::WorldOfXeen::CloudsCutscenes::showCloudsEnding(unsigned int)
 (this=0x5555574c3d40, finalScore=63401048) at
 engines/xeen/worldofxeen/clouds_cutscenes.cpp:395
 #9  0x000055555589d8d1 in
 Xeen::WorldOfXeen::WorldOfXeenEngine::showCutscene(Common::String const&,
 int, unsigned int) (this=0x5555574c3c00, name=..., status=0,
 score=63401048) at engines/xeen/worldofxeen/worldofxeen.cpp:165
 #10 0x0000555555905e2d in Xeen::Scripts::doEnding(Common::String const&)
 (this=0x5555574c4fe0, endStr=...) at engines/xeen/scripts.cpp:1555
 #11 0x0000555555905be2 in Xeen::Scripts::doCloudsEnding()
 (this=0x5555574c4fe0) at engines/xeen/scripts.cpp:1518
 #12 0x000055555590456c in
 Xeen::Scripts::cmdCutsceneEndClouds(Xeen::EventParameters::Iterator&)
 (this=0x5555574c4fe0, params=...) at engines/xeen/scripts.cpp:1132
 #13 0x0000555555901e92 in Xeen::Scripts::doOpcode(Xeen::MazeEvent&)
 (this=0x5555574c4fe0, event=...) at engines/xeen/scripts.cpp:387
 #14 0x00005555559012fe in Xeen::Scripts::checkEvents()
 (this=0x5555574c4fe0) at engines/xeen/scripts.cpp:190
 #15 0x00005555558b5c75 in Xeen::Interface::perform() (this=0x5555576bfab0)
 at engines/xeen/interface.cpp:357
 #16 0x000055555589b263 in Xeen::XeenEngine::gameLoop()
 (this=0x5555574c3c00) at engines/xeen/xeen.cpp:284
 #17 0x000055555589b090 in Xeen::XeenEngine::play() (this=0x5555574c3c00)
 at engines/xeen/xeen.cpp:253
 #18 0x000055555589adbb in Xeen::XeenEngine::playGame()
 (this=0x5555574c3c00) at engines/xeen/xeen.cpp:209
 #19 0x000055555589ab5a in Xeen::XeenEngine::outerGameLoop()
 (this=0x5555574c3c00) at engines/xeen/xeen.cpp:164
 #20 0x000055555589aa3e in Xeen::XeenEngine::run() (this=0x5555574c3c00) at
 engines/xeen/xeen.cpp:139
 #21 0x00005555558799ef in runGame(Plugin const*, Plugin const*, OSystem&,
 Common::String const&) (plugin=0x5555567285a0,
 enginePlugin=0x555556736ae0, system=..., debugLevels=...) at
 base/main.cpp:318
 #22 0x000055555587ba25 in scummvm_main(int, char const* const*) (argc=1,
 argv=0x7fffffffdf08) at base/main.cpp:752
 #23 0x0000555555876aa8 in main(int, char**) (argc=1, argv=0x7fffffffdf08)
 at backends/platform/sdl/posix/posix-main.cpp:44
 }}}
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/14431>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list