lem icon indicating copy to clipboard operation
lem copied to clipboard

Fix crash in documentation-describe-bindings on launch

Open Dima-369 opened this issue 1 year ago • 5 comments

Even with an empty init.lisp, I just get this:

image

After some time, more is visible for whatever reason, but it is never filled:

image

Dima-369 avatar Jul 23 '23 11:07 Dima-369

This is not due to describe-bindings, this causes the same faulty behavior:

(let ((buffer (lem-documentation-mode/internal:generate-buffer "scratch")))
    (lem:switch-to-buffer buffer))

Dima-369 avatar Jul 23 '23 11:07 Dima-369

Thank you for the report. I've fixed this error just now.

cxxxr avatar Jul 23 '23 15:07 cxxxr

Thanks, works!

Dima-369 avatar Jul 23 '23 18:07 Dima-369

I think we have an another issue here. If I use (load-theme "zenburn") now, this works. But when I use (load-theme "emacs-light"), it crashes and shows this:

image

Because the theme does not set the base0d value, it crashes. Any idea how to approach is? I think the base attributes then need to be mandatory?

I noticed this when creating a custom theme not based on (define-base16-color-theme) like this:

(define-color-theme "dima" ()
  (:display-background-mode :dark)
  (:foreground "#bbc2cf")
  ;; ...
  (syntax-variable-attribute :foreground "#bbc2cf" :background "#232525")
  (syntax-type-attribute :foreground "#cc7832" :background "#232525")
  (syntax-builtin-attribute :foreground "#a782bb":background "#232525"))
 <INFO> [21:40:31] lem-sdl2 main.lisp (call-with-debug) - The value
  :base0d
is not of type
  sequence
Backtrace for: #<SB-THREAD:THREAD "editor" RUNNING {10010C00E3}>
0: (LENGTH :BASE0D)
1: (LEM-CORE:PARSE-COLOR :BASE0D)
2: (LEM-SDL2::RENDER-FILL-TEXT #<SDL2-FFI:SDL-TEXTURE {#X600001ACE7F0}> "next-line" 3 3 :ATTRIBUTE #<LEM-CORE:ATTRIBUTE (#1= #1#) underline {1006332F63}>)
3: ((FLET "WITHOUT-INTERRUPTS-BODY-11" :IN SB-THREAD::CALL-WITH-RECURSIVE-LOCK))
4: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK #<FUNCTION (FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK :IN LEM-SDL2::CALL-WITH-RENDERER) {1D7BF01B}> #<SB-THREAD:MUTEX "lem-sdl2 display mutex" owner: #<SB-THREAD:THREAD "editor" RUNNING {10010C00E3}>> T NIL)
5: (LEM-SDL2::CALL-WITH-RENDERER #<FUNCTION (LAMBDA NIL :IN LEM-INTERFACE:PRINT) {100636562B}>)
6: (LEM-SDL2::CALL-WITH-DEBUG #<FUNCTION (LAMBDA NIL :IN LEM-INTERFACE:PRINT) {10063655AB}> #<FUNCTION (LAMBDA NIL :IN LEM-INTERFACE:PRINT) {10063655EB}>)
...

Dima-369 avatar Jul 23 '23 19:07 Dima-369

Yes, indeed. emacs-dark and emacs-light are not able to set the base color value. I was going to remove these themes, but they are still there.

cxxxr avatar Jul 24 '23 03:07 cxxxr

Seems to be fixed.

garlic0x1 avatar Jul 13 '24 15:07 garlic0x1