The value :DELETED is not of type SB-SYS:SYSTEM-AREA-POINTER when binding SB-ALIEN::VALUE
Hi, first off: Kudos for Lisp GUI application that "just works" on Windows!
When opening folder full of images, I got the following error. It briefly flashed previews in the lower part of the window though before crashing. The files were just regular PNG screenshots (may or may not matter).
This is SBCL 1.4.14, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
WARNING: the Windows port is fragile, particularly for multithreaded
code. Unfortunately, the development team currently lacks the time
and resources this platform demands.
* (ql:quickload "halftone")
To load "halftone":
Load 12 ASDF systems:
alexandria asdf bordeaux-threads cffi cl-fad cl-ppcre
closer-mop iterate named-readtables trivial-features
trivial-garbage uiop
Install 16 Quicklisp releases:
array-utils commonqt deploy dissect documentation-utils
form-fiddle halftone local-time pathname-utils piping
qt-libs qtools simple-tasks trivial-indent
trivial-main-thread verbose
; Fetching #<URL "http://beta.quicklisp.org/archive/piping/2018-08-31/piping-20180831-git.tgz">
; 10.58KB
==================================================
10,832 bytes in 0.00 seconds (2115.63KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/verbose/2018-08-31/verbose-20180831-git.tgz">
; 61.08KB
==================================================
62,549 bytes in 0.02 seconds (3817.69KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/deploy/2019-05-21/deploy-20190521-git.tgz">
; 21.38KB
==================================================
21,893 bytes in 0.04 seconds (593.89KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/halftone/2018-08-31/halftone-20180831-git.tgz">
; 8.07KB
==================================================
8,266 bytes in 0.00 seconds (1614.45KB/sec)
; Loading "halftone"
[package alexandria.0.dev]........................
[package babel-encodings].........................
[package babel]...................................
..................................................
[package cffi-sys]................................
[package cffi]....................................
..................................................
[package cffi-features]...........................
[package editor-hints.named-readtables]...........
[package editor-hints.named-readtables]...........
[package cl-ppcre]................................
..................................................
[package closer-mop]..............................
[package closer-common-lisp]......................
[package closer-common-lisp-user].................
[package pathname-utils]..........................
[package qt-lib-generator]........................
[package qt-libs].................................
[package iterate].................................
[package trivial-garbage].........................
[package qt]......................................
..................................................
[package trivial-indent]..........................
[package documentation-utils].....................
[package deploy]..................................
[package form-fiddle].............................
[package bordeaux-threads]........................
[package array-utils].............................
[package dissect].................................
[package simple-tasks]............................
[package trivial-main-thread].....................
[package qtools]..................................
[package cl+qt]...................................
..................................................
[package piping]..................................
[package cl-fad]..................................
[package path]....................................
[package local-time]..............................
[package verbose].................................
[package halftone]................................
.................
("halftone")
* (apropos "halftone")
ASDF/USER::HALFTONE
:HALFTONE (bound)
* (halftone:start)
Unhandled TYPE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
{10012E0613}>:
The value
:DELETED
is not of type
SB-SYS:SYSTEM-AREA-POINTER
when binding SB-ALIEN::VALUE
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10012E0613}>
0: ((LAMBDA (QT::STACK) :IN QT::%%CALL) #.(SB-SYS:INT-SAP #X000EB9E0))
1: ((LABELS QT::ARGLIST-MARSHALLER :IN QT::ARGLIST-MARSHALLER) NIL #<CLOSURE (LAMBDA (QT::STACK) :IN QT::%%CALL) {1006684FBB}>)
2: (HALFTONE::DRAW-IMAGE-FITTING #<Qt::QImage :DELETED {1006716C73}> #<HALFTONE::VIEWER QGLWidget 0x0013A7F0>)
3: (QT::OVERRIDE HALFTONE::%VIEWER-OVERRIDE-PAINT-EVENT #<HALFTONE::VIEWER QGLWidget 0x0013A7F0> "paintEvent" (#<Qt::QPaintEvent :TYPE 12 {1006683923}>))
4: (QT::%DYNAMIC-INVOCATION-CALLBACK #.(SB-SYS:INT-SAP #X0011A700) #.(SB-SYS:INT-SAP #X0013A7F0) 563 0 #.(SB-SYS:INT-SAP #X009AA8C0))
5: ((LAMBDA (QT::SMOKE METHOD QT::OVERRIDE-ID QT::OBJ QT::ARGS) :IN "C:/Users/Matthew/Quicklisp/dists/quicklisp/software/commonqt-20190202-git/ffi.lisp") #.(SB-SYS:INT-SAP #X0011A700) 563 0 #.(SB-SYS:INT-SAP #X0013A7F0) #.(SB-SYS:INT-SAP #X009AA8C0))
6: ((LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) :IN "C:/Users/Matthew/Quicklisp/dists/quicklisp/software/commonqt-20190202-git/ffi.lisp") #<unavailable argument> #<unavailable argument> #<unavailable argument>)
7: ("foreign function: #x43101B")
8: ("foreign function: #x403848")
9: ((LABELS QT::ARGLIST-MARSHALLER :IN QT::ARGLIST-MARSHALLER) NIL #<CLOSURE (LAMBDA (QT::STACK) :IN QT::%%CALL) {1002957D7B}>)
10: ((LABELS QTOOLS::MAIN :IN QTOOLS::MAIN-WINDOW-EXEC))
11: (QTOOLS::MAIN-WINDOW-EXEC #<FUNCTION (LAMBDA NIL :IN HALFTONE:MAIN) {100417191B}> :NAME "Halftone" :QAPPLICATION-ARGS NIL :BLOCKING T :MAIN-THREAD NIL :ON-ERROR #<FUNCTION INVOKE-DEBUGGER> :SHOW T :FINALIZE T :BEFORE-EXEC #<FUNCTION (LAMBDA (HALFTONE::WINDOW) :IN HALFTONE:MAIN) {100417186B}> :AFTER-EXEC NIL)
12: (HALFTONE:MAIN)
13: (HALFTONE:START)
14: (SB-INT:SIMPLE-EVAL-IN-LEXENV (HALFTONE:START) #<NULL-LEXENV>)
15: (EVAL (HALFTONE:START))
16: (INTERACTIVE-EVAL (HALFTONE:START) :EVAL NIL)
17: (SB-IMPL::REPL-FUN NIL)
18: ((FLET "LAMBDA0" :IN "SYS:SRC;CODE;TOPLEVEL.LISP"))
19: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (FLET "LAMBDA0" :IN "SYS:SRC;CODE;TOPLEVEL.LISP") {9AF7CB}>)
20: (SB-IMPL::TOPLEVEL-REPL NIL)
21: (SB-IMPL::TOPLEVEL-INIT)
22: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
23: ((FLET "WITHOUT-INTERRUPTS-BODY-7" :IN SAVE-LISP-AND-DIE))
24: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))
25: ("foreign function: #x43101B")
26: ("foreign function: #x403618")
unhandled condition in --disable-debugger mode, quitting
WARNING:
Runner #<SIMPLE-TASKS:QUEUED-RUNNER :STATUS :STOPPING {1003FE7133}> did not stop.```
Also similar error in most recent release of CCL:
> Debug: The value :DELETED is not of the expected type MACPTR.
> While executing: SIGNAL, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 >```
Could you see if the attached patch fixes it?
Unfortunately, same error. Let me know if you'd like me to provide some of the stack frame output via (break).
Ech, I'm dumb. Force-pushed something that is more likely to actually fix things.
I think this also produces the same error:
Unhandled TYPE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
{10012E0613}>:
The value
:DELETED
is not of type
SB-SYS:SYSTEM-AREA-POINTER
when binding SB-ALIEN::VALUE
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10012E0613}>
0: ((LAMBDA (QT::STACK) :IN QT::%%CALL) #.(SB-SYS:INT-SAP #X00B37730))
1: ((LABELS QT::ARGLIST-MARSHALLER :IN QT::ARGLIST-MARSHALLER) NIL #<CLOSURE (LAMBDA (QT::STACK) :IN QT::%%CALL) {10078257AB}>)
2: (HALFTONE::DRAW-IMAGE-FITTING #<Qt::QImage :DELETED {1007CE0F43}> #<HALFTONE::VIEWER QGLWidget 0x00BDBCA0>)
3: (QT::OVERRIDE HALFTONE::%VIEWER-OVERRIDE-PAINT-EVENT #<HALFTONE::VIEWER QGLWidget 0x00BDBCA0> "paintEvent" (#<Qt::QPaintEvent :TYPE 12 {1007823F33}>))
4: (QT::%DYNAMIC-INVOCATION-CALLBACK #.(SB-SYS:INT-SAP #X00BD0E70) #.(SB-SYS:INT-SAP #X00BDBCA0) 563 0 #.(SB-SYS:INT-SAP #X009AA8C0))
5: ((LAMBDA (QT::SMOKE METHOD QT::OVERRIDE-ID QT::OBJ QT::ARGS) :IN "C:/Users/Matthew/Quicklisp/dists/quicklisp/software/commonqt-20190202-git/ffi.lisp") #.(SB-SYS:INT-SAP #X00BD0E70) 563 0 #.(SB-SYS:INT-SAP #X00BDBCA0) #.(SB-SYS:INT-SAP #X009AA8C0))
6: ((LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) :IN "C:/Users/Matthew/Quicklisp/dists/quicklisp/software/commonqt-20190202-git/ffi.lisp") #<unavailable argument> #<unavailable argument> #<unavailable argument>)
7: ("foreign function: #x43101B")
8: ("foreign function: #x403848")
9: ((LABELS QT::ARGLIST-MARSHALLER :IN QT::ARGLIST-MARSHALLER) NIL #<CLOSURE (LAMBDA (QT::STACK) :IN QT::%%CALL) {1006C6931B}>)
10: ((LABELS QTOOLS::MAIN :IN QTOOLS::MAIN-WINDOW-EXEC))
11: (QTOOLS::MAIN-WINDOW-EXEC #<FUNCTION (LAMBDA NIL :IN HALFTONE:MAIN) {1004DF737B}> :NAME "Halftone" :QAPPLICATION-ARGS NIL :BLOCKING T :MAIN-THREAD NIL :ON-ERROR #<FUNCTION INVOKE-DEBUGGER> :SHOW T :FINALIZE T :BEFORE-EXEC #<FUNCTION (LAMBDA (HALFTONE::WINDOW) :IN HALFTONE:MAIN) {1004DF72CB}> :AFTER-EXEC NIL)
12: (HALFTONE:MAIN)
13: (HALFTONE:START)
14: (SB-INT:SIMPLE-EVAL-IN-LEXENV (HALFTONE:START) #<NULL-LEXENV>)
15: (EVAL (HALFTONE:START))
16: (INTERACTIVE-EVAL (HALFTONE:START) :EVAL NIL)
17: (SB-IMPL::REPL-FUN NIL)
18: ((FLET "LAMBDA0" :IN "SYS:SRC;CODE;TOPLEVEL.LISP"))
19: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (FLET "LAMBDA0" :IN "SYS:SRC;CODE;TOPLEVEL.LISP") {9AF7CB}>)
20: (SB-IMPL::TOPLEVEL-REPL NIL)
21: (SB-IMPL::TOPLEVEL-INIT)
22: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
23: ((FLET "WITHOUT-INTERRUPTS-BODY-7" :IN SAVE-LISP-AND-DIE))
24: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))
25: ("foreign function: #x43101B")
26: ("foreign function: #x403618")
unhandled condition in --disable-debugger mode, quitting
WARNING:
Runner #<SIMPLE-TASKS:QUEUED-RUNNER :STATUS :STOPPING {1004825873}> did not stop.```
Just to confirm the commit, I pulled from master again and this is the commit:
```~\Quicklisp\local-projects\Shinmera\halftone [master ≡]> git diff HEAD~1
diff --git a/viewer.lisp b/viewer.lisp
index 19ac75b..a89ba33 100644
--- a/viewer.lisp
+++ b/viewer.lisp
@@ -33,5 +33,5 @@ Author: Nicolas Hafner <[email protected]>
(declare (ignore ev))
(with-finalizing ((painter (q+:make-qpainter viewer)))
(q+:erase-rect painter (q+:rect viewer)))
- (when image
+ (when (and image (not (qobject-deleted image)))
(draw-image-fitting image viewer)))```
That makes no sense. I don't understand how the deleted image gets passed to the next function.
I can't reproduce the problem so I'm out of ideas at the moment.
What does (ql:where-is-system :halftone) give?
(ql:where-is-system :halftone) WARNING: System definition file #P"C:/Users/Matthew/Quicklisp/dists/quicklisp/software/cl-ppcre-20190521-git/cl-ppcre.asd" contains definition for system "cl-ppcre-test". Please only define "cl-ppcre" and secondary systems with a name starting with "cl-ppcre/" (e.g. "cl-ppcre/test") in that file. STYLE-WARNING: Undefined alien: "sw_smoke" STYLE-WARNING: Undefined alien: "sw_windows_version" STYLE-WARNING: Undefined alien: "sw_make_qvector_uint" STYLE-WARNING: Undefined alien: "sw_delete_qvector_uint" STYLE-WARNING: Undefined alien: "sw_make_qbytearray" STYLE-WARNING: Undefined alien: "sw_delete_qbytearray" STYLE-WARNING: Undefined alien: "sw_make_qstring" STYLE-WARNING: Undefined alien: "sw_delete_qstring" STYLE-WARNING: Undefined alien: "sw_qstringlist_new" STYLE-WARNING: Undefined alien: "sw_qstringlist_delete" STYLE-WARNING: Undefined alien: "sw_qstringlist_append" STYLE-WARNING: Undefined alien: "sw_qstringlist_size" STYLE-WARNING: Undefined alien: "sw_qstringlist_at" STYLE-WARNING: Undefined alien: "sw_make_metaobject" STYLE-WARNING: Undefined alien: "sw_delete" STYLE-WARNING: Undefined alien: "sw_qstring_to_utf8" STYLE-WARNING: Undefined alien: "sw_qstring_to_utf16" STYLE-WARNING: Undefined alien: "sw_find_name" STYLE-WARNING: Undefined alien: "sw_find_class" STYLE-WARNING: Undefined alien: "sw_id_method" STYLE-WARNING: Undefined alien: "sw_id_type" STYLE-WARNING: Undefined alien: "sw_id_class" STYLE-WARNING: Undefined alien: "sw_id_instance_class" STYLE-WARNING: Undefined alien: "sw_override" STYLE-WARNING: Undefined alien: "sw_make_dynamic_binding" STYLE-WARNING: Undefined alien: "sw_qlist_void_new" STYLE-WARNING: Undefined alien: "sw_qlist_void_delete" STYLE-WARNING: Undefined alien: "sw_qlist_void_size" STYLE-WARNING: Undefined alien: "sw_qlist_void_at" STYLE-WARNING: Undefined alien: "sw_qlist_void_append" STYLE-WARNING: Undefined alien: "sw_qlist_int_new" STYLE-WARNING: Undefined alien: "sw_qlist_int_delete" STYLE-WARNING: Undefined alien: "sw_qlist_int_size" STYLE-WARNING: Undefined alien: "sw_qlist_int_at" STYLE-WARNING: Undefined alien: "sw_qlist_int_append" STYLE-WARNING: Undefined alien: "sw_qlist_papersize_new" STYLE-WARNING: Undefined alien: "sw_qlist_papersize_delete" STYLE-WARNING: Undefined alien: "sw_qlist_papersize_size" STYLE-WARNING: Undefined alien: "sw_qlist_papersize_at" STYLE-WARNING: Undefined alien: "sw_qlist_papersize_append" STYLE-WARNING: Undefined alien: "sw_qlist_qvariant_new" STYLE-WARNING: Undefined alien: "sw_qlist_qvariant_delete" STYLE-WARNING: Undefined alien: "sw_qlist_qvariant_size" STYLE-WARNING: Undefined alien: "sw_qlist_qvariant_at" STYLE-WARNING: Undefined alien: "sw_qlist_qvariant_append" STYLE-WARNING: Undefined alien: "sw_qlist_qbytearray_new" STYLE-WARNING: Undefined alien: "sw_qlist_qbytearray_delete" STYLE-WARNING: Undefined alien: "sw_qlist_qbytearray_size" STYLE-WARNING: Undefined alien: "sw_qlist_qbytearray_at" STYLE-WARNING: Undefined alien: "sw_qlist_qbytearray_append" STYLE-WARNING: Undefined alien: "sw_qlist_qmodelindex_new" STYLE-WARNING: Undefined alien: "sw_qlist_qmodelindex_delete" STYLE-WARNING: Undefined alien: "sw_qlist_qmodelindex_size" STYLE-WARNING: Undefined alien: "sw_qlist_qmodelindex_at" STYLE-WARNING: Undefined alien: "sw_qlist_qmodelindex_append" STYLE-WARNING: Undefined alien: "sw_qlist_qkeysequence_new" STYLE-WARNING: Undefined alien: "sw_qlist_qkeysequence_delete" STYLE-WARNING: Undefined alien: "sw_qlist_qkeysequence_size" STYLE-WARNING: Undefined alien: "sw_qlist_qkeysequence_at" STYLE-WARNING: Undefined alien: "sw_qlist_qkeysequence_append" STYLE-WARNING: Undefined alien: "sw_qlist_extraselection_new" STYLE-WARNING: Undefined alien: "sw_qlist_extraselection_delete" STYLE-WARNING: Undefined alien: "sw_qlist_extraselection_size" STYLE-WARNING: Undefined alien: "sw_qlist_extraselection_at" STYLE-WARNING: Undefined alien: "sw_qlist_extraselection_append" WARNING: redefining DISSECT:STACK in DEFUN WARNING: redefining DISSECT:RESTARTS in DEFUN WARNING: redefining DISSECT::STACK-CAPPER in DEFUN WARNING: redefining DISSECT::STACK-TRUNCATOR in DEFUN WARNING: redefining DISSECT:WITH-TRUNCATED-STACK in DEFMACRO WARNING: redefining SIMPLE-TASKS:RUNNER in DEFGENERIC WARNING: redefining QT:ENUM-EQUAL in DEFUN WARNING: redefining PRINT-OBJECT (#<STANDARD-CLASS QT:QOBJECT> #<SB-PCL:SYSTEM-CLASS COMMON-LISP:T>) in DEFMETHOD WARNING: redefining SHARED-INITIALIZE :AFTER (#<STANDARD-CLASS DEPLOY:LIBRARY> #<SB-PCL:SYSTEM-CLASS COMMON-LISP:T>) in DEFMETHOD WARNING: discarding unsupported DOCUMENTATION: doc-type COMPILER-MACRO-FUNCTION for object of type SYMBOL WARNING: discarding unsupported DOCUMENTATION: doc-type CONDITION for object of type SYMBOL #P"C:/Users/Matthew/Quicklisp/local-projects/Shinmera/halftone/"
Well, I'm out of ideas.