Opened 6 years ago
Closed 12 months ago
#10897 closed defect (invalid)
ZVISION: Assertion fails on locales with decimal comma
Reported by: | angstsmurf | Owned by: | bluegr |
---|---|---|---|
Priority: | normal | Component: | Engine: ZVision |
Version: | Keywords: | ||
Cc: | Game: | Zork Grand Inquisitor |
Description
See https://forums.scummvm.org/viewtopic.php?f=2&t=14816#p87015 and https://bugs.scummvm.org/ticket/6434.
When compiled on recent macOS and Xcode 10, Zvision games will fail with "Assertion failed: (scale > 0.0f), function setPanoramaScale, file engines/zvision/graphics/render_table.cpp, line 219" when trying to display the panorama screen. This is not the case when compiling on earlier systems, perhaps because libc++ is used instead of libstdc++.
This is likely to cause issues in other engines that use atof, sscanf("%f") and similar.
Change History (8)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
I thought ScummVM was supposed to set the locale to something language neutral. The SDL backend has this in OSystem_SDL::getSystemLanguage():
// Restore default C locale to prevent issues with // portability of sscanf(), atof(), etc. // See bug #3615148 setlocale(LC_ALL, "C");
Though maybe that's not used in the Mac version? I don't know...
comment:3 by , 6 years ago
Thank you for creating this bug report. I saw the post on the forum but I can’t currently look at this as I am travelling for my work. Hopefully this will act as a reminder for me to look at this when I get back home (if nobody else finds the root of the issue in the meantime).
This seems indeed related to bug #6434 (3615148 in the old sf.net tracker) and the fix applied then was working. I have no idea why it breaks again on Mojave/ xcode 10 so this will need to be investigated. The switch to libc++ is indeed a possible reason for the change in behaviour.
comment:4 by , 6 years ago
I should also mention that I haven't seen anyone else reproduce this yet, so it might very well be something that is broken just on my system.
comment:6 by , 12 months ago
I don't even know how to test this any more. I own Zork: Grand Inquisitor on GOG, but it will only download as a Windows installer which I don't know how to extract on my Mac.
comment:7 by , 12 months ago
I finally managed to install it on a Windows system and transfer the files. It seems to work fine now. The issue is gone. And as mentioned in the report, I'm not even sure anyone else ever experienced this issue.
comment:8 by , 12 months ago
Owner: | set to |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Thanks, closing as invalid
I forgot to mention in the ticket description that this only happens when the system is set to Swedish, German or other languages that use decimal comma.