Opened 5 months ago
Closed 5 months ago
#13973 closed defect (fixed)
THE DIG: Crash - Error: convertMessageToString: buffer overflow!
|Reported by:||Bautler||Owned by:||AndywinXp|
|Version:||Keywords:||The Dig, buffer overflow, error|
I'm not very good at English, sorry.
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.
Change History (11)
by , 5 months ago
comment:1 by , 5 months ago
comment:2 by , 5 months ago
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
[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:
Im playing this game in German.
comment:3 by , 5 months ago
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 , 5 months ago
Load this savegame from German Steam release. Click on "seltsames Gerät" (the bridge) icon twice
follow-up: 5 comment:4 by , 5 months 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' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior engines/scumm/string_v7.cpp:597:4 in convertMessageToString: buffer overflow!
comment:5 by , 5 months ago
comment:6 by , 5 months 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 , 5 months 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:8 by , 5 months ago
Thanks for the report! This has been fixed in master :-) Merry Xmas!
comment:9 by , 5 months ago
|Status:||new → closed|
Hi! Thanks for the report; have you tried the latest development build? https://www.scummvm.org/downloads/#daily
Let us know!