This is the code fragment of the error:
(defn end-render [fb] (let [width (get-in fb [:dimen :width]) height (get-in fb [:dimen :height]) msfbo (:msfbo fb) fbo (:fbo fb)] (println fb) (GL33/glBindFramebuffer GL33/GL_READ_FRAMEBUFFER msfbo) (GL33/glBindFramebuffer GL33/GL_DRAW_FRAMEBUFFER fbo) ; this is line 116 (GL33/glBlitFramebuffer 0 0 width height 0 0 width height GL33/GL_COLOR_BUFFER_BIT GL33/GL_NEAREST) (GL33/glBindFramebuffer GL33/GL_FRAMEBUFFER 0))) from which I'm getting this error:
= EXECUTION ERROR = java.lang.NullPointerException: Cannot invoke "java.lang.Character.charValue()" because "x" is null - clojure.lang.RT: intCast (RT.java:1221) - breakout.fx$end_render: invokeStatic (fx.clj:116) - breakout.fx$end_render: invoke (fx.clj:108) - breakout.game$draw: invokeStatic (game.clj:245) - breakout.game$draw: invoke (game.clj:241) - util.window$game_loop: invokeStatic (window.clj:47) - util.window$game_loop: invoke (window.clj:37) - breakout.core$_main: invokeStatic (core.clj:14) I've seen errors like this before, when I try to access an element in a map that isn't there. But that doesn't seem to be the case here. The output from the (println fb) looks fine:
{:dimen {:widht 800, :height 600}, :msfbo 1, :fbo 2, :rbo 1, :vao 2, :texture 7} Note that the line number of the error might not be correct.
The full code can be found here.
grabandfetch-inthat throw a more descriptive error when map keys do not exists: github.com/cloojure/tupelo?tab=readme-ov-file#map-value-lookup