HumbleUI / Skija

Java bindings for Skia
Apache License 2.0
498 stars 34 forks source link

Text Style Scene in examples crashed on linux because of AssertionError #50

Closed Glavo closed 1 year ago

Glavo commented 1 year ago

This happens on my x86 and arm devices:

Exception in thread "main" java.lang.AssertionError
        at io.github.humbleui.skija.examples.scenes.TextStyleScene.draw(TextStyleScene.java:110)
        at io.github.humbleui.skija.examples.scenes.Scenes.draw(Scenes.java:103)
        at io.github.humbleui.skija.examples.lwjgl.Window.draw(Main.java:143)
        at io.github.humbleui.skija.examples.lwjgl.Window.loop(Main.java:214)
        at io.github.humbleui.skija.examples.lwjgl.Window.run(Main.java:62)
        at io.github.humbleui.skija.examples.lwjgl.Main.main(Main.java:33)
tonsky commented 1 year ago

Interesting! I guess it’s this line

https://github.com/HumbleUI/Skija/blob/4348d36e80d507aa46705e6db3958b55b45381d0/examples/scenes/src/TextStyleScene.java#L110

Can you print these values? Just curious how it looks on Linux

Feel free to wrap that assert into if !linux and submit a PR, too

Glavo commented 1 year ago

@tonsky top, ascent, descent and bottom are all 0.

tonsky commented 1 year ago

Interesting. I guess something doesn’t work