Opened 3 years ago
Closed 3 years ago
#12944 closed defect (fixed)
Starship Titanic: asking gossipy DeskBot to continue yields "I don't understand" responses or crashes the game
Reported by: | CahootsMalone | Owned by: | dreammaster |
---|---|---|---|
Priority: | normal | Component: | Engine: Titanic |
Version: | Keywords: | Starship Titanic | |
Cc: | Game: | Starship Titanic |
Description (last modified by )
General Information
- ScummVM version: 2.2.0 (Sep 14 2020 10:39:25)
- Bug details: please see below
- Language of game: English
- Version of game: GOG release; game files extracted from GOG installer using innoextract
- Operating system: Windows 10 Home, 64-bit, version 20H2, build 19042.1165
- Saved game: please see attached (steps to reproduce below)
Bug Details
After setting the Deskbot's cellpoint settings to their optimal values and asking her about one of the other characters (which results in a response that ends with a line like "I could say more" or "I could go on"), she doesn't elaborate when asked to continue. Also, one way of asking crashes the game.
Expected Behaviour
When asked to continue, the DeskBot should elaborate. For example, when asked about the BellBot, the following exchange should occur:
> what do you think about the BellBot? Such a nice, young, lampstandy kind of bot . A little unreliable, sometimes, but ... I could say more. > say more He just needs a bit of artful sorting out. I could say more... > say more His eyes are everywhere. You want to know what's going on, you ask the BellBot. I could go on... > say more [DeskBot replies with one of the general gossip-related lines]
Saved Game and Steps to Reproduce
To reproduce the crash, load the attached save game (titanic-win.002
; alternatively, visit the sculpture gallery, set the DeskBot's cellpoint settings to their optimal values, and immediately travel to the embarkation lobby) and perform the following steps:
- Click on the DeskBot.
- Enter "What do you think of the BellBot?" (or any other character).
- The DeskBot will reply with appropriate dialogue that ends with "I could say more" or "I could go on".
- Enter "please do".
- The game crashes.
To reproduce the DeskBot's failure to elaborate when asked, load the attached save game and perform these steps instead:
- Click on the DeskBot.
- Enter "What do you think of the BellBot?" (or any other character).
- The DeskBot will reply with appropriate dialogue that ends with "I could say more" or "I could go on".
- Enter "say more" or "go on".
- "say more" always elicits one of the "I don't understand"-type responses.
- "go on" elicits a mix of "I don't understand"-type responses and general gossip-related responses (e.g., "No, I mustn't." or "I'm such a dreadful gossip...").
Attachments (1)
Change History (7)
by , 3 years ago
Attachment: | titanic-win.002 added |
---|
comment:1 by , 3 years ago
Description: | modified (diff) |
---|
comment:2 by , 3 years ago
comment:3 by , 3 years ago
It adds a concept, then removes it again. At first I thought the unoptimized version removed a different concept, but when I tried again that wasn't the case.
I don't understand this engine, but I think the concept it's adding is based on the word "bellbot".
The removeConcept() function is called from filterConcepts().
I think this is as far as I'm getting on my own.
comment:4 by , 3 years ago
Huh? The only difference I've seen so far between optimized and unoptimized is that for some insane reason, the unoptimized one didn't crash when considerRequests() calls _conceptP->findWordByClass(WC_ACTION) while _conceptP is NULL.
What dark sorcery is this?! I mean, I guess the behavior is undefined but come on!
comment:5 by , 3 years ago
I've just written a similar observation in the other ticket here:
https://bugs.scummvm.org/ticket/12950
Seems that this is the same issue.
And indeed I compiled in msys2 with optimizations, so I got the segmentation fault, while I debugged on Visual Studio with (no optimizations) and findWordByClass() would return nullptr when called for a null object (_conceptP).
comment:6 by , 3 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This should now be fixed.
I can reproduce this, but only if I compile with optimizations. Without, it doesn't even trigger Valgrind warnings. (I don't want to debug further with Valgrind, because it's horrifyingly slow on my computer, even by Valgrind standards.)
I'm using GCC 10.3 (Debian 10.3.0-10), and it crashes with -O2 but not with -Og. So that's annoying since -Og would be better suited for debugging.
With -O2, I get the following backtrace:
(Yes, the backtrace really did triger some Python exception. Oh well, hopefully it's reliable enough.)
Apparently, _conceptP was NULL when considerRequests() tried to call findByWordClass() in it.