Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to print or export #50734

Closed
2 tasks done
C4pT4in0bvi0u5 opened this issue Oct 28, 2022 · 9 comments · Fixed by #57799
Closed
2 tasks done

Unable to print or export #50734

C4pT4in0bvi0u5 opened this issue Oct 28, 2022 · 9 comments · Fixed by #57799
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks Regression Something which used to work, but doesn't anymore

Comments

@C4pT4in0bvi0u5
Copy link

C4pT4in0bvi0u5 commented Oct 28, 2022

What is the bug or the crash?

When attempting to print or export my map, QGIS works for a long time (193 seconds in the recorded case), then crashes abruptly. No warnings, no errors, just blip and the entire program disappears. If an output file is created, it has 0 size.

I have successfully exported exactly once to a 96 dpi PDF in Letter size, but I need 600 dpi and much larger paper size as there is more data to be added to this map yet.

I have tried exporting to PDF with multiple different options, exporting to PNG, and printing directly. All of the above fail in the same way.

I have tried reducing the canvas and layer sizes drastically by creating new layers with only the polygons etc. that I need, and removing the country-scale original layers.

This is not a hardware issue. QGIS doesn't even use a full 2 CPU threads of the 40 available, and only uses 324 MB of the available 96 GB RAM. Yes, the QGIS max thread count is set to 40 . . . as if that mattered.

The only crash output from DebugView is the following:
[14804] Warning: QObject::killTimer: Timers cannot be stopped from another thread
[14804] Warning: QObject::~QObject: Timers cannot be stopped from another thread

Here's the project: temp QGIS project.zip

Steps to reproduce the issue

Try printing or exporting the attached project.

Versions

Have tried QGIS versions 3.26 and 3.28.
Windows 10 build 19044.

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

Clean install, no QGIS plugins installed.

@C4pT4in0bvi0u5 C4pT4in0bvi0u5 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 28, 2022
@agiudiceandrea agiudiceandrea added Feedback Waiting on the submitter for answers Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks labels Oct 29, 2022
@agiudiceandrea
Copy link
Contributor

@C4pT4in0bvi0u5, are you trying to print/export the map canvas or a layout? In the provided project there are 3 print layouts (1 is empty) and all of them in A4 size and no one in Letter size.

Anyway, on Windows 10, the issue doesn't occur using QGIS 3.22.12, while it does using QGIS 3.28.0 and the latest QGIS 3.29.0-Master (2a3cdfd).

I've exported the "Cropped 1" layout as a 600 dpi PNG image without any issue using QGIS 3.22.12.
Cropped 1

@agiudiceandrea agiudiceandrea added Regression Something which used to work, but doesn't anymore and removed Feedback Waiting on the submitter for answers labels Oct 29, 2022
@C4pT4in0bvi0u5
Copy link
Author

C4pT4in0bvi0u5 commented Oct 29, 2022

@agiudiceandrea Confirmed working in v3.22.12. Exporting the canvas directly to PDF works, exporting directly to PNG works, printing and exporting from layout works. Everything just works. So the issue is with the QGIS versions that I tried (3.26 and 3.28).

In versions 3.26 and 3.28, I tried exporting both map canvas and layout.

Regarding the multiple layouts present in the project, when the program would crash before completing layout export, it would sometimes leave an empty layout behind if I hadn't saved yet. which is why there are some residual ones left behind. (As to A4, I said the only successful export was 96 dpi Letter. I didn't say that's the only thing I tried . . . ) This project file is a work in progress, not a tidied up "final" version of anything, so I guess I neglected to delete all the detritus before I sent it out into the world. Originally I was mid-project and just wanted to do a quick test print to see how the colors looked on paper. After bashing my head against the wall trying to get it to print, I came here for help with the file as was.

FWIW, GIMP is also experiencing an issue in their development version where it won't process large PDF files. As in this case, their last 'stable' release worked fine. Not sure if QGIS and GIMP share any libraries. Over on the GIMP site, there's speculation that a 32-bit variable may have been used instead of a 64-bit variable for some sort of "offset" when loading the image. I'm not a programmer, hopefully that means something to somebody.

Thank you very much for your help.

@dgreenewalt
Copy link

Do any of the labels in the map use masks? I have found labels masks cause problems with PDF export (while label buffers are fine). It may be worth looking into. I have found PDF file size and processing time increase dramatically when mask check box is checked.

@C4pT4in0bvi0u5
Copy link
Author

C4pT4in0bvi0u5 commented Oct 31, 2022

Yes, this map uses label masks extensively. The land QuarterSection layer (the grid) has a rule to mask out around the labels from the land Section layer (the small numbers), so that each number doesn't have a crosshairs running through it.

@dgreenewalt
Copy link

Will the map export properly if you remove the masks or use buffers rather than masks for your labels? Not as good for display, but I'm curious if that resolves the print/export problem.

@C4pT4in0bvi0u5
Copy link
Author

C4pT4in0bvi0u5 commented Oct 31, 2022

@dgreenewalt Yes, tried with v3.28, and it will now print from layout and export to PNG & PDF after disabling the text mask on the Sections layer, using text buffer instead.

The project files are posted above, so feel free to experiment on your own with them.

@agiudiceandrea
Copy link
Contributor

@C4pT4in0bvi0u5, is this issue the same already reported at #50543?

@agiudiceandrea agiudiceandrea added the Feedback Waiting on the submitter for answers label Nov 2, 2022
@C4pT4in0bvi0u5
Copy link
Author

@agiudiceandrea It appears that they are the same, yes.

@agiudiceandrea
Copy link
Contributor

Closing as duplicate of #50543.

@agiudiceandrea agiudiceandrea closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2022
@agiudiceandrea agiudiceandrea removed the Feedback Waiting on the submitter for answers label Nov 2, 2022
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jun 7, 2024
This results in much smaller output file sizes, and files which
load much quicker in PDF viewers/editors

Refs qgis#50734
Refs qgis#54788
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jun 10, 2024
This results in much smaller output file sizes, and files which
load much quicker in PDF viewers/editors

Refs qgis#50734
Refs qgis#54788
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jun 11, 2024
This results in much smaller output file sizes, and files which
load much quicker in PDF viewers/editors

Refs qgis#50734
Refs qgis#54788
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jun 17, 2024
This results in much smaller output file sizes, and files which
load much quicker in PDF viewers/editors

Refs qgis#50734
Refs qgis#54788
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jun 19, 2024
This results in much smaller output file sizes, and files which
load much quicker in PDF viewers/editors

Refs qgis#50734
Refs qgis#54788
nyalldawson added a commit that referenced this issue Jun 19, 2024
This results in much smaller output file sizes, and files which
load much quicker in PDF viewers/editors

Refs #50734
Refs #54788
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants