Opened 7 years ago

Closed 7 years ago

#10252 closed defect (fixed)

SCI: RAMA: Assertion failure when loading from launcher

Reported by: bgK Owned by: csnover
Priority: normal Component: Engine: SCI
Version: Keywords: sci32
Cc: Game: RAMA

Description

ScummVM: dc7e37fdb6800124cccf231282d4b1475249a654
Game: Rama French (1.000.000)

Steps to reproduce:
Save just after entering the elevator at the beginning of the game. Quit ScummVM, start it again and try to load the save from the launcher.

scummvm: ../common/array.h:164: T& Common::Array<T>::operator[](Common::Array<T>::size_type) [with T = Sci::SegmentObj*; Common::Array<T>::size_type = unsigned int]: Assertion `idx < _size' failed.

Thread 1 "scummvm" received signal SIGABRT, Aborted.
0x00007ffff52ca8a0 in raise () from /usr/lib/libc.so.6

(gdb) bt
#0  0x00007ffff52ca8a0 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff52cbf09 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff52c30dc in __assert_fail_base () from /usr/lib/libc.so.6
#3  0x00007ffff52c3153 in __assert_fail () from /usr/lib/libc.so.6
#4  0x0000555555656150 in Common::Array<Sci::SegmentObj*>::operator[] (this=0x555557dd12d8, idx=9575) at ../common/array.h:164
#5  0x00005555556706cd in Sci::SegManager::freeBitmap (this=0x555557dd12d0, addr=...) at ../engines/sci/engine/seg_manager.cpp:960
#6  0x00005555557109f4 in Sci::VMDPlayer::closeComposited (this=0x55555744b288) at ../engines/sci/graphics/video32.cpp:952
#7  0x000055555570f813 in Sci::VMDPlayer::close (this=0x55555744b288) at ../engines/sci/graphics/video32.cpp:603
#8  0x000055555564af8b in Sci::kPlayVMDClose (s=0x555555daeb40, argc=0, argv=0x5555574be538) at ../engines/sci/engine/kvideo.cpp:434
#9  0x000055555567b071 in Sci::callKernelFunc (s=0x555555daeb40, kernelCallNr=146, argc=0) at ../engines/sci/engine/vm.cpp:443
#10 0x000055555567cdea in Sci::run_vm (s=0x555555daeb40) at ../engines/sci/engine/vm.cpp:896
#11 0x0000555555613ad4 in Sci::SciEngine::runGame (this=0x555557ac5750) at ../engines/sci/sci.cpp:692
#12 0x0000555555612711 in Sci::SciEngine::run (this=0x555557ac5750) at ../engines/sci/sci.cpp:459
#13 0x00005555555e3bbd in runGame (plugin=0x5555560b68d0, system=..., edebuglevels=...) at ../base/main.cpp:263
#14 0x00005555555e4b58 in scummvm_main (argc=1, argv=0x7fffffffe228) at ../base/main.cpp:529

Attachments (2)

bt-full.txt (5.2 KB ) - added by bgK 7 years ago.
bt full
rama-fr.001 (12.1 KB ) - added by bgK 7 years ago.

Download all attachments as: .zip

Change History (7)

by bgK, 7 years ago

Attachment: bt-full.txt added

bt full

by bgK, 7 years ago

Attachment: rama-fr.001 added

comment:1 by bgK, 7 years ago

The save loads ok from the game main menu.

comment:2 by csnover, 7 years ago

Interestingly, I’m not able to reproduce a crash using the attached save game in the US English release. I’ll be interested to learn what might be different in the French version that would cause this (or what’s different on my system to not trigger it).

comment:3 by bgK, 7 years ago

The game loads when using valgrind. Those errors seem relevant:

==27873== Conditional jump or move depends on uninitialised value(s)
==27873==    at 0x2C3805: Sci::VMDPlayer::close() (video32.cpp:602)
==27873==    by 0x1FEF8A: Sci::kPlayVMDClose(Sci::EngineState*, int, Sci::reg_t*) (kvideo.cpp:434)
==27873==    by 0x22F070: Sci::callKernelFunc(Sci::EngineState*, int, int) (vm.cpp:443)
==27873==    by 0x230DE9: Sci::run_vm(Sci::EngineState*) (vm.cpp:896)
==27873==    by 0x1C7AD3: Sci::SciEngine::runGame() (sci.cpp:692)
==27873==    by 0x1C6710: Sci::SciEngine::run() (sci.cpp:459)
==27873==    by 0x197BBC: runGame(PluginSubclass<MetaEngine> const*, OSystem&, Common::String const&) (main.cpp:263)
==27873==    by 0x198B57: scummvm_main (main.cpp:529)
==27873==    by 0x195D2B: main (posix-main.cpp:45)
==27873== 
==27873== Conditional jump or move depends on uninitialised value(s)
==27873==    at 0x1CADFB: Sci::reg_t::operator!=(Sci::reg_t const&) const (vm_types.h:86)
==27873==    by 0x2C49D6: Sci::VMDPlayer::closeComposited() (video32.cpp:951)
==27873==    by 0x2C3812: Sci::VMDPlayer::close() (video32.cpp:603)
==27873==    by 0x1FEF8A: Sci::kPlayVMDClose(Sci::EngineState*, int, Sci::reg_t*) (kvideo.cpp:434)
==27873==    by 0x22F070: Sci::callKernelFunc(Sci::EngineState*, int, int) (vm.cpp:443)
==27873==    by 0x230DE9: Sci::run_vm(Sci::EngineState*) (vm.cpp:896)
==27873==    by 0x1C7AD3: Sci::SciEngine::runGame() (sci.cpp:692)
==27873==    by 0x1C6710: Sci::SciEngine::run() (sci.cpp:459)
==27873==    by 0x197BBC: runGame(PluginSubclass<MetaEngine> const*, OSystem&, Common::String const&) (main.cpp:263)
==27873==    by 0x198B57: scummvm_main (main.cpp:529)
==27873==    by 0x195D2B: main (posix-main.cpp:45)
==27873== 
==27873== Conditional jump or move depends on uninitialised value(s)
==27873==    at 0x1CAE1A: Sci::reg_t::operator!=(Sci::reg_t const&) const (vm_types.h:86)
==27873==    by 0x2C49D6: Sci::VMDPlayer::closeComposited() (video32.cpp:951)
==27873==    by 0x2C3812: Sci::VMDPlayer::close() (video32.cpp:603)
==27873==    by 0x1FEF8A: Sci::kPlayVMDClose(Sci::EngineState*, int, Sci::reg_t*) (kvideo.cpp:434)
==27873==    by 0x22F070: Sci::callKernelFunc(Sci::EngineState*, int, int) (vm.cpp:443)
==27873==    by 0x230DE9: Sci::run_vm(Sci::EngineState*) (vm.cpp:896)
==27873==    by 0x1C7AD3: Sci::SciEngine::runGame() (sci.cpp:692)
==27873==    by 0x1C6710: Sci::SciEngine::run() (sci.cpp:459)
==27873==    by 0x197BBC: runGame(PluginSubclass<MetaEngine> const*, OSystem&, Common::String const&) (main.cpp:263)
==27873==    by 0x198B57: scummvm_main (main.cpp:529)
==27873==    by 0x195D2B: main (posix-main.cpp:45)

comment:4 by dafioram, 7 years ago

I am able to reproduce this crash by trying to load any saved game from the english dos version via the launcher when on ubuntu 17.04 with commit g4938d5cc76. I get the same error as bgK. As bgK noted it also works when loading in-game.

If I run this same game on win7-64 scummvm with commit ge4a1a0e (latest windows buildbot) I am able to load dos english saved games from the gmm without issue.

If I load a save from my ubuntu playthrough that crashed it, it loads fine on my windows machine.
If I load a save from my windows playthrough that worked, it crashes on the ubuntu setup with a different error:

Attempt to free non-bitmap 0006:0000 as bitmap!

with backtrace:

 0: script 0 - Rama::play()
     obj@0001:035c pc=0001:2c13 sp=ST:0000 fp=ST:0000 argp:ST:0001
 1: script 0 - Rama::init()
     by 0 obj@0001:035c pc=0001:20e5 sp=ST:000a fp=ST:0005 argp:ST:0004
 2: script 0 - Rama::newRoom(0000:03f7)
     by 1 obj@0001:035c pc=0001:23cb sp=ST:0014 fp=ST:000d argp:ST:000b
 3: script 0 - Rama::startRoom(0000:03f7)
     by 2 obj@0001:035c pc=0001:2982 sp=ST:0017 fp=ST:0017 argp:ST:0015
 4: script 64994 - Game::startRoom(0000:03f7)
     by 3 obj@0001:035c pc=0003:3083 sp=ST:001a fp=ST:001a argp:ST:0018
 5: script 1015 - easyPickins::init()
     by 4 obj@0023:0024 pc=0023:2553 sp=ST:001d fp=ST:001c argp:ST:001b
 6: script 1015 - sierra_Splash::play()
     by 5 obj@0023:2244 pc=0023:2fae sp=ST:001f fp=ST:001f argp:ST:001e
 7: script 1112 - VMDMovie::play()
     by 6 obj@0023:2244 pc=0026:0885 sp=ST:0021 fp=ST:0021 argp:ST:0020
 8: script 1112 - sierra_Splash::VMD_Play()
     by 7 obj@0023:2244 pc=0026:0b0d sp=ST:002a fp=ST:0023 argp:ST:0022
 9: script 1112 - sierra_Splash::close()
     by 8 obj@0023:2244 pc=0026:0ca2 sp=ST:002c fp=ST:002c argp:ST:002b
 a:[9]  kPlayVMDClose()
     by 9 obj@0000:0000 pc:none argp:ST:002d

So perhaps it has something to do with loading on linux.

Version 1, edited 7 years ago by dafioram (previous) (next) (diff)

comment:5 by csnover, 7 years ago

Owner: set to csnover
Resolution: fixed
Status: newclosed

Thanks for your report! A patch for this issue has been added in commit f46fa18006755f7ec8e351f095b7b21a497aa6a4 and will be available in daily builds 1.10.0git-5095 and later.

Note: See TracTickets for help on using tickets.