Zork Grand Iquisitor (DVD version) x64 Bug

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
EstelRandir
Posts: 55
Joined: Thu Mar 16, 2017 6:02 pm

Zork Grand Iquisitor (DVD version) x64 Bug

Post by EstelRandir »

Using scummvm x64 daily build (or version 2,2) + ZGI dvd version. If you choose edit game>engine>high quality MPEG the game will crash. If you use scummvm x32 the game will not crash & you will get the high quality movies.

As far back as 2019 there was a discussion about the scummvm x64 version and the DVD version of ZGI. That bug still exists today I can confirm. This drove me crazy until I ran across the 2019 post. I have resorted back to the x32 version of scummvm for everything. It would be nice if this was fixed because most people will not figure this out without that post from 2019.
User avatar
rootfather
ScummVM Lead
Posts: 173
Joined: Tue Mar 31, 2015 11:59 am
Location: Germany
Contact:

Re: Zork Grand Iquisitor (DVD version) x64 Bug

Post by rootfather »

I can replicate this on the current master, running Windows 10, 64bit. Since it segfaults when using the libmpeg2 functions, I suspect that this library is broken at the moment. I'm currently trying to build a new DLL, maybe without optimization and get it into a working state. I'm not too surprised that it's broken since the last release of libmpeg2 is from 2008...
User avatar
rootfather
ScummVM Lead
Posts: 173
Joined: Tue Mar 31, 2015 11:59 am
Location: Germany
Contact:

Re: Zork Grand Iquisitor (DVD version) x64 Bug

Post by rootfather »

Well, disabling the optimizations didn't help, it still segfaults:

Code: Select all

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff66119b240 in mpeg2_idct_copy_sse2 ()
(gdb) backtrace
#0  0x00007ff66119b240 in mpeg2_idct_copy_sse2 ()
#1  0x00007ff661195952 in mpeg2_slice ()
#2  0x00007ff66118aaa4 in mpeg2_parse ()
#3  0x00007ff661081dcc in Image::MPEGDecoder::decodePacket (
    this=0x24c70924bd0, packet=..., framePeriod=@0xd6fabfea1c: 0,
    dst=0x24c70924b80) at image/codecs/mpeg.cpp:74
#4  0x00007ff66105a4de in Video::MPEGPSDecoder::MPEGVideoTrack::sendPacket (
    this=0x24c70924b00, packet=0x24c70822050, pts=<optimized out>,
    dts=<optimized out>) at video/mpegps_decoder.cpp:639
#5  0x00007ff66105c829 in Video::MPEGPSDecoder::readNextPacket (
    this=0x24c70820580) at video/mpegps_decoder.cpp:188
#6  0x00007ff66105ee02 in Video::VideoDecoder::decodeNextFrame (
    this=0x24c70820580) at video/video_decoder.cpp:191
#7  0x00007ff660f2a3b9 in ZVision::ZVision::playVideo (this=0x24c6425a140,
    vid=..., destRect=..., skippable=true, sub=0x0)
    at engines/zvision/video/video.cpp:123
#8  0x00007ff660f2be7e in ZVision::ActionStreamVideo::execute (
    this=0x24c7081a6f0) at engines/zvision/scripting/actions.cpp:1019
#9  0x00007ff660f0edef in ZVision::ScriptManager::checkPuzzleCriteria (
    this=this@entry=0x24c64166460, puzzle=puzzle@entry=0x24c7081a460,
    counter=counter@entry=1)
    at engines/zvision/scripting/script_manager.cpp:284
#10 0x00007ff660f0f3b2 in ZVision::ScriptManager::checkPuzzleCriteria (
    counter=<optimized out>, puzzle=0x24c7081a460, this=0x24c64166460)
    at ./common/hashmap.h:506
#11 ZVision::ScriptManager::execScope (this=this@entry=0x24c64166460,
    scope=...) at engines/zvision/scripting/script_manager.cpp:120
#12 0x00007ff660f0fe9e in ZVision::ScriptManager::update (this=0x24c64166460,
    deltaTimeMillis=deltaTimeMillis@entry=33)
    at engines/zvision/scripting/script_manager.cpp:92
#13 0x00007ff660f1221b in ZVision::ZVision::run (this=0x24c6425a140)
    at engines/zvision/zvision.cpp:339
#14 0x00007ff660ef32f8 in runGame (plugin=plugin@entry=0x24c61b2f340,
    enginePlugin=enginePlugin@entry=0x24c61b2a9c0, system=...,
    edebuglevels=...) at base/main.cpp:300
#15 0x00007ff660ef4dec in scummvm_main (argc=argc@entry=1,
    argv=argv@entry=0x24c6179bf60) at base/main.cpp:597
#16 0x00007ff660ef0a9d in SDL_main (argc=1, argv=0x24c6179bf60)
    at backends/platform/sdl/win32/win32-main.cpp:71
#17 0x00007ff660ef0b15 in WinMain ()
    at backends/platform/sdl/win32/win32-main.cpp:54
#18 0x00007ff6612ea572 in main (flags=<optimized out>,
    cmdline=<optimized out>, inst=<optimized out>)
    at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18
#19 0x00007ff660ea13c1 in __tmainCRTStartup ()
    at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:321
#20 0x00007ff660ea14d6 in WinMainCRTStartup ()
    at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:176
EstelRandir
Posts: 55
Joined: Thu Mar 16, 2017 6:02 pm

Re: Zork Grand Iquisitor (DVD version) x64 Bug

Post by EstelRandir »

At least someone is looking into it =).

Are the x32 & the x64 versions being developed independently of each other? If so, that is a bit concerning, because with the explosion in the amount of data we consume & the push for VR, etc it is feasable that a x128 version Windows may not be far on the horizon. x32 may not be a possibility anymore.
User avatar
rootfather
ScummVM Lead
Posts: 173
Joined: Tue Mar 31, 2015 11:59 am
Location: Germany
Contact:

Re: Zork Grand Iquisitor (DVD version) x64 Bug

Post by rootfather »

EstelRandir wrote: Sun May 23, 2021 8:55 pm At least someone is looking into it =).
Aaaand fixed.

lephilousophe was able to track down the issue. The libmpeg2 build we used for building current ScummVM releases and nightlies was broken which lead to the crash you experienced. Since its already fixed, future versions of ScummVM won't have this issue. The next nightly versions/snapshots should work as expected.

Thanks for reporting this issue again!
EstelRandir wrote: Sun May 23, 2021 8:55 pm Are the x32 & the x64 versions being developed independently of each other? If so, that is a bit concerning, because with the explosion in the amount of data we consume & the push for VR, etc it is feasable that a x128 version Windows may not be far on the horizon. x32 may not be a possibility anymore.
The 32 bit and the 64 bit version are build with the same library versions, just different architectures. Thanks to the great portability of ScummVM, we don't often run into issues here, but as you might have noticed, some very old libraries can be problematic indeed. At least for Win32, I consider the 64 bit as "primary target" since market share of the 32 bit Windows releases constantly decreases. Honestly, I don't see any 128 bit consumer OS in the foreseeable future - 64 bit is just massive.
EstelRandir
Posts: 55
Joined: Thu Mar 16, 2017 6:02 pm

Re: Zork Grand Iquisitor (DVD version) x64 Bug

Post by EstelRandir »

Thank you for fixing it =).
Post Reply