Description: Using documentLoad() function in a program that uses LibreOfficeKit API causes the program to hang Steps to Reproduce: 1. Install and set-up LibreOffice SDK on Windows 2. Build LibreOffice example odk/examples/cpp/lokconvert Alternatively, you may build the example as described in the below blog post using cmake: LibreOfficeKit for document conversion https://dev.blog.documentfoundation.org/2024/07/25/libreofficekit-for-document-conversion/ 3. Run the example to convert a sample ODT to PDF Actual Results: The program hangs Expected Results: It should finish conversion successfully, and print: "Success!". Reproducible: Always User Profile Reset: No Additional Info: This is a regression as: The code works with LO 25.2: Version: 25.2.6.2 (X86_64) / LibreOffice Community Build ID: 729c5bfe710f5eb71ed3bbde9e06a6065e9c6c5d CPU threads: 20; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded But hangs in LO 25.8. Also does not work with the latest LO 26.2 dev master built from sources: Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 2c9b640c9e8c30e26358d7414aea18c5e5bf3fee CPU threads: 20; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded
Bisected to: 1e2e51607a163021ef1fb1fb0d217266bd448173 is the first bad commit commit 1e2e51607a163021ef1fb1fb0d217266bd448173 Author: Mike Kaganski <mike.kaganski@collabora.com> Date: Fri Jan 10 11:52:51 2025 +0500 Try to use CoWaitForMultipleHandles magic to handle COM message loop @Mike: Could you please take a look?
https://gerrit.libreoffice.org/c/core/+/191147
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/23afeaedf4d4a03943338fc39ae41f5c423e5997 tdf#168431: Release solar mutex when sending window message to main thread It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/1c78cb0673e117136212fea7b51adcf898ff94f5 tdf#168431: Release solar mutex when sending window message to main thread It will be available in 25.8.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.