Opened 5 years ago

Closed 5 years ago

#6590 closed defect (fixed)

HOPKINS-PL: Crash using computer in office

Reported by: SF/m3n747 Owned by: digitall
Priority: normal Component: Engine: Hopkins
Keywords: Cc:
Game: Hopkins FBI

Description

ScummVM: 1.7.0git6539-g230e771 (May 15 2014 22:42:16)
Game: Hopkins FBI, Version 4, Windows 95 Direct X (hopkins-win-pl)
Language: Polish
Repro: 10/10


After using the computer in Hopkins's office in the FBI HQ the game will crash. A few times the crash didn't occur but the game instead froze on the blue computer screen, sometimes after displaying a few garbled letters. No error messages were given in the ScummVM Status Window.


  1. Start a new game, play the game normally until you get to the FBI HQ.
    (I followed this walkthrough: http://www.gamefaqs.com/pc/582443-hopkins-fbi/faqs/17706)
  2. Go to Hopkins's office, use the computer.
  3. The game crashes.

Attached files:
- Savestate
- Video of crash
- Screenshot of garbled letters on screen

Ticket imported from: bugs/6590.

Attachments (5)

Crash.mkv (680.2 KB ) - added by SF/m3n747 5 years ago.
Savefile.7z (10.5 KB ) - added by SF/m3n747 5 years ago.
Computer screen.png (10.6 KB ) - added by SF/m3n747 5 years ago.
Report 1.png (20.3 KB ) - added by SF/m3n747 5 years ago.
Computer screen 2.png (10.2 KB ) - added by SF/m3n747 5 years ago.

Download all attachments as: .zip

Change History (18)

by SF/m3n747, 5 years ago

Attachment: Savefile.7z added

comment:1 by SF/m3n747, 5 years ago

Addendum: The same happens when using the right-most computer in Samantha's office.

comment:2 by digitall, 5 years ago

Tested with the attached savegame on Hopkins English version.
No crash and no issues shown in Valgrind.

Tried replicating with the Polish Demo, but this scene is not present, so I can't.

This is probably due to an issue with the Polish character set when drawing the computer screen. Will see if there is any debug I can recommend.

comment:3 by digitall, 5 years ago

Ah. The code for this is in:
https://github.com/scummvm/scummvm/blob/master/engines/hopkins/computer.cpp

It has some hardcoded strings for English, Spanish and French versions if the LINK/COMPUTAN.TXT file is missing, otherwise they are loaded from there.

It also uses SYSTEM/STFONT.SPR.

Both of these files are present in the Polish demo, so I can swap these out in my English version to test this issue.

M3n747: Can you confirm the md5sums of these files match the ones in your release version?
5f525eb9eb42e09f147e6393b7918b75 demo-pl/SYSTEM/STFONT.SPR
fa3aa33f807c65bf9f6b2bfb67f3bb5d demo-pl/LINK/COMPUTAN.TXT

comment:4 by digitall, 5 years ago

AHA. Have replicated a segmentation fault crash using the COMPUTAN.TXT from the Polish Demo. It appears the parsing of this file is not very robust and may not deal with some of the characters in the polish variant. Will try to fix:
https://github.com/scummvm/scummvm/blob/master/engines/hopkins/computer.cpp#L375

comment:5 by SF/m3n747, 5 years ago

Yes, the checksums for both files match.

comment:6 by digitall, 5 years ago

Have added some sanity checking to the code and the crashes and invalid memory accesses are now fixed for me.

M3n747: Please test with the next nightly to see if this works for you.

Will look at adding parsing for the variant file format.

comment:7 by SF/m3n747, 5 years ago

Sure, I'll let you know about the same time tomorrow (because time zones).

comment:8 by digitall, 5 years ago

Owner: set to digitall
Summary: [Hopkins][Win95][PL] Crash after using computer in officeHOPKINS-PL: Crash using computer in office

by SF/m3n747, 5 years ago

Attachment: Report 1.png added

comment:9 by SF/m3n747, 5 years ago

I see the new nightly build came out sooner than I expected. Great.

ScummVM 1.7.0git6559-g16152cf (May 17 2014 22:36:50)

Now, after using the computer in Hopkins's office, the screen shows up with the cursor in the middle and nothing else (see: Computer screen 2.png). You can input the password HOPKINS to access the computer, after which you'll get to the main menu, but no text will be displayed.

Pressing 1 on the keyboard starts a game of Breakout, working correctly.

Pressing 2 shows a report, properly displayed with the exception of one letter (is: à; should be: ź; see: Report 1.png)

Pressing 3, 4 and 5 shows reports, all correct.

Pressing 6-9 causes the screen to flicker black.

Pressing 0 exits the computer.

comment:10 by digitall, 5 years ago

Thanks... That is kind of as expected so far. i.e. the Computer Screen 2 image as I haven't fixed the file parsing.

Will look at why the file under option 2 has the wrong character...

I think 6 to 9 did that in the original... It does something similar with my English version. Will get one of the developers to check with the original.

comment:11 by SF/m3n747, 5 years ago

It would seem that the incorrect letter is just a bug in the Polish release, nothing to do with ScummVM:
http://youtu.be/P5cwp1Srh8c (9:09)

So I guess you can scratch that one. As for the screen flickering after pressing 6-9, you're probably right that it's supposed to do that - I haven't played this game in over 10 years, so I thought I'd better mention it just to be safe, but I imagine that pressing one of those keys simply redraws the screen.

comment:12 by digitall, 5 years ago

Committed final fix as bee54dc048512904941487d6f1f7664b690d666c.

M3n747: Please test with the next nightly build and confirm here if the computer now works fine for you.

comment:13 by digitall, 5 years ago

Resolution: fixed
Status: newpending

comment:14 by SF/m3n747, 5 years ago

ScummVM: 1.7.0git6561-gbee54dc (May 18 2014 09:41:45)

Computers now work correctly.

comment:15 by digitall, 5 years ago

Excellent. Closing as fixed.

comment:16 by digitall, 5 years ago

Status: pendingclosed
Note: See TracTickets for help on using tickets.