Bug 297252 - Importing large PDF files cause the whole desktop freeze
Summary: Importing large PDF files cause the whole desktop freeze
Status: RESOLVED DUPLICATE of bug 273860
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 2.4
Platform: Ubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-01 16:35 UTC by Antoine
Modified: 2012-04-09 13:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine 2012-04-01 16:35:27 UTC
When I import a large PDF file, I have a lot of these messages:
1/ krita(7123)/krita (tiles) KisMementoManager::commit: Named Transaction is empty 
2 /Bogus memory allocation size
Then, the whole desktop become unresponsive and I have to ssh into the machine to kill the krita process.
Comment 1 Halla Rempt 2012-04-01 16:45:16 UTC
Hi, can you send me (boud@valdyas.org) one of these files? Can you load the file in Okular?
Comment 2 Halla Rempt 2012-04-08 12:53:37 UTC
I cannot reproduce with the pdf's I have. Please give me a link to one of these pdf's so I can check with Okular and Krita.
Comment 3 Antoine 2012-04-08 14:45:55 UTC
I could reproduce with
http://www.freeinfosociety.com/media/pdf/4767.pdf

I have to admit that this is a pathological case, because the problem is basically that I was asking Krita to create a 3392 layers document. I guess that with the correct amount of RAM this could be possible.

But shouldn't Krita prevent the user from trying to create such a document ? 
The size of the document can be estimated: number of pages * depth * width * height * some constant  -- if the layers use no compression in memory
I don't know if it is easy to access the available RAM on a system; but you could display a little warning icon somewhere if the size is a bit huge.
Comment 4 Halla Rempt 2012-04-08 14:57:56 UTC
Well, krita has its own swapfile implementation, so we could load really big documents. We discussed adding limits before and back then we decided not to. Krita doesn't (yet) keep the layer data compressed in memory. We could warn... But the cut-off point might be different for everyone.

The file, btw, gives a  403 Forbidden
Comment 5 Halla Rempt 2012-04-09 13:49:40 UTC
Okay, could get the file now.
Comment 6 Halla Rempt 2012-04-09 13:50:50 UTC
This is the specific case for the generic bug 273860.

*** This bug has been marked as a duplicate of bug 273860 ***