Bug 375716 (look7see)

Summary: 32 bits Krita crashes if the initial image is too big for the available memory
Product: [Applications] krita Reporter: Edward <look7see>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: crash CC: griffinvalley, halla, look7see
Priority: NOR    
Version First Reported In: 3.1.1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: attachment-4211-0.html
attachment-3129-0.html
attachment-8032-0.html

Description Edward 2017-01-29 18:00:51 UTC
pentium dual core E5700 @ 3.00ghZ
AMD radeon HD5450
Driver 16.2.1 crimson ( driver 15.301.1901)
Monitor resolution 1280/x1024
Tablet Huion H610pro
wIN 7 pro

Open gl, on....no problems

When selecting predefined canvas size A3 by 600p.p.i. krita crashes, tried the same predefined size in Photoshop cc, and corelPainter 2015, no problem. trying to rule out tablet other hard ware and software issues, cannot see any conflicting problems. must say that radeon driver was recently updated will try to use previous catalyst driver and see if this is the issue will comunicate any further change.
Comment 1 Edward 2017-01-29 18:03:44 UTC
System Memory 3 Gygabytes
Comment 2 wolthera 2017-01-29 18:20:04 UTC
Hey there,

Does it only happen with this canvas size? Which bitdepth are you using?
Comment 3 Edward 2017-01-29 21:58:42 UTC
Created attachment 103710 [details]
attachment-4211-0.html

I'm using 8 bit rgb, it was OK on A4 canvas I'll try some others and let
you know,
Best regards.
On Jan 29, 2017 6:20 PM, "wolthera" <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=375716
>
> wolthera <griffinvalley@gmail.com> changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------
> ----------------
>                  CC|                            |griffinvalley@gmail.com
>
> --- Comment #2 from wolthera <griffinvalley@gmail.com> ---
> Hey there,
>
> Does it only happen with this canvas size? Which bitdepth are you using?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.
Comment 4 Halla Rempt 2017-01-30 09:47:39 UTC
Are you on a 32 bits version of Windows, or a 64 bits version? I suspect that you're simply running out of memory. An image of that size will take ~530MB of memory on creation.
Comment 5 Edward 2017-01-30 18:36:25 UTC
Created attachment 103720 [details]
attachment-3129-0.html

32bits, but wouldn't Photoshop and Corel struggle also? I have just
launched task manager with all processes visible, when launching Krita it
uses approx 02-50% CPU, and 640mb ram, when creating A3 page@600ppi it uses
approx 50% CPU and 1334 MB ram and crashes, I have open a  custom page with
6000x6000@600ppi with 10 layers, using wolthera's big mop brush at
663pixels, aswell as lagging it crashed at 1474 MB ram and 85% of both
cores of cpu. A standard working documents uses approx 30-50% CPU and as
much as 1100 MB ram.
All other predefined options work with out issue.
Hope this helps reach a conclusion.
Regards.
On Jan 30, 2017 9:47 AM, "Boudewijn Rempt" <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=375716
>
> Boudewijn Rempt <boud@valdyas.org> changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------
> ----------------
>                  CC|                            |boud@valdyas.org
>            Platform|Other                       |MS Windows
>
> --- Comment #4 from Boudewijn Rempt <boud@valdyas.org> ---
> Are you on a 32 bits version of Windows, or a 64 bits version? I suspect
> that
> you're simply running out of memory. An image of that size will take
> ~530MB of
> memory on creation.
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
Comment 6 Halla Rempt 2017-01-31 09:50:30 UTC
I cannot check the code for Photoshop and Corel Painter, so whatever they do, isn't relevant for Krita. 

On a 32 bits Windows, you can only allocate 2GB per process. Krita by default allows half of the available memory for an image, that is 1GB. If the image is too big it tries to swap it out to disk, but that also needs memory, and I suspect that that just isn't available. You can fiddle with the performance settings, making Krita use 2GB of memory, for instance, instead of 3/2 = 1.5, reduce undo steps and so on. See https://docs.krita.org/Performance_Settings

Btw, the actual PPI isn't relevant; it's only the number of pixels that is relevant. Memory usage is width * height * number of bytes per pixel * number of layers + 1, roughly.

But the bottom line is that a 7016x9920 pixel image just is too big for your computer. You will also have trouble actually painting on an image that size. There isn't much we can do at this point, I'm afraid.
Comment 7 Edward 2017-01-31 10:33:21 UTC
Created attachment 103730 [details]
attachment-8032-0.html

Thanks for the clarification.
All the best.
On Jan 31, 2017 9:50 AM, "Boudewijn Rempt" <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=375716
>
> Boudewijn Rempt <boud@valdyas.org> changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------
> ----------------
>      Ever confirmed|0                           |1
>              Status|UNCONFIRMED                 |CONFIRMED
>             Summary|Krita Crashes when          |32 bits Krita crashes if
>                    |predifined A3 @ 600P.p.i    |the initial image is too
>                    |canvas creation.            |big for the available
>                    |                            |memory
>
> --- Comment #6 from Boudewijn Rempt <boud@valdyas.org> ---
> I cannot check the code for Photoshop and Corel Painter, so whatever they
> do,
> isn't relevant for Krita.
>
> On a 32 bits Windows, you can only allocate 2GB per process. Krita by
> default
> allows half of the available memory for an image, that is 1GB. If the
> image is
> too big it tries to swap it out to disk, but that also needs memory, and I
> suspect that that just isn't available. You can fiddle with the performance
> settings, making Krita use 2GB of memory, for instance, instead of 3/2 =
> 1.5,
> reduce undo steps and so on. See https://docs.krita.org/
> Performance_Settings
>
> Btw, the actual PPI isn't relevant; it's only the number of pixels that is
> relevant. Memory usage is width * height * number of bytes per pixel *
> number
> of layers + 1, roughly.
>
> But the bottom line is that a 7016x9920 pixel image just is too big for
> your
> computer. You will also have trouble actually painting on an image that
> size.
> There isn't much we can do at this point, I'm afraid.
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
Comment 8 Halla Rempt 2017-03-27 14:09:44 UTC
Closing, because we just cannot do anything about this :-(