Opened 2 years ago

Closed 2 years ago

#9645 closed defect (fixed)

Myst - clicking pages crash ScummVM on MacOS

Reported by: elaseela Owned by: bgK
Priority: normal Component: Engine: Mohawk
Keywords: Cc:
Game: Myst

Description

ScummVM - 1.9.0.2 & Daily Build 2016-11-11
English language
Original CD for MPC/Win 3.1 (not Masterpiece Edition)
MacOS 10.12.1

When entering the library, clicking on either the red or blue page with the intent of putting it in its corresponding book causes ScummVM to crash. Both the red and blue pages cause this crash, and ScummVM must be relaunched from the Finder. Clicking anything else produces no ill effect; only the pages cause the program to crash.

Change History (8)

comment:1 Changed 2 years ago by bgK

Picking up the pages works fine for me.

Can you please reproduce the crash while running the daily build of ScummVM under a debugger (GDB/LLDB) to get a backtrace?

comment:2 Changed 2 years ago by bgK

Component: --Unset--Engine: Mohawk

comment:3 Changed 2 years ago by vonLeheCreative

Hi bgK. I am also running into this issue. I've seen it on both a Mac and a Windows machine, using various versions of ScummVM. (I kept checking at various points during the last couple years, hoping that the issue would be fixed.) It seems specific to the MPC/Win3.1 version of Myst, and happens consistently whenever I attempt to put one of the pages into a book in the library (just as elaseela reported).

I'd be happy to share my Myst files with you (privately) so you can get a local repro. Let me know.

comment:4 Changed 2 years ago by bgK

Hi,

Your Myst data files are copyrighted material, sharing them with me would be illegal. Please don't suggest it anymore.

However, I'm very interested in your help finding the cause of this bug. Please use this build of ScummVM with debug symbols: https://ufile.io/a6ab9. Run scummvm-gdb.bat, reproduce the crash. In the gdb console, type "bt" to get a backtrace, and post the output here.

md5 sums of your files would be helpful has well, to check if you and I have the same game version.

comment:5 Changed 2 years ago by vonLeheCreative

Hi bgK. Here's the backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x000000000043f174 in Mohawk::MystScriptParser::o_takePage (this=0x9b05700, op=3, var=103, argc=0, argv=0x0)
    at engines/mohawk/myst_scripts.cpp:358
358     engines/mohawk/myst_scripts.cpp: No such file or directory.
(gdb) bt
#0  0x000000000043f174 in Mohawk::MystScriptParser::o_takePage (this=0x9b05700, op=3, var=103, argc=0, argv=0x0)
    at engines/mohawk/myst_scripts.cpp:358
#1  0x000000000043e5eb in Mohawk::MystScriptParser::runOpcode (this=0x9b05700, op=3, var=103, argc=0, argv=0x0)
    at engines/mohawk/myst_scripts.cpp:184
#2  0x000000000043e4ca in Mohawk::MystScriptParser::runScript (this=0x9b05700, script=..., invokingResource=0x9b05de0)
    at engines/mohawk/myst_scripts.cpp:173
#3  0x0000000000435bd6 in Mohawk::MystAreaAction::handleMouseUp (this=0x9b05de0) at engines/mohawk/myst_areas.cpp:148
#4  0x0000000000436ac2 in Mohawk::MystAreaActionSwitch::doSwitch (this=0x9b0a5b0,
    handler=&virtual Mohawk::MystArea::handleMouseUp()) at engines/mohawk/myst_areas.cpp:305
#5  0x0000000000436d1e in Mohawk::MystAreaActionSwitch::handleMouseUp (this=0x9b0a5b0)
    at engines/mohawk/myst_areas.cpp:331
#6  0x0000000000431747 in Mohawk::MohawkEngine_Myst::run (this=0x3ce4360) at engines/mohawk/myst.cpp:286
#7  0x0000000000405b46 in runGame (plugin=0x9aa7790, system=..., edebuglevels=...) at base/main.cpp:263
#8  0x0000000000406ce5 in scummvm_main (argc=1, argv=0x3dfa1c0) at base/main.cpp:529
#9  0x0000000000403c3d in SDL_main (argc=1, argv=0x3dfa1c0) at backends/platform/sdl/win32/win32-main.cpp:72
#10 0x0000000000403b88 in WinMain () at backends/platform/sdl/win32/win32-main.cpp:55
#11 0x00000000007371b2 in main (flags=<optimized out>, cmdline=<optimized out>, inst=<optimized out>)
    at C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18
#12 0x00000000004013ed in __tmainCRTStartup ()
    at C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:334
#13 0x00000000004014fb in WinMainCRTStartup ()
    at C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:184

Also, in the ScummVM Status Window, I get the following:

User picked target 'myst-win' (gameid 'mohawk')...
  Looking for a plugin supporting this gameid... Mohawk
  Starting 'Mohawk Game'
The game in 'C:\Users\<redacted>\MYST\' seems to be unknown.
Please, report the following data to the ScummVM team along with name
of the game you tried to add and its version, language, etc.:

  {"MYST.DAT", 0, "0e4b6fcbd2419d4371365314fb7443f8", 66143775},

One additional data point: by default, there doesn't seem to be a way to start the game. Starting it just plays the "Making Of MYST" video. In order to play the game, I have to move the MAKING.DAT file out of the MYST directory.

Let me know if you need any additional info.

comment:6 Changed 2 years ago by bgK

Thanks for your help. This build of ScummVM should fix the crash: https://ufile.io/3c2f2. Can you please check it works properly with your game version?
Additionally, it is setup to produce (a lot of) debug output. Can you paste here the debug output for when you pick up / drop a page, so that I can check the fix is correct?
Also does the readme.txt that comes with Myst says which version of the game you have, for documentation purposes? Mine is v1.0.1.

The conflict with the making of movie is a known issue. Unfortunately it is a quite hard to fix one, since it's related to how ScummVM detects and launches games.

comment:7 Changed 2 years ago by vonLeheCreative

The fix seems to work! Here's the debug output when picking up/dropping pages:

Script Size: 1
        Opcode 0: 3
Opcode 3: takePage Var 103 CursorId 802
Script Size: 1
        Opcode 0: 115
Opcode 115: Red and Blue Book/Page Interaction
Var: 101
Card Id (Lose): 4741
Card Id (Book Cover): 4370
SoundId (Add Page): 4368
RLST Resource Count: 2
Resource #0:
        Type: 0
        Sub_Record: 0
        flags: 0x0002
        left: 165
        top: 11
        right: 384
        bottom: 323
        dest: 4371
Resource #1:
        Type: 0
        Sub_Record: 0
        flags: 0x0002
        left: 0
        top: 0
        right: 555
        bottom: 344
        dest: 4368

The game version in the README.TXT file is 1.0.

When might the fix be available in a stable release build?

comment:8 Changed 2 years ago by bgK

Owner: set to bgK
Resolution: fixed
Status: newclosed

Thanks again.

The fix will be in all future daily builds as well as ScummVM 1.10. The 1.10 release cycle has not started so I can't give you an ETA.

Note: See TracTickets for help on using tickets.