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 bug (possibly when margins are too large for page). #39

Open
danfickle opened this issue Apr 11, 2015 · 2 comments
Open

Comments

@danfickle
Copy link
Owner

Test case at:
com.github.neoflyingsaucer.test.pdf.TestPage.testInfiniteLoopBugOnTooWideContent():

    @Test
    @Ignore("Failing (infinite loop somewhere in code)")
    public void testInfiniteLoopBugOnTooWideContent()
    {
        PdfTest pdf = new PdfTest("InfiniteLoopBugOnTooWideContent");

        String html =
            "<html><head><style>" +
            "@page { size: 30px; margin: 0; }" +
            "</style></head><body>" +
            "<ul><li>TEST</li></ul></body></html>";

        pdf.prepare(html);
        pdf.assertContains("/MediaBox");
    }
@danfickle
Copy link
Owner Author

Found the location of the endless loop at:
com.github.neoflyingsaucer.layout.InlineBoxing.layoutContent(LayoutContext, BlockBox, int, int)
inside the do loop.

@danfickle
Copy link
Owner Author

The fix is broken. The endless loop is solved but now it just discards words that are too long for the block. This is obviously not acceptable so I'll reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant