Skip to content

fix(engines): LibreOffice 26 version, output drain timeout, msiexec log cleanup - #1034

Merged
KnifeLemon merged 2 commits into
mainfrom
fix/engine-small-fixes
Nov 3, 2026
Merged

KnifeLemon merged 2 commits into
mainfrom
fix/engine-small-fixes

Conversation

@KnifeLemon

@KnifeLemon KnifeLemon commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Three small engine fixes.

LibreOffice 26 version on the Engines page. LibreOffice 26's version.ini no longer carries MsiProductVersion, so a LibreOffice the user installed showed no version (and no "update recommended"). CopyVersions now also reads the product version of soffice.exe next to version.ini and parses that when the ini has none. Tests: two Versions_are_read_from_each_program cases, and A_libreoffice_without_msi_version_is_told_by_its_program, which puts a copy of the test host (any program with a version resource) next to an ini without MsiProductVersion.

Output drain timeout in ProcessRunner. A program can exit while a program it started still holds the inherited output pipes (soffice.bin after soffice.exe). Since .NET's Process.WaitForExitAsync also waits for the end of the output, the conversion then waited until its full time limit and failed with a timeout, although the program had finished. RunAsync now waits for the program itself to exit (Exited event), then gives the rest of the output 30 s at most; after that it goes on with the exit code it has and notes in standard error that the output is incomplete. Cancellation still applies during those 30 s.

Note: #583 put the 30 s limit on the parameterless process.WaitForExit() after the wait. On .NET 10 that call returns at once because WaitForExitAsync has already drained the output (checked with cmd /c start /b ping ...: WaitForExitAsync took 7.3 s, the following WaitForExit() 0 ms), so the limit has to sit on the wait itself.

Checked against the built ProcessRunner with cmd /c "echo hello & start /b ping -n 60 127.0.0.1 >nul": it returns after 30.4 s with exit code 0, hello in standard output and the note in standard error; on main it waits the full 60 s for ping.

msiexec log. After a successful administrative unpack the verbose filee-msiexec.log is now deleted from %TEMP%. A failed unpack keeps it, since the error names it.

Split out of #583 by @jojofox0815, who wrote the original change.

🤖 Generated with Claude Code

…og cleanup

- CopyVersions: LibreOffice 26's version.ini has no MsiProductVersion any
  more, so a user's own LibreOffice showed no version. Also read the
  product version of soffice.exe next to it.
- ProcessRunner: a program can exit while one it started still holds the
  inherited output pipes (soffice.bin after soffice.exe). WaitForExitAsync
  also waits for the end of the output, so the run waited until its time
  limit and failed although the program had finished. Wait for the exit
  itself, then give the rest of the output 30 s at most and note in
  standard error when it is incomplete.
- EngineInstaller: delete the verbose msiexec log after a successful
  unpack; a failed one keeps it, since the error names it.

Co-authored-by: jojofox0815 <125126720+jojofox0815@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label Nov 3, 2026
…s before the drain

With #1015's output probe and Job Object in, the program's own exit no longer waits for the output pipes, so a
child that holds them (soffice.bin) is ended through the job right away instead of using up the 30 s drain. The
probe test now covers a script that finished its PDF but keeps running, and a separate test covers the child.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon
KnifeLemon merged commit 9f95179 into main Nov 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant