#5922 closed defect (fixed)
TINSEL: DW Crash in Subtitle Menu
Reported by: | misterhands | Owned by: | bluegr |
---|---|---|---|
Priority: | high | Component: | Engine: Tinsel |
Version: | Keywords: | ||
Cc: | Game: | Discworld |
Description
When I click in the subtitles menu on the subtitles speed slider, and then hit the OK button, SCUMMVM crashes on me, and gives the following error message :
Assertion failed: ((unsigned int) lang) < NUM_LANGUAGES, file engines/tinsel/tinsel.cpp, line 1266
I have the multilang GRA files version of Discworld, and use SCUMMVM 1.4 Win32.
Thanks !
Ticket imported from: #3459999. Ticket imported from: bugs/5922.
Attachments (1)
Change History (17)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Summary: | Discworld menu crash → DW: menu crash |
---|
comment:4 by , 13 years ago
I'd make a guess that since the assert is explicitly checking that the unsigned value of the passed language (Tinsel language list, not Common) against NUM_LANGUAGES value, it's either getting a value of 'UNK_LANG', or a language value not actually supported by the Tinsel engine. Though French at least is one of the explicitly supported languages, so I'm not sure why it would assert out like this.
comment:5 by , 13 years ago
Actually, maybe not. Passed languages are only meant to be one of the valid values of the LANGUAGE enum anyway. So I'm not sure why an invalid value would be passed to the method. I think it'll take a developer with the French version to backtrack to see where the invalid language gets passed from, and if it's from the _language global, how it got set to an invalid value.
comment:6 by , 13 years ago
misterhands: Thanks for this bug report. To ensure that we can identify your exact version, could you please attach a listing (and preferably MD5sums) of your Discworld datafiles as a text file to this bug? The output of a tool such as http://md5summer.org/ would be optimal.
by , 13 years ago
Attachment: | DISCWLD.md5 added |
---|
comment:7 by , 13 years ago
OK here's the file you requested. I don't think my version of Discworld is particularly rare or exotic though, but I could be wrong...
comment:8 by , 13 years ago
Summary: | DW: menu crash → TINSEL: DW Crash in Subtitle Menu |
---|
comment:9 by , 13 years ago
misterhands: Thanks for the attached file. The format is perfect.
Your multilanguage version is probably not rare or exotic, but it helps to have file listing with full MD5s for the developer who investigates to know your exact version, exclude any crashes due to corrupted files from defective, old or scratched media and to be sure that you don't have an odd variant (some translations were bad for file naming oddities).
I have compared this to my DW1 version, but I have the UK version with SCN files, so can't look at investigating this myself...
comment:10 by , 12 years ago
This bug is nice to get fixed before the release. Raising priority for keeping the track.
comment:11 by , 12 years ago
Owner: | set to |
---|---|
Priority: | normal → high |
comment:12 by , 12 years ago
This bug occurs when changing the slider without selecting a language flag.
In this case, InvDragStart() sets whichbox via WhichMenuBox(), which returns a very large value. Then, it sets cd.selBox to this very high value. Then, LanguageChange() does this: nLang = (LANGUAGE)(cd.selBox + 1); ...which sets nLang to a very high value.
Thus, the bug here is with WhichMenuBox(), and the subsequent value set in cd.selBox.
In dialogs.cpp, there are some negative values for special widgets (IB_UP etc). Perhaps selBox should always be positive?
comment:13 by , 12 years ago
Thanks for the analysis md5. Unfortunately, as per previously, since this is a frequently used function, and I don't have a copy of the multi-lingual version, I'm not confident to do any fixes without anything to test against. I'm reassigning this back to None.
comment:14 by , 12 years ago
Owner: | removed |
---|
comment:15 by , 12 years ago
Tested with my multilanguage version of DW1.
Fixed in r4c3b483 (master) and r13607b0 (branch 1.5)
comment:16 by , 12 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
It would be nice to know what language you selected in your ScummVM configuration.