bohonghuang / claw-raylib

Fully auto-generated Common Lisp bindings to Raylib (4.5/5.0) and Raygui (3.0/4.0) using claw and cffi-object
Apache License 2.0
40 stars 3 forks source link

Trigger `Unhandled memory fault at #x998.` on evaluating `(raylib:load-texture ...)` #9

Closed sakurawald closed 1 week ago

sakurawald commented 1 week ago

Evaluating this form:

(raylib:load-texture 
 "/home/sakurawald/.roswell/lisp/quicklisp/local-projects/lisp/asset/teapot.png")

Trigger

Unhandled memory fault at #x998.
   [Condition of type SB-SYS:MEMORY-FAULT-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD tid=46406 "repl-thread" RUNNING {100D89FF73}>)

Backtrace:
  0: (SB-SYS:MEMORY-FAULT-ERROR #<unused argument> #.(SB-SYS:INT-SAP #X00000998))
  1: ("foreign function: call_into_lisp_")
  2: ("foreign function: funcall2")
  3: ("foreign function: handle_memory_fault_emulation_trap")
  4: ("foreign function: handle_trap")
  5: ("foreign function: #x4292DE")
  6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (RAYLIB:LOAD-TEXTURE "/home/sakurawald/.roswell/lisp/quicklisp/local-projects/lisp/asset/teapot.png") #<NULL-LEXENV>)
  7: (EVAL (RAYLIB:LOAD-TEXTURE "/home/sakurawald/.roswell/lisp/quicklisp/local-projects/lisp/asset/teapot.png"))
  8: (MICROS::EVAL-REGION " ..)
  9: ((LAMBDA NIL :IN MICROS/REPL::REPL-EVAL))
 10: (MICROS/REPL::TRACK-PACKAGE #<FUNCTION (LAMBDA NIL :IN MICROS/REPL::REPL-EVAL) {100218129B}>)
 11: (MICROS::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<FUNCTION (LAMBDA NIL :IN MICROS/REPL::REPL-EVAL) {100218127B}>)
 12: (MICROS::CALL-WITH-BUFFER-SYNTAX NIL #<FUNCTION (LAMBDA NIL :IN MICROS/REPL::REPL-EVAL) {100218125B}>)
 13: (MICROS/REPL::REPL-EVAL " ..)
 14: (MICROS/REPL:LISTENER-EVAL " ..)
 15: (SB-INT:SIMPLE-EVAL-IN-LEXENV (MICROS/REPL:LISTENER-EVAL " ..)
 16: (EVAL (MICROS/REPL:LISTENER-EVAL " ..)
 17: ((LAMBDA NIL :IN MICROS:EVAL-FOR-EMACS))
 18: (MICROS::CALL-WITH-READTABLE-ALIST #<FUNCTION (LAMBDA NIL :IN MICROS:EVAL-FOR-EMACS) {100218118B}>)
 19: (MICROS:EVAL-FOR-EMACS (MICROS/REPL:LISTENER-EVAL " ..)
 20: (MICROS::PROCESS-REQUESTS NIL)
 21: ((LAMBDA NIL :IN MICROS::HANDLE-REQUESTS))
 22: ((LAMBDA NIL :IN MICROS::HANDLE-REQUESTS))
 23: (MICROS/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION MICROS:SWANK-DEBUGGER-HOOK> #<FUNCTION (LAMBDA NIL :IN MICROS::HANDLE-REQUESTS) {100D8C802B}>)
 24: ((FLET MICROS/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/home/sakurawald/common-lisp/lem/.qlot/dists/micros/software/micros-ref-af94fe5d6688f67a092f604765fb706ebae44e99/backend/sbcl.lisp") #<FUNCTION MICRO..
 25: (MICROS::CALL-WITH-BINDINGS ((*STANDARD-INPUT* . #1=#<MICROS/GRAY::SLIME-INPUT-STREAM {100D76FFA3}>) (*STANDARD-OUTPUT* . #2=#<MICROS/GRAY::SLIME-OUTPUT-STREAM {100D880F33}>) (*TRACE-OUTPUT* . #2#) (*..
 26: (MICROS::HANDLE-REQUESTS #<MICROS::MULTITHREADED-CONNECTION {100D452B83}> NIL)
 27: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
 28: ((FLET "WITHOUT-INTERRUPTS-BODY-" :IN SB-THREAD::RUN))
 29: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
 30: ((FLET "WITHOUT-INTERRUPTS-BODY-" :IN SB-THREAD::RUN))
 31: (SB-THREAD::RUN)
 32: ("foreign function: call_into_lisp_")
 33: ("foreign function: funcall1")
sakurawald commented 1 week ago

The call to (raylib:load-texture ...) requires the opengl context.