Comments (7)
Thanks @Folcon, good idea
from humbleui.
@Folcon what do you mean? Like this
(ui/dynamic ctx [key (:unknown ctx)]
This works fine for me
from humbleui.
Ok looking at my crashdumps, I think I've made a mistake, the issue occurs, but the cause is not ui/dynamic
misbehaving specifically.
The issue is components which are created which when I use them in another context and they're missing expected keys causes a jvm crash, as libskija is less forgiving.
For example:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000001506f15f9, pid=51839, tid=775
#
# JRE version: OpenJDK Runtime Environment Homebrew (17.0.2) (build 17.0.2+0)
# Java VM: OpenJDK 64-Bit Server VM Homebrew (17.0.2+0, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# C [libskija_x64.dylib+0x2f15f9] SkPaint::nothingToDraw() const+0x9
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
~~~ ELIDED ~~~
--------------- T H R E A D ---------------
Current thread (0x00007fe41200bc00): JavaThread "main" [_thread_in_native, id=775, stack(0x00007ffee2515000,0x00007ffee6514000)]
Stack: [0x00007ffee2515000,0x00007ffee6514000], sp=0x00007ffee65099a0, free space=65490k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libskija_x64.dylib+0x2f15f9] SkPaint::nothingToDraw() const+0x9
C [libskija_x64.dylib+0x264f57] SkCanvas::internalQuickReject(SkRect const&, SkPaint const&, SkMatrix const*)+0x47
C [libskija_x64.dylib+0x266c0f] SkCanvas::onDrawRect(SkRect const&, SkPaint const&)+0x1f
C [libskija_x64.dylib+0x265605] SkCanvas::drawRect(SkRect const&, SkPaint const&)+0xb5
C [libskija_x64.dylib+0x7d9b] Java_io_github_humbleui_skija_Canvas__1nDrawRect+0x2b
J 7455 io.github.humbleui.skija.Canvas._nDrawRect(JFFFFJ)V (0 bytes) @ 0x00000001229120a9 [0x0000000122911fa0+0x0000000000000109]
j io.github.humbleui.skija.Canvas.drawRect(Lio/github/humbleui/types/Rect;Lio/github/humbleui/skija/Paint;)Lio/github/humbleui/skija/Canvas;+67
The problem may not be solvable, but yea, getting a better idea of what's wrong while developing and preferably not having crashes would be good.
If that's out of scope, sorry, feel free to close =)...
from humbleui.
Actually... Try enabling asserts? -ea
is JVM option. It should check for nulls in Skija and throw instead of dying silently
from humbleui.
So good news is that it's stopped crashing, bad news if the assert exception propagates through it seems to lockup everything.
The repl is active, but each time I try to reload a good state, it keeps throwing the same exception.
Hmm, I'll see if I can catch the exception better.
from humbleui.
Should’ve been fixed in acead0c
from humbleui.
@tonsky, you might want to catch Throwable
instead of Exception
as asserts cause similar "locking up" behaviour?
Or is that too much?
from humbleui.
Related Issues (20)
- BUG (Mac): Enabling "on top" in examples app hides window in Mission Control HOT 1
- Nested ui/draggable break themselves HOT 1
- nrepl init fails on Windows 10 HOT 3
- `[first experience]` Exception in `start-app!` HOT 6
- UnsatisfiedLinkError: Library file skija.dll not found in windows if version difference HOT 4
- Using `with-open` blows up HOT 3
- Event handlers for inputs and other widgets HOT 1
- Improve component exceptions HOT 1
- Cannot run repl, missing dependency HOT 1
- Nested draggables both get dragged when below pointer
- Scrollbar shouldn’t go below minimal size when too many elements
- Button inside nested with-bounds not firing HOT 4
- Incorrect mouse cursor when hovering over text field
- Move by word boundaries in text input with pressed Control
- Pressing Ctrl + z in the text field will result in a crash HOT 5
- Crash when pressing Ctrl+Z inside a text-field HOT 4
- Tweaks to compile with GraalVM HOT 7
- UnsatisfiedLinkError on master branch HOT 4
- Scaling on HIDPI screen HOT 8
- IME support on Wayland HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from humbleui.