Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6775 closed defect (fixed)

ZVISION: Core dump when starting Zork Nemesis

Reported by: SF/robertwenner Owned by: bluegr
Priority: normal Component: Engine: ZVision
Version: Keywords:
Cc: Game: Zork Grand Inquisitor

Description

ScummVM (nighly build downloaded from SourceForge) crashes with core dump when I try to start Zork Nemesis.

robert@habanero:~/scummvm$ scummvm
WARNING: SDL mixer output buffer size: 2048 differs from desired: 4096!
User picked target 'znemesis' (gameid 'zvision')...
  Looking for a plugin supporting this gameid... ZVision
  Starting 'ZVision Game'
WARNING: Could not open file u000b51c.tga!
scummvm: ../../src-master/src/common/file.cpp:140: virtual uint32
Common::File::read(void*, uint32): Assertion `_handle' failed.
Aborted (core dumped)

There is no file by that name in lower case, but in upper case:

robert@habanero:~/spiele/zork-nemesis/installed$ find . -name U000B51C.TGA
./DATA3/ZASSETS/GLOBAL3/U000B51C.TGA
./DATA2/ZASSETS/GLOBAL2/U000B51C.TGA
./DATA1/ZASSETS/GLOBAL/U000B51C.TGA

I downloaded the game from gog.com, installed it in wine, then copied the folder from wine:

cp -ra .wine/drive_c/Program\ Files\ \(x86\)/GOG.com/Zork\ Nemesis\ -\ The\ Forbidden\ Lands/ spiele/zork-nemesis/installed

robert@habanero:~/scummvm$ scummvm -t | grep Nemesis
znemesis             Zork Nemesis: The Forbidden Lands (DOS/English)

The game plays in Zengine.

I tried renaming all files to lowercase file names, but that did not make a difference.

robert@habanero:~/scummvm$ scummvm --version
ScummVM 1.8.0git2619-g9f00880 (Jan 17 2015 06:08:09)
Features compiled in: TAINTED Vorbis FLAC MP3 ALSA SEQ TiMidity RGB zLib
FluidSynth Theora FreeType2 JPEG PNG

robert@habanero:~/scummvm$ uname -a
Linux habanero 3.11.0-20-generic #35-Ubuntu SMP Fri May 2 21:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
robert@habanero:~/scummvm$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

Ticket imported from: bugs/6775.

Change History (9)

comment:1 by SF/robertwenner, 9 years ago

I can attach the core dump (34MB) if you think it will be helpful.

robert@habanero:~/scummvm$ gdb ./scummvm core
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./scummvm...done.
[New LWP 21831]
[New LWP 21833]
[New LWP 21834]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `scummvm'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f52a812bcc9 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0  0x00007f52a812bcc9 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f52a812f0d8 in __GI_abort () at abort.c:89
#2  0x00007f52a8124b86 in __assert_fail_base (
    fmt=0x7f52a82763d0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x242def0 "_handle", 
    file=file@entry=0x242de20 "../../src-master/src/common/file.cpp", line=line@entry=140, 
    function=function@entry=0x242e0c0  "virtual uint32 Common::File::read(void*, uint32)") at assert.c:92
#3  0x00007f52a8124c32 in __GI___assert_fail (assertion=0x242def0 "_handle", 
file=0x242de20 "../../src-master/src/common/file.cpp", line=140, 
function=0x242e0c0  "virtual uint32 Common::File::read(void*, uint32)") at assert.c:101
#4  0x0000000001cd9d1a in Common::File::read (this=0x3d208b0, ptr=0x7fff499e5898, len=4)
at ../../src-master/src/common/file.cpp:140
#5  0x00000000004258bc in Common::ReadStream::readUint32BE (this=0x3d208b0)     at ../../src-master/src/common/stream.h:307
#6  0x0000000001ba44d1 in Video::AVIDecoder::loadStream (this=0x4740e10, stream=0x3d208b0)
at ../../src-master/src/video/avi_decoder.cpp:290
#7  0x0000000001ae779b in ZVision::ZVision::loadAnimation (this=0x3d25cc0, fileName=...)
at ../../src-master/src/engines/zvision/video/video.cpp:62
#8  0x0000000001aee220 in ZVision::ActionStreamVideo::execute (this=0x3cbbad0)
at ../../src-master/src/engines/zvision/scripting/actions.cpp:964
#9  0x0000000001ac5a8a in ZVision::ScriptManager::checkPuzzleCriteria (this=0x4071230, 
puzzle=0x3d1ad30, counter=1)
at ../../src-master/src/engines/zvision/scripting/script_manager.cpp:254
#10 0x0000000001ac5169 in ZVision::ScriptManager::execScope (this=0x4071230, scope=...)
at ../../src-master/src/engines/zvision/scripting/script_manager.cpp:105
#11 0x0000000001ac4fc6 in ZVision::ScriptManager::update (this=0x4071230, deltaTimeMillis=897)
at ../../src-master/src/engines/zvision/scripting/script_manager.cpp:82
#12 0x0000000001acdf2c in ZVision::ZVision::run (this=0x3d25cc0)
at ../../src-master/src/engines/zvision/zvision.cpp:321
#13 0x000000000040adf3 in runGame (plugin=0x3c79070, system=..., edebuglevels=...)
at ../../src-master/src/base/main.cpp:244
#14 0x000000000040bdf4 in scummvm_main (argc=1, argv=0x7fff49a2c798)
at ../../src-master/src/base/main.cpp:489
#15 0x00000000004099d2 in main (argc=1, argv=0x7fff49a2c798)
at ../../src-master/src/backends/platform/sdl/posix/posix-main.cpp:45
(gdb)

comment:2 by SF/robertwenner, 9 years ago

Sorry for messing up the game. However, it also happens for Zork Grand Inquisitor:

robert@habanero:~/scummvm$ scummvm 
WARNING: SDL mixer output buffer size: 2048 differs from desired: 4096!
User picked target 'zgi-win' (gameid 'zvision')...
  Looking for a plugin supporting this gameid... ZVision
  Starting 'ZVision Game'
WARNING: FSDirectory::cacheDirectory: name clash when building cache, ignoring file 'Inquis.ini'!
WARNING: FSDirectory::cacheDirectory: name clash when building cache, ignoring file 'Inquis.ini'!
WARNING: Could not open file gjd2f011.tga!
scummvm: ../../src-master/src/common/file.cpp:140: virtual uint32 Common::File::read(void*, uint32): Assertion `_handle' failed.
Aborted (core dumped)

robert@habanero:~/scummvm$ scummvm -t | grep Inquis
zgi-win              Zork: Grand Inquisitor (CD/Windows/English)

comment:3 by eriktorbjorn, 9 years ago

I don't have the GOG versions myself, but just to rule out one really simple explanation (and since I seem to recall making that mistake myself the other day), have you checked that you have read permission on the game data files?

comment:4 by digitall, 9 years ago

Summary: Core dump when starting Zork NemesisZVISION: Core dump when starting Zork Nemesis

comment:5 by SF/robertwenner, 9 years ago

Permissions are ok, all files are 644, all directories are 755, all files owned by me.

comment:6 by wjp, 9 years ago

I can reproduce this. Bisected, and it's a regression in d70503cc9842059302c73c7861ada557e25a52b5.

comment:7 by bluegr, 9 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

comment:8 by bluegr, 9 years ago

My bad, I ripped out the part of the code that handles files in case-sensitive file systems. Restored in commit 7c23eae102.

I've double checked on my Ubuntu system, and ZVision is working as expected. Thanks for bisecting this, wjp.

Closing as fixed.

comment:9 by SF/robertwenner, 9 years ago

Confirmed, it's working now. Thanks!

Note: See TracTickets for help on using tickets.