| Summary: | Krita crash on attempt to load a file with a huge resolution (not file size!) | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Denys Motornyi <denys.motornyi> |
| Component: | Tile manager | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | CC: | halla |
| Priority: | NOR | ||
| Version First Reported In: | 4.4.1 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | 30000x30000 1bit per pixel | ||
The minimum size per pixel in Krita is 16 bits if the image is grayscale, so 1 bit per pixel is not possible. The size in memory is w * h * bytes per pixel * number of layers + 1. On my Linux laptop with 32 gb, this image loads fine, takes 3.4gb of memory, while Krita as a whole takes 5gb according to the system monitor. Oh, and the image is actually RGBA, so the expected memory consumption would be 3600000000 bytes (because there's only one layer, the projection is shared with the layer itself) -- which is more or less what we see. Oh, two more things: * Did you really build Krita yourself? * Did you run an x86 or x64 version of Krita? Ok, it appears there is something else. I cannot reproduce the crash anymore. What I still face is that the memory usage is really high. While Krita loads the image, the peak is around 22Gb according to they system monitor. Once the image has loaded, it goes down to 11-12Gb. I didn't build Krita myself, I use the readily available x64 build. So the way it is stated the bug is irrelevant. Sorry for false alarm Do you have a really large amount of resources, like brush presets or patterns or things like that installed? Krita 4 loads all resources into memory (something we've already changed for what will become Krita 5), and if you've got a couple of 30000x30000 patters in your patterns folder, well, those are 3 gb per pattern :-) Hmm.. ok, it makes sense. Except that I though I only have what comes with the default Krita installation, and nothing additional. I'll doublecheck, maybe somehow something has left over from older installations. Thanks for your comment! Automatically switching the status of this bug to REPORTED so that the KDE team knows that the bug is ready to get confirmed. In the future you may also do this yourself when providing needed information. |
Created attachment 134117 [details] 30000x30000 1bit per pixel SUMMARY Krita crash on attempt to load a file with a huge resolution (not file size!) STEPS TO REPRODUCE 1. Load the attached file (boom.png - 30000x30000 1bit per pixel) 2. Observe result OBSERVED RESULT Krita hangs when try load the file and then it will crash and close. EXPECTED RESULT Krita will assess the file based on metadata - resolution. Krita will not attempt to load the file that it is not able to load anyway. Krita will not crash. Krita will show a message saying the file cannot be opened. SOFTWARE/OS VERSIONS Windows: 10.0.19041.630 macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION The attached file was actually made to perform edge-case testing of other image processing software, but I just wanted to check if Krita could handle this. And it appears that it has the same issue ( The test PC had 32 Gb of RAM, and Krita took most of it before crash.