phronmophobic / membrane.term

A terminal emulator in pure clojure
Eclipse Public License 1.0
53 stars 1 forks source link

Membrane.term crashes when typing past right window edge #9

Open lread opened 2 years ago

lread commented 2 years ago

Repro From regular terminal:

clj -M:membrane.term run-term --width 20 --height 20

Type characters in membrane.term until your cursor passes the right edge of the window.

Result Membrane.term window closes and an exception is printed to the calling terminal window:

#error {
 :cause nil
 :via
 [{:type java.lang.IndexOutOfBoundsException
   :message nil
   :at [clojure.lang.PersistentVector arrayFor PersistentVector.java 158]}]
 :trace
 [[clojure.lang.PersistentVector arrayFor PersistentVector.java 158]
  [clojure.lang.PersistentVector nth PersistentVector.java 162]
  [clojure.lang.RT nth RT.java 896]
  [com.phronemophobic.membrane.term$term_view invokeStatic term.clj 160]
  [com.phronemophobic.membrane.term$term_view invoke term.clj 150]
  [com.phronemophobic.membrane.term$run_term$fn__18617 invoke term.clj 333]
  [membrane.skia.GlfwSkiaWindow repaint_BANG_ skia.clj 1749]
  [membrane.skia$eval18205$fn__18206$G__18197__18208 invoke skia.clj 1214]
  [membrane.skia$eval18205$fn__18206$G__18196__18211 invoke skia.clj 1214]
  [clojure.core$run_BANG_$fn__8813 invoke core.clj 7717]
  [clojure.core.protocols$iter_reduce invokeStatic protocols.clj 49]
  [clojure.core.protocols$fn__8162 invokeStatic protocols.clj 75]
  [clojure.core.protocols$fn__8162 invoke protocols.clj 75]
  [clojure.core.protocols$fn__8110$G__8105__8123 invoke protocols.clj 13]
  [clojure.core$reduce invokeStatic core.clj 6830]
  [clojure.core$run_BANG_ invokeStatic core.clj 7712]
  [clojure.core$run_BANG_ invoke core.clj 7712]
  [membrane.skia$run_helper invokeStatic skia.clj 1913]
  [membrane.skia$run_helper invoke skia.clj 1867]
  [membrane.skia$run_sync$fn__18535 invoke skia.clj 1815]
  [membrane.skia.DispatchCallback callback skia.clj 923]]}