[Bug 50885] New: PdfSharp creates invalid PDF files
https://bugs.winehq.org/show_bug.cgi?id=50885 Bug ID: 50885 Summary: PdfSharp creates invalid PDF files Product: Wine Version: 6.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: lauri.kentta(a)gmail.com Distribution: --- Created attachment 69696 --> https://bugs.winehq.org/attachment.cgi?id=69696 Minimal example with PdfSharp PdfSharp (PDF library for .NET) creates invalid PDF files on Wine. Ghostscript is able to fix the files but reports: ”Error: Unknown operator: '-..' looks like a malformed number, replacing with 0.” I've attached a shell script which builds a minimal example with C# / PdfSharp and demonstrates the error with Ghostscript. Running with Mono (without Wine) works. Debugging further would probably need a dive into PdfSharp. In practice, this affects Purple Pen course setting software for orienteering. -- 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=50885 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Nikolay Sivov <bunglehead(a)gmail.com> --- 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=50885 --- Comment #2 from Lauri Kenttä <lauri.kentta(a)gmail.com> --- It seems to be about formatting negative zero. Here's a more minimal example (C#): System.Console.WriteLine(-0.0); // Mono: "0", Wine: "-.." -- 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=50885 --- Comment #3 from Nikolay Sivov <bunglehead(a)gmail.com> --- I think the issue is somewhere in managed number conversion. Not sure if it's normal, but this shows up in traces: [00000024: 2.67895 12] ENTER:c System.BitConverter:DoubleToInt64Bits (double)(-0.000000) [00000024: 2.67896 12] LEAVE:c System.BitConverter:DoubleToInt64Bits (double)(lresult=0x8000000000000000 Converting +0.0 or -0.1 gives correct result. -- 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=50885 --- Comment #4 from Lauri Kenttä <lauri.kentta(a)gmail.com> --- Comparing traces of -0.0 and +0.0 it looks like a bug in ecvt_s which fails to recognize negative zero and assumes that only numbers <0 are negative. Same for all similar cvt functions. I'll send a patch. -- 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=50885 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |msvcrt -- 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=50885 --- Comment #5 from Lauri Kenttä <lauri.kentta(a)gmail.com> --- Created attachment 69711 --> https://bugs.winehq.org/attachment.cgi?id=69711 ecvt_s trace with +0/-0 For reference, here's the relevant trace of ecvt_s with +0/-0. Obviously vsscanf_l gets invalid string to parse where -0 is involved. -- 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=50885 Lauri Kenttä <lauri.kentta(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |97b420224e767b24d89722ff5ef | |eca38a8ecf1e2 Resolution|--- |FIXED --- Comment #6 from Lauri Kenttä <lauri.kentta(a)gmail.com> --- Patch committed. -- 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=50885 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #7 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 6.6. -- 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=50885 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.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=50885 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |--- --- Comment #8 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 6.0.x milestone from bug fixes included in 6.0.2. -- 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)
-
WineHQ Bugzilla