Opened 2 months ago

Closed 8 weeks ago

#15035 closed defect (fixed)

AGS: No-Action Jackson - Segmentation fault upon player being given control

Reported by: dfsgand Owned by: tag2015
Priority: normal Component: Engine: AGS
Version: Keywords: crash AGS No-Action Jackson
Cc: dfsgand Game:


ScummVM version: 2.9.0git2666-gc783efb7742
Features compiled in: Vorbis FLAC MP3 ALSA SEQ sndio TiMidity RGB zLib MikMod VPX A/52 FreeType2 FriBiDi JPEG PNG ENet SDL2 TinyGL OpenGL (with shaders)
Platform: Debian 11.9 bullseye, x86-64

Game: No-Action Jackson (English)
Download URL:

ScummVM recognizes the game, but starting it leads to a segmentation fault as soon as the intro sequence finishes and the player is given control. It's possible to move the cursor around the verbs on the bottom of the screen, but moving to the main scene immediately crashes ScummVM.

gdb and valgrind traces suggest that the crash happens due to an out of bounds memory access in Common::Hashmap<AGS3:...>, ./common/hashmap.h:501. From what I can tell, the _mask value seems wrong.

Attachments (3)

backtrace.txt (4.8 KB ) - added by dfsgand 2 months ago.
gdb backtrace
valgrind.txt (5.9 KB ) - added by dfsgand 2 months ago.
Valgrind report on crash
console_log.txt (1.6 KB ) - added by dfsgand 2 months ago.
ScummVM console log while running valgrind

Download all attachments as: .zip

Change History (6)

by dfsgand, 2 months ago

Attachment: backtrace.txt added

gdb backtrace

by dfsgand, 2 months ago

Attachment: valgrind.txt added

Valgrind report on crash

by dfsgand, 2 months ago

Attachment: console_log.txt added

ScummVM console log while running valgrind

comment:1 by dfsgand, 2 months ago

I did some more digging and it seems that the problem is due to GetHotspotProperty being called with hss=-1. In turn that appears to be due to AGS3::Sc_GetHotspotProperty being called with params->IValue=-1.

Patching GetHotspotProperty (engines/ags/engine/ac/global_hotspot.cpp) to return -1 if hss < 0 fixes the problem, but I don't know if that's just covering up a bug elsewhere.

comment:2 by tag2015, 2 months ago

Thanks for the report, the issue was fixed upstream

I'll soon commit the fix to scummvm too

comment:3 by tag2015, 8 weeks ago

Owner: set to tag2015
Resolution: fixed
Status: newclosed

fixed in commit 6c8e783

Note: See TracTickets for help on using tickets.