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/long processing on FontMeasurer.getAscent #11

Open
ggrossetie opened this issue Aug 17, 2022 · 0 comments
Open

Infinite loop/long processing on FontMeasurer.getAscent #11

ggrossetie opened this issue Aug 17, 2022 · 0 comments

Comments

@ggrossetie
Copy link

I encountered the following error with ditamini-0.14:

io.vertx.core.VertxException: Thread blocked
  at [email protected]/java.util.concurrent.ConcurrentHashMap.get(Unknown Source)
  at [email protected]/sun.font.FontDesignMetrics.getMetrics(Unknown Source)
  at [email protected]/sun.java2d.SunGraphics2D.getFontMetrics(Unknown Source)
  at app//org.stathissideris.ditaa.graphics.FontMeasurer.getAscent(FontMeasurer.java:80)
  at app//org.stathissideris.ditaa.graphics.FontMeasurer$2.test(FontMeasurer.java:110)
  at app//org.stathissideris.ditaa.graphics.FontMeasurer.deriveFont(FontMeasurer.java:138)
  at app//org.stathissideris.ditaa.graphics.FontMeasurer.getFontFor(FontMeasurer.java:115)
  at app//org.stathissideris.ditaa.graphics.Diagram.<init>(Diagram.java:493)
  at app//org.stathissideris.ditaa.core.CommandLineConverter.convertToImage(CommandLineConverter.java:144)
  at app//org.stathissideris.ditaa.core.CommandLineConverter.doConvert(CommandLineConverter.java:110)
  at app//org.stathissideris.ditaa.core.CommandLineConverter.convert(CommandLineConverter.java:97)
  at app//io.kroki.server.service.Ditaa.convert(Ditaa.java:71)
  at app//io.kroki.server.service.Ditaa.lambda$convert$0(Ditaa.java:58)
  at app//io.kroki.server.service.Ditaa$$Lambda$255/0x0000000100497040.handle(Unknown Source)
  at app//io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159)
  at app//io.vertx.core.impl.ContextImpl$$Lambda$206/0x00000001002e3040.handle(Unknown Source)
  at app//io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100)
  at app//io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157)
  at app//io.vertx.core.impl.ContextImpl$$Lambda$204/0x00000001002e3840.run(Unknown Source)
  at app//io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
  at app//io.vertx.core.impl.TaskQueue$$Lambda$103/0x00000001001be440.run(Unknown Source)
  at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at app//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
  at [email protected]/java.lang.Thread.run(Unknown Source)

I see that there's now a fixedFontSize that returns the baseFont (thus avoiding computation?) but I cannot find how to enable this option? Also, did you encounter this error as well (maybe that's why you've introduced this new option)?

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

No branches or pull requests

1 participant