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

Comments

Projects
None yet
2 participants
@p-vitt

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

This comment has been minimized.

Member

liZe commented Jan 9, 2018

Do I misuse weasyprint?

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

@liZe liZe added the bug label Jan 9, 2018

@liZe liZe added this to the 43 milestone Jan 9, 2018

@liZe liZe added the crash label Jan 9, 2018

@liZe liZe closed this in 995a9a3 Jan 9, 2018

@liZe

This comment has been minimized.

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