vlaaad / reveal

Read Eval Visualize Loop for Clojure
https://vlaaad.github.io/reveal/
MIT License
600 stars 21 forks source link

NREPL integration crashes Java when trying to open context menu #36

Closed lvh closed 2 years ago

lvh commented 2 years ago
GNU Emacs 28.0.90 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2021-12-08
;; CIDER 1.3.0-snapshot (package: 20220105.613), nREPL 0.9.0
;; Clojure 1.10.3, Java 17.0.1
user> (map (juxt identity #(System/getProperty %)) ["os.arch" "os.name" "os.version"])
(["os.arch" "aarch64"] ["os.name" "Mac OS X"] ["os.version" "12.1"])
user> (map (juxt identity #(System/getProperty %)) ["java.version" "java.runtime.name"])
(["java.version" "17.0.1"] ["java.runtime.name" "OpenJDK Runtime Environment"])

{vlaaad/reveal {:mvn/version "1.3.263"}} added to deps.edn, middlware added via .nrepl.edn as per docs. Once my REPL loads, I do (require '[vlaaad.reveal :as r]) #reveal/inspect (all-ns) and I see all NSes appear in the JavaFX window. However, as soon as I click on the JavaFX window, the process (and hence my NREPL) crashes with SIGABRT after ostensibly attempting to deref a null pointer:

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Happy to attach the full traceback if you think that's useful, but I think it's due to https://bugs.openjdk.java.net/browse/JDK-8275723 from hunting it down myself.

Good news: updating JavaFX fixes the issue. I'll submit a patch to cljfx and link this?

lvh commented 2 years ago

https://github.com/cljfx/cljfx/pull/155 to fix upstream

vlaaad commented 2 years ago

Thanks for the report and a PR! I released new Reveal versions (Free: 1.3.264, Pro: 1.3.327), can you check that it works for you now?

lvh commented 2 years ago

I can confirm that this fixed the issue! Thanks <3