daisy / pipeline-mod-braille

!! NOTE: This project is now part of the pipeline-modules project !! | Braille Production Modules for the DAISY Pipeline 2
1 stars 4 forks source link

"RuntimeException: Error in code" when using -obfl-vertical-position: 25; with a page height of 25 or less #153

Open josteinaj opened 7 years ago

josteinaj commented 7 years ago

Not sure if this counts as a bug, but it would at least be nice if the error message was something more descriptive than "RuntimeException: Error in code".

Relevant XML and CSS (from NLB script, used to show volume number at the bottom of the page):

<p class="volume"> of </p>
.bind::before {
        display: inline;
        content: "Volume " -obfl-evaluate("(round $volume)");
}

.bind {
        display: inline;
        -obfl-vertical-position: 25;
}

.bind::after {
        display: inline;
        content: -obfl-evaluate("(round $volumes)");
        page-break-after: always;
}
josteinaj commented 7 years ago

Here's the stacktrace:

java.lang.RuntimeException: Error in code.
    at org.daisy.dotify.formatter.impl.PageSequenceBuilder2.newRow(PageSequenceBuilder2.java:104) ~[dotify.formatter.impl-3.1.0.jar:na]
    at org.daisy.dotify.formatter.impl.PageSequenceBuilder2.nextPage(PageSequenceBuilder2.java:137) ~[dotify.formatter.impl-3.1.0.jar:na]
    at org.daisy.dotify.formatter.impl.PageStructBuilder.newSequence(PageStructBuilder.java:114) ~[dotify.formatter.impl-3.1.0.jar:na]
    at org.daisy.dotify.formatter.impl.PageStructBuilder.paginateInner(PageStructBuilder.java:42) ~[dotify.formatter.impl-3.1.0.jar:na]
    at org.daisy.dotify.formatter.impl.PageStructBuilder.paginate(PageStructBuilder.java:23) ~[dotify.formatter.impl-3.1.0.jar:na]
    at org.daisy.dotify.formatter.impl.FormatterImpl.updateVolumeContents(FormatterImpl.java:203) ~[dotify.formatter.impl-3.1.0.jar:na]
    at org.daisy.dotify.formatter.impl.FormatterImpl.getVolumes(FormatterImpl.java:146) ~[dotify.formatter.impl-3.1.0.jar:na]
    at org.daisy.dotify.formatter.impl.FormatterImpl.write(FormatterImpl.java:128) ~[dotify.formatter.impl-3.1.0.jar:na]
    at org.daisy.dotify.engine.impl.LayoutEngineImpl.convert(LayoutEngineImpl.java:127) ~[dotify.formatter.impl-3.1.0.jar:na]
    at org.daisy.pipeline.braille.dotify.calabash.impl.OBFLToPEFStep.run(OBFLToPEFStep.java:136) ~[dotify-formatter-1.12.0-SNAPSHOT.jar:na]
(...)
bertfrees commented 7 years ago

This is a Dotify error. I have improved this error message already in Dotify but that commit was reverted later. I don't know whether updating to the latest version would help.

bertfrees commented 4 years ago

Needs a test to check whether this is still an issue.