https://bugs.winehq.org/show_bug.cgi?id=55247
Bug ID: 55247 Summary: Assertion in riched20 while installing Office 2007 Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: richedit Assignee: wine-bugs@winehq.org Reporter: ulrich.gemkow@ikr.uni-stuttgart.de Distribution: ---
Created attachment 74844 --> https://bugs.winehq.org/attachment.cgi?id=74844 Log file with WINEDEBUG=riched20
The installer of Office 2007 fails with an assertion in riched20. A bisect shows the following commit
commit b70eb32c5f3e506181d9e1e9fbef62e9baf3674d Author: Jinoh Kang jinoh.kang.kr@gmail.com Date: Sat Jul 1 13:22:46 2023 +0900
riched20: Wrap marked paragraphs at Text Services initialization.
Today, CreateTextServices() returns an Rich Edit object without row start and end marks, which are expected to exist by many Rich Edit operations as well as EM_* message handlers.
This leads to a crash when certain messages (e.g., EM_SCROLLCARET) are sent to the Rich Edit object via ITextServices::TxSendMessage(), unless ME_WrapMarkedParagraphs() has been called beforehand.
Fix this by calling wrap_marked_paras_dc() early in the initialization process.
This is not a problem for windowed Rich Edit controls, which already calls ME_WrapMarkedParagraphs() before the user or application starts interacting with it.
dlls/riched20/para.c | 1 + dlls/riched20/tests/txtsrv.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+)
A log file with WINEDEBUG=riched20 is attached.