TeXworks / texworks

Main codebase for TeXworks, a simple interface for working with TeX documents
https://tug.org/texworks/
GNU General Public License v2.0
697 stars 127 forks source link

Randomly closes with error after compilation ends #1026

Open nopria opened 1 year ago

nopria commented 1 year ago

Bug description:

TeXworks closes randomly at the end of compilation with the following message;

Clipboard01_opt

Steps to reproduce the problem:

  1. Compile a tex document with XeLaTeX
  2. about half ot the times TeXworks closes with error after compilation ends (PDF is produced)

Expected behavior:

TeXworks remains open after compilation.

General information: TeXworks version: Clipboard01b_opt TeXworks obtained from: TeX Live 2023 (installed from web on 2023/06/21) Operating system: Windows 11 Home 22H2 build 22621.1848 Additional information: XeTeX, Version 3.141592653-2.6-0.999995

Notes: This issue never happened on the same PC/OS/TeX document using the previous version of TeXlive (2022)

Find below the compilation log: compilation_log.zip

stloeffler commented 1 year ago

From searching the internet, this may be related to a mismatch between the Qt version used for compilation and the Qt version installed on your system. Could you please provide the full configuration info shown when you click on "Help > Email to mailing list"? Also, does the problem persist when using the latest build from GitHub (instead of the TeXlive version)? Note: this might be a duplicate of #1025

stloeffler commented 10 months ago

Closing due to inactivity

nopria commented 10 months ago

Sorry, I don't use TeXworks regularly, but the issue is still there, although it shows up only with very big (more than 1000 pages) and complex documents. Here is my configuration info:

----- configuration info -----
TeXworks version : 0.6.8 ("github") [r.6b1c6ab, 18/02/2023 11:42]
Install location : C:/texlive/2023/tlpkg/texworks/texworks.exe
Library path : C:/Users/UP/.texlive2023/texmf-config/texworks/
pdfTeX location : C:/texlive/2023/bin/windows/pdftex.exe
Operating system : Windows 11, 64-bit
Qt version : 5.15.8 (build) / 5.15.8 (runtime)
------------------------------ 
stloeffler commented 10 months ago

Could you recheck this issue with the latest development version? This should now be compiled with a much newer version of Qt (just in case this is caused by a problem in Qt)

nopria commented 10 months ago

I ran TeXworks-win-0.7.0-202401070901-git_d693571 from a separate directory, it started but it was not able to load the document, it just closed without errors nor warnings.

stloeffler commented 10 months ago

That's interesting. Probably it crashed somehow. Could you try

  1. opening just the pdf (without opening an associated tex file) - if this works it's likely a problem in the editor part
  2. moving/renaming the pdf and then opening the tex file - if this works it's likely a problem in the previewer part

Also, would it be possible to send the problematic document to me (e.g. via email)? That way, I could have a look locally, potentially with some debugging tools...

nopria commented 10 months ago

It's a preview issue. However my current version of TeXworks is able to open the same renamed PDF, so the issue has worsened with the new version, TeXworks now crashes without displaying any error also on opening the PDF from stratch, not only after compilation.

It must be a preview issue also with my current version of TeXworks, in fact despite the frequent crashes with error warning, the PDF, as I said in the initial description, is produced.

Unfortunately I can't disclose the PDF unless some legal boilerplate is arranged.

stloeffler commented 10 months ago

I fully understand that you can't share the document. Actually, I'm not interested in the content anyway, but rather in a minimal example file that shows the issue, which I could use for debugging. As a starting point, could you share information about the file size, page count, and details about what makes the document "complex"? Additionally, if there was a way to replace the content of your document by some blind text (e.g., "lorem ipsum") and/or dummy images and still produce the issue, that would be a great help (though I know that is asking a lot!)