Opened 2 years ago
Closed 2 years ago
#13973 closed defect (fixed)
THE DIG: Crash - Error: convertMessageToString: buffer overflow!
Reported by: | Bautler | Owned by: | AndywinXp |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | The Dig, buffer overflow, error | |
Cc: | Game: | The Dig |
Description
Hello!
I'm not very good at English, sorry.
The problem:
In the middle of the conversation with the monster from the crystal pyramid, the console opens and gives the following error:
Error: convertMessageToString: buffer overflow!
I didn't find anything via the search engine.
Attachments (2)
Change History (11)
by , 2 years ago
Attachment: | dig-de.s00 added |
---|
comment:1 by , 2 years ago
comment:2 by , 2 years ago
Hello!
Yes, i have the newest version. The Error will appear when Maggie says:
„When you say, "The eye will see," you aren´t talking about our eyes, are you?“
Last message in console is:
Read 3 history entries
Full-Log:
[2022-12-23 00:11:29] ScummVM 2.6.1 (Oct 17 2022 10:09:38) [2022-12-23 00:11:29] Vorbis FLAC MP3 RGB zLib MPEG2 FluidSynth Theora AAC A/52 FreeType2 FriBiDi JPEG PNG GIF taskbar TTS cloud (servers, local) TinyGL OpenGL (with shaders) [2022-12-23 00:11:29] --- Log opened. [2022-12-23 00:13:49] convertMessageToString: buffer overflow! [2022-12-23 00:13:49] Debugger started, type 'exit' to return to the game. [2022-12-23 00:13:49] Type 'help' to see a little list of commands and variables. [2022-12-23 00:13:49] ERROR: convertMessageToString: buffer overflow! [2022-12-23 00:13:49] Read 3 history entries [2022-12-23 00:13:53] --- Log closed successfully.
Maybe some information help:
OS: Win7x64
Im playing this game in German.
comment:3 by , 2 years ago
Hello,
Thank you for reporting this. Although your log file above says "ScummVM 2.6.1" (which is not a development build but a release build), I can still reproduce this with the current development version (even with the recent bugfix for the Japanese release of The Dig).
Here's a savegame where I can trigger this issue with the German release from Steam. (warning: the savegame comes from an old save of mine from the French release, but it appears to work...).
by , 2 years ago
Attachment: | dig-steam-win-de.s02 added |
---|
Load this savegame from German Steam release. Click on "seltsames Gerät" (the bridge) icon twice
follow-up: 5 comment:4 by , 2 years ago
Ah, didn't see that you provided your own save too, sorry.
Here's what UBsan says when this happens:
engines/scumm/string_v7.cpp:597:4: runtime error: index 256 out of bounds for type 'byte[256]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior engines/scumm/string_v7.cpp:597:4 in convertMessageToString: buffer overflow!
comment:5 by , 2 years ago
comment:6 by , 2 years ago
I think it's more related to the reply from the creature; its text has around 225 characters in English. It looks like we have a limit to 256 characters, but German being quite a verbose language in comparison, I think the German translation might just overflow it (I can't get the same scene to crash in the French release). (And The Dig uses a translation table, while earlier games would just hardcode the translated strings into the original scripts.)
I don't know how the original German interpreter behaved in that case. Maybe it has a higher limit, or maybe the buffer overflow wasn't triggered, just by luck. Or maybe the problem is unrelated to the length of that string, but that seems unlikely to me.
I think someone from our SCUMM team is going to figure this out soon, don't worry :) Thanks for reporting this and testing every dialogue option in The Dig, because this may be a very old bug!
comment:7 by , 2 years ago
Yea, sounds plausible. I have found the Text in a YouTube video. I guess i was unlucky with this error... :D (Video is from 12.04.2020)
and no Problem, i like to help. And thanks for the Save-File. So i can play this Game to finish.
Hmm... yesterday the save file was still working. I copied the save file again and it crashed again. Good that after this conversation was an autosave...
comment:9 by , 2 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Hi! Thanks for the report; have you tried the latest development build? https://www.scummvm.org/downloads/#daily
Let us know!