[Bug 59500] New: Scrivener 3 (Qt 6.4.3) crashes silently when opening RTF documents containing emoji encoded as UTF-16 surrogate pairs
http://bugs.winehq.org/show_bug.cgi?id=59500 Bug ID: 59500 Summary: Scrivener 3 (Qt 6.4.3) crashes silently when opening RTF documents containing emoji encoded as UTF-16 surrogate pairs Product: Wine Version: 10.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: dwrite Assignee: wine-bugs@list.winehq.org Reporter: golfsmarts@gmail.com Distribution: --- Wine version: wine-10.0 (Ubuntu 10.0~repack-6ubuntu1+zorin5) Distribution: Zorin OS 18 (Ubuntu 24.04 noble base) Architecture: 64-bit Application: Scrivener 3.1.6.0 for Windows (Literature & Latte) Description: Scrivener 3 crashes silently when opening any document whose underlying RTF file contains emoji characters. The emoji are encoded in RTF as sequences of the form: \loch\af2\hich\af2\dbch\af2\uc1\u55356\'3F\u57130\'3F These are UTF-16 surrogate pairs (high surrogate U+D800–U+DBFF followed by low surrogate U+DC00–U+DFFF) used to encode Unicode codepoints above U+FFFF. Scrivener uses Qt 6.4.3, confirmed via strings on the binary (build tag ScrQt643-rel1). The crash does not occur on native Windows. Stripping the \dbch...\uc1\uXXXXX sequences from the affected RTF files completely eliminates the crashes, confirming surrogate pair handling as the root cause. This appears to be the same class of issue reported for LOOT v0.20.0 (Qt 6.5.1) crashing under Wine after upgrading from Qt5: https://github.com/loot/loot/issues/1886 Reproducer: Any Qt 6.x application that renders a string containing Unicode codepoints above U+FFFF (emoji, supplementary CJK, etc.) Expected behavior: Application renders or ignores the characters without crashing Actual behavior: Silent crash, no error dialog -- 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.
http://bugs.winehq.org/show_bug.cgi?id=59500 --- Comment #1 from Nikolay Sivov <bunglehead@gmail.com> --- Scrivener is not freely available so it's difficult to test, and another mentioned application LOOT starts fine for me. I used version 0.20.0 with current Wine. So looks like specific instructions are necessary to reproduce. If anyone can provide a Qt6 sample application that shows this issue, that would be great. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=59500 golfsmarts@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Version|10.0 |11.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.
http://bugs.winehq.org/show_bug.cgi?id=59500 --- Comment #2 from golfsmarts@gmail.com --- (In reply to Nikolay Sivov from comment #1)
Scrivener is not freely available so it's difficult to test, and another mentioned application LOOT starts fine for me. I used version 0.20.0 with current Wine. So looks like specific instructions are necessary to reproduce. If anyone can provide a Qt6 sample application that shows this issue, that would be great.
I can produce the bug using this technique. Wine with a 64-bit Windows prefix, Python 3.11 for Windows installed inside it, and PySide6 6.4.3 installed via pip inside that same prefix. Run it as WINEPREFIX=/your/prefix /path/to/wine python.exe testcrash.py. The crash case is a single script that creates a QLabel containing U+1F30A (????), a character above the Basic Multilingual Plane that requires a UTF-16 surrogate pair: pythonimport sys from PySide6.QtWidgets import QApplication, QLabel app = QApplication(sys.argv) label = QLabel("test \U0001F30A") label.show() sys.exit(app.exec()) This produces a page fault in qt6core. The control case is identical except the character is U+00E9 (é), which sits within the BMP and requires no surrogate pair: pythonimport sys from PySide6.QtWidgets import QApplication, QLabel app = QApplication(sys.argv) label = QLabel("test \u00E9") label.show() sys.exit(app.exec()) The control case runs without crashing and displays the window correctly. The only variable between the two is whether the character requires a surrogate pair. Wine: 11.2 (Staging) PySide6: 6.4.3 (Qt 6.4.3) Python: 3.11 (Windows, running under Wine) Kernel: 6.17.0-14-generic Host OS: Zorin OS 18 (Ubuntu 24.04 base) Architecture: x86_64 Wine mode: Windows 10, 64-bit prefix -- 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.
http://bugs.winehq.org/show_bug.cgi?id=59500 --- Comment #3 from Nikolay Sivov <bunglehead@gmail.com> --- Created attachment 80520 --> http://bugs.winehq.org/attachment.cgi?id=80520 test output It works fine for me with current Wine. Qt is using lower level API from dwrite, and doesn't use font fallback from dwrite. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=59500 --- Comment #4 from Nikolay Sivov <bunglehead@gmail.com> --- Created attachment 80521 --> http://bugs.winehq.org/attachment.cgi?id=80521 script I used python 3.11 installer, and then "python -m pip install pyside6". -- 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.
http://bugs.winehq.org/show_bug.cgi?id=59500 Nikolay Sivov <bunglehead@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|dwrite |-unknown -- 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.
http://bugs.winehq.org/show_bug.cgi?id=59500 --- Comment #5 from golfsmarts@gmail.com --- Created attachment 80522 --> http://bugs.winehq.org/attachment.cgi?id=80522 backtrace Thank you for the update. It is interesting that it remains stable on your end; it may be an architectural or environment-specific discrepancy. I noticed that the attached backtrace has "Platform: x86_64 (guest: i386), which might be the reason why you cannot reproduce. -- 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