Opened 3 years ago

Closed 3 years ago

#12567 closed defect (fixed)

PRIVATE: Opening Safe causes ScummVM crash

Reported by: TrivialBalderdash Owned by: neuromancer
Priority: normal Component: Engine: Private
Version: Keywords:
Cc: Game: Private Eye

Description

Trying to open the safe in Steelgrave's Mansion causes the alarm to trigger. When leaving the house, ScummVM crashes. The debug details are listed below. sgsfx005.wav is the alarm from pulling the handle, followed by backing away from the safe twice, turning towards the door, then clicking on the door.

Opening hashed: sg/search_s/sgpntcu7.bmp
Opening hashed: sg/search_s/sgsafpul.bmp
Opening hashed: sg/audio/sgsfx005.wav
Opening hashed: sg/search_s/sgpntcu7.bmp
Opening hashed: sg/search_s/sgsafpul.bmp
Opening hashed: sg/audio/sgsfx014.wav
Opening hashed: sg/search_s/sgpntcu2.bmp
Opening hashed: sg/search_s/sgpntmk.bmp
Opening hashed: sg/search_s/sgview6.bmp
Opening hashed: sg/search_s/sgmask6.bmp
Opening hashed: sg/search_s/sgview1.bmp
Opening hashed: sg/search_s/sgmask1.bmp
Assertion failed: (args.size() <= 4), function fPoliceClip, file /data/src/master/engines/private/funcs.cpp, line 608.
Abort trap: 6

It doesn't appear that the safe has been implemented, as I can't enter the combination. (It's 426, but I only know this from the game.dat file.) I don't know if this is related to the crash.

This isn't required to complete the game, so I didn't mark it higher priority.

Attachments (2)

SafeCracking.png (1.1 MB ) - added by TrivialBalderdash 3 years ago.
private-eye-win-us.015 (6.7 KB ) - added by TrivialBalderdash 3 years ago.

Download all attachments as: .zip

Change History (10)

by TrivialBalderdash, 3 years ago

Attachment: SafeCracking.png added

comment:1 by neuromancer, 3 years ago

Exactly. Opening the safe is not implemented yet but it shouldn't crash. This is probably caused by the the triggering of the arrival of the police. I will take a look to this.

comment:2 by neuromancer, 3 years ago

@TrivialBalderdash can you please provide a save game for this so I can start taking a look to implement this missing feature? (please use the latest nightly version)

comment:3 by TrivialBalderdash, 3 years ago

The save game is attached. I used the July 3 nightly build and started from the beginning of the game. (It's very convenient I can skip all the dialog and cutscenes with ESC - it made things very fast to get to the safe!) I had to use the workaround described in https://bugs.scummvm.org/ticket/12718.

With this save game, Marlow should be able to go immediately to Steelgrave's mansion without being kicked out by the butler or the gangsters.

by TrivialBalderdash, 3 years ago

Attachment: private-eye-win-us.015 added

comment:4 by neuromancer, 3 years ago

Just some code to allow to open the safe here: https://github.com/scummvm/scummvm/commit/10310cccdd7f8052515d3d3f181a94a21992497d, please pull the new code and re-test (you can use the save game you provided). It is likely that the same issue with the police is available, but at least is something to start.

Btw, the background color of the safe digits won't be the same, but that's expected. I don't know exactly how the original code manages to redraw one digit after another one without showing all the pixels smashed together.

comment:5 by neuromancer, 3 years ago

I added some missing code here: https://github.com/scummvm/scummvm/commit/aa04208e3b87342130357c57716d13aa450aa8e0 and it shouldn't crash anymore (however, it could be other issues related with the police handling).

comment:6 by TrivialBalderdash, 3 years ago

Great update. I tested both opening the safe (success!) and tripping the alarm before leaving (no crash).

There was something I noticed that got me testing a little further. I tried multiple times to open the safe with the correct combination, paying attention to when the police would arrive. I also went to other scenes where the police would arrive, like a second visit to Idaho Street.

As you mentioned in another ticket, it's based on the number of clicks. If I'm following the code correctly, both the siren and police arrival are not tied together and are not going to be the same every time (random number & police index will change).

What I wanted to ask about - what is counted as a click?
On original hardware, it seems that only hotspots are counted (navigation arrows and searching). On my 486 PC, I can click dozens of times on a non-hotspot and nothing will happen. In ScummVM, it seems that all clicks are counted. I tested this in several locations - Idaho Street, Steelgrave's Mansion, Van Nuys Hotel.

This makes absolutely no difference during the game, except for opening the safe. It takes 16 clicks to navigate to and open the safe (3 to move to and open the painting, 12 to turn the dials from 0,0,0, and 1 more to pull the handle). This will almost always trigger the police arrival in ScummVM.

Of course, I can't be 100% sure about this, but I don't think original hardware counts turning the safe digits in the click count. I tried 30-40 clicks turning numbers and it never triggered the police.

I'm not sure if this is an issue or not, but I thought I'd ask you.

comment:7 by neuromancer, 3 years ago

Good catch. Every click is counted as a click in ScummVM and it makes more sense to count only hotspots in the game as in the original implementation. Please reopen issue #12348 with a comment on how it worked on the original hardware and I will fix it.

Otherwise, it seems this issue can be closed.

comment:8 by TrivialBalderdash, 3 years ago

Resolution: fixed
Status: newclosed

Thanks for the feedback. I added a comment and reopened #12348.

Note: See TracTickets for help on using tickets.