Menu

#6590 HOPKINS-PL: Crash using computer in office

Hopkins FBI
closed-fixed
digitall
None
5
2014-05-18
2014-05-16
M3n747
No

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

3 Attachments

Discussion

  • M3n747

    M3n747 - 2014-05-16

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

     
  • digitall

    digitall - 2014-05-17

    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.

     
  • digitall

    digitall - 2014-05-17

    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

     
  • digitall

    digitall - 2014-05-17

    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

     
  • M3n747

    M3n747 - 2014-05-17

    Yes, the checksums for both files match.

     
  • digitall

    digitall - 2014-05-17

    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.

     
  • M3n747

    M3n747 - 2014-05-17

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

     
  • digitall

    digitall - 2014-05-17
    • summary: [Hopkins][Win95][PL] Crash after using computer in office --> HOPKINS-PL: Crash using computer in office
    • assigned_to: digitall
     
  • M3n747

    M3n747 - 2014-05-17

    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.

     

    Last edit: M3n747 2014-05-17
  • digitall

    digitall - 2014-05-17

    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.

     
  • M3n747

    M3n747 - 2014-05-17

    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.

     
  • digitall

    digitall - 2014-05-17

    Committed final fix as bee54dc048512904941487d6f1f7664b690d666c.

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

     
  • digitall

    digitall - 2014-05-17
    • status: open --> pending-fixed
     
  • M3n747

    M3n747 - 2014-05-18

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

    Computers now work correctly.

     
  • digitall

    digitall - 2014-05-18

    Excellent. Closing as fixed.

     
  • digitall

    digitall - 2014-05-18
    • status: pending-fixed --> closed-fixed