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

Infinite loop in inline_line_width #557

Closed
p-vitt opened this issue Jan 9, 2018 · 2 comments
Closed

Infinite loop in inline_line_width #557

p-vitt opened this issue Jan 9, 2018 · 2 comments
Labels
bug Existing features not working as expected crash Problems preventing documents from being rendered
Milestone

Comments

@p-vitt
Copy link

p-vitt commented Jan 9, 2018

I'm constantly running into an infinte loop in inline_line_width when trying to dump a particular website. With others, it runs fine.

Some system details:

$ pip list --format=columns | grep WeasyPrint
WeasyPrint        0.42
$ python --version
Python 3.6.4
$ uname -mrs
Darwin 15.6.0 x86_64

new_resume_at stays to be 0 and resume_at stays to be 55 in every iteration, thus this loop won't end. At the beginning of the loop, some values get added to lines, but later on it keeps adding 0.9431584 on and on again.

How to reproduce:

link = 'http://www.zeit.de/politik/deutschland/2018-01/gruene-robert-habeck-palastrevolte-fluegelstreit-amt-und-mandat/komplettansicht'
weasyprint.HTML(url=link).write_pdf("test.pdf")

Do I misuse weasyprint? Do I need to add some template or configuration in order to dump a website?

@liZe
Copy link
Member

liZe commented Jan 9, 2018

Do I misuse weasyprint?

No, you don't. There's a bug!

@liZe liZe added the bug Existing features not working as expected label Jan 9, 2018
@liZe liZe added this to the 43 milestone Jan 9, 2018
@liZe liZe added the crash Problems preventing documents from being rendered label Jan 9, 2018
@liZe liZe closed this as completed in 995a9a3 Jan 9, 2018
@liZe
Copy link
Member

liZe commented Jan 9, 2018

I've tried hard to build a small test case to reproduce the problem and add it to WP's tests, but the real case is so strange (::after pseudo-tag in a display: table a tag with content: attr(href) and overflow-wrap: break-word) that I failed.

Never mind, bug is fixed in 995a9a3, the cause was easy to spot and the fix is clean.

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

No branches or pull requests

2 participants