Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Cairo out of memory #566
Sometimes cairo raises exception with out of memory error when converting simple html document to single page pdf. Example of html which sometimes raises the error is included in issue #565
Error appears both in Flask app and in standalone python app.
Here is a test application to reproduce the error:
Simple application create the same pdf from same html in loop and after certain number of loops, it crashes. Sometimes after 10, 100 or 200 iterations. The same exception appears much sooner with weasyprint 0.40 than with latest version. Of course, my PC doesn't runs out of memory, it has like 9GB free out of 16GB.
Thank you for this full example. I can reproduce the issue.
Yes, that's because of #441. This issue seems to be very similar, as it happens when using both