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

v63.0 flexbox hang in endless loop #2304

Closed
MWedl opened this issue Nov 13, 2024 · 1 comment
Closed

v63.0 flexbox hang in endless loop #2304

MWedl opened this issue Nov 13, 2024 · 1 comment
Labels
crash Problems preventing documents from being rendered

Comments

@MWedl
Copy link
Contributor

MWedl commented Nov 13, 2024

Hi,
after updating to weasyprint v63.0 we encountered a problem where weasyprint runs into an endless loop and hangs infinitely. The problem is probably caused by changes in the flexbox implementation.

Here is a minimal reproduction code:

<html>
<head></head>
<body>
  <div style="display: flex; flex-direction: column;">
    <div></div>
    <div>
      <div style="height: 1352px;"></div>
    </div>
    <div>
      text
    </div>
    <div></div>
  </div>
</body>
</html>
$ weasyprint --version
WeasyPrint version 63.0

$ weasyprint --debug index.html out.pdf
INFO: __init__.py:162 (__init__): Step 1 - Fetching and parsing HTML - data/index.html
INFO: __init__.py:69 (__init__): Step 3 - Applying CSS
INFO: document.py:242 (_build_layout_context): Step 4 - Creating formatting structure
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 1
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 2
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 3
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 4
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 5
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 6
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 7
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 8
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 9
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 10
INFO: page.py:907 (make_all_pages): Step 5 - Creating layout - Page 11
...
@grewn0uille grewn0uille added the bug Existing features not working as expected label Nov 13, 2024
@liZe liZe closed this as completed in 49393f0 Nov 24, 2024
@liZe liZe added crash Problems preventing documents from being rendered and removed bug Existing features not working as expected labels Nov 24, 2024
@liZe
Copy link
Member

liZe commented Nov 24, 2024

Thanks for the report and the sample!

It’s now fixed: the rendering may be different from what you expect (fragmentation in flex layouts is still often bad in WeasyPrint), but at least the endless loop is gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Problems preventing documents from being rendered
Projects
None yet
Development

No branches or pull requests

3 participants