Coder Social home page Coder Social logo

Comments (7)

tonsky avatar tonsky commented on June 16, 2024 1

Thanks @Folcon, good idea

from humbleui.

tonsky avatar tonsky commented on June 16, 2024

@Folcon what do you mean? Like this

(ui/dynamic ctx [key (:unknown ctx)]

This works fine for me

from humbleui.

Folcon avatar Folcon commented on June 16, 2024

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.

tonsky avatar tonsky commented on June 16, 2024

Actually... Try enabling asserts? -ea is JVM option. It should check for nulls in Skija and throw instead of dying silently

from humbleui.

Folcon avatar Folcon commented on June 16, 2024

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.

tonsky avatar tonsky commented on June 16, 2024

Should’ve been fixed in acead0c

from humbleui.

Folcon avatar Folcon commented on June 16, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.