[Bug 46442] New: FormatCurrency(9) returns .9.00 (period in front)
https://bugs.winehq.org/show_bug.cgi?id=46442 Bug ID: 46442 Summary: FormatCurrency(9) returns .9.00 (period in front) Product: Wine Version: 4.0-rc5 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: wine(a)londonlight.org Distribution: --- Created attachment 63224 --> https://bugs.winehq.org/attachment.cgi?id=63224 compiled executable Reproduced in wine-3.0.4 in Linux Mint, wine-3.18-staging in Sabayon (from its package manager) as well as self-compiled (vanilla) wine-3.21-298-ge9231beb86 and wine-4.0-rc5-14-g0ff7fd1259 FormatCurrency(9) returns ".9.00", notice the period in the front. Therefore, FormatCurrency(FormatCurrency(9)) will segfault. Why does it add the period there? Compiled exe attached, source code zipped and attached in next comment. Steps: 1. Get winetricks: wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetrick... 2. Install vb6run: WINEARCH=win32 WINEPREFIX="$HOME/wine-ct" ~/winetricks vb6run 3. Run currencytest.exe LC_ALL="en_US.utf8" WINEPREFIX="$HOME/wine-ct" currencytest.exe -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 Theodore Bumpers <wine(a)londonlight.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wine(a)londonlight.org -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 --- Comment #1 from Theodore Bumpers <wine(a)londonlight.org> --- Created attachment 63225 --> https://bugs.winehq.org/attachment.cgi?id=63225 source code (VB6) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |dark.shadow4(a)web.de --- Comment #2 from Fabian Maurer <dark.shadow4(a)web.de> --- Confirming. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 --- Comment #3 from Theodore Bumpers <wine(a)londonlight.org> --- Just tried with the following locales, they affect the formatting but all produce invalid results (duplicated currency decimal separator character) and therefore all lead to a segfault when formatting a formatted string (which should work just fine), LC_MONETARY= ar_DZ.utf8 ar_SA.utf8 C de_CH.utf8 de_DE.utf8 en_SE.utf8 en_US.utf8 it_IT.utf8 POSIX sv_SE.utf8 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 --- Comment #4 from Fabian Maurer <dark.shadow4(a)web.de> --- Can you post a full log when the segfault happens? Because I don't get one. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 --- Comment #5 from Theodore Bumpers <wine(a)londonlight.org> --- Fabian the crash is not the bug, the crash is a result of the bug. The bug here is that FormatCurrency in wine formats "9" as ".9.00", with two period characters. Reproduced by multiple people on different machines using different locales. In Windows, FormatCurrency(9) would return for example "9.00 BTC". I'm happy to provide you with any info you need, just instruct me how, as I'm somewhat familiar with GNU GDB but not with winegdb or wine's "debug channels". -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 --- Comment #6 from Fabian Maurer <dark.shadow4(a)web.de> --- For clarity, the test program segfaults for you? Because it doesn't segfault for me, and it shouldn't. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 --- Comment #7 from Theodore Bumpers <wine(a)londonlight.org> --- Created attachment 63228 --> https://bugs.winehq.org/attachment.cgi?id=63228 MsgBox 1 LC_MONETARY=en_US.UTF-8 LC_ALL=en_US.UTF-8 WINEPREFIX="$HOME/wine-ct" ~/programs/wine/bin/wine ~/mca/currencytest/currencytest.exe FormatCurrency(9) returns ".9.00" which is incorrect due to the two periods. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 --- Comment #8 from Theodore Bumpers <wine(a)londonlight.org> --- Created attachment 63229 --> https://bugs.winehq.org/attachment.cgi?id=63229 MsgBox 2 Since FormatCurrency returns a string which is not formatted in a valid way, FormatCurrency(FormatCurrency(9)) results in a type mismatch run-time error (in both Windows and wine, as expected). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 --- Comment #9 from Theodore Bumpers <wine(a)londonlight.org> --- I used the term "segfault" out of habit, this is not a memory access violation, it just leads to a crash. Screenshot attached. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 --- Comment #10 from Theodore Bumpers <wine(a)londonlight.org> --- Would be fantastic if someone found a fix for this - I looked in the code but my efforts haven't been successful. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair(a)hotmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |oleaut32 --- Comment #11 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- The first issue will be fixed by https://source.winehq.org/patches/data/159126 if/when it's accepted. The second issue, is that VarFormatCurrency doesn't correctly handle an already formatted string. (eg $9.00) https://bugs.winehq.org/show_bug.cgi?id=46709 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |46709 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |29cf8ee8ab54f35def5b4c5ed7d | |155b730bf901e Status|NEW |RESOLVED --- Comment #12 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=29cf8ee8ab54f35def5b4c5ed... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 4.3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46442 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.0.x |--- --- Comment #14 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 4.0.x milestone from bug fixes included in 4.0.1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org