Lisp HUG Maillist Archive

Why is gp:draw-image failing on my MacOS LWPE 6.1.1 ?

Hoping someone can help:

I'm running LispWorks Personal Edition 6.1.1 on Mac OS Sierra.
[ I reinstalled 6.1.1 after the original LWPE 6.1.1 died upon upgrade to Sierra]

I've had success with other drawing functions like gp:draw-rectangle, gp:draw-line etc,
but I can't get gp:draw-image to work :(

The error I get speaks of trying to "retain" a null pointer,
but it looks like the null-pointer is an OBJC null-pointer,
and I have not idea where that's coming from.

Can anyone shed light on this from the backtrace below ??

I can supply actual code if needed, but I'm hoping the backtrace will
provide a clue ....

Thanks in advance!
--Glenn


=============BEGIN BACKTRACE============
CL-USER 12 : 1 > :b
Call to ERROR
Call to OBJC::INVOKE-INTO*
Call to (METHOD GRAPHICS-PORTS::%DRAW-IMAGE (GRAPHICS-PORTS::GP-COCOA-MIXIN GRAPHICS-PORTS:IMAGE T T T T T T T T T T))
Call to GRAPHICS-PORTS:DRAW-IMAGE
Call to EVAL
Call to CAPI::CAPI-TOP-LEVEL-FUNCTION
Call to CAPI::INTERACTIVE-PANE-TOP-LOOP
Call to MP::PROCESS-SG-FUNCTION

CL-USER 13 : 1 > :v
Call to ERROR {offset 67}
  SYSTEM::ESTRING : "Invoking a method ~S on a null pointer."
  SYSTEM::EARGS   : ("retain")

CL-USER 14 : 1 > :n
Call to OBJC::INVOKE-INTO*

CL-USER 15 : 1 > :v
Call to OBJC::INVOKE-INTO* {offset 535}
  OBJC::RESULT                : NIL
  OBJC::POINTER-OR-CLASS-NAME : #<Pointer: OBJC:OBJC-OBJECT-POINTER = #x00000000>
  METHOD                      : #S(OBJC::INTERNED-OBJC-SELECTOR :NAME "retain" :SEL #<Pointer: OBJC:SEL = #x9030AA5F>)
  OBJC::ARGS                  : NIL

CL-USER 16 : 1 > :n
Call to (METHOD GRAPHICS-PORTS::%DRAW-IMAGE (GRAPHICS-PORTS::GP-COCOA-MIXIN GRAPHICS-PORTS:IMAGE T T T T T T T T T T))

CL-USER 17 : 1 > :v
Call to (METHOD GRAPHICS-PORTS::%DRAW-IMAGE (GRAPHICS-PORTS::GP-COCOA-MIXIN GRAPHICS-PORTS:IMAGE T T T T T T T T T T)) {offset 367}
  GRAPHICS-PORTS::PORT             : #<CAPI-COCOA-LIBRARY::OUTPUT-PANE-REPRESENTATION for #<CAPI:OUTPUT-PANE  2009C09B> 200E2D97>
  GRAPHICS-PORTS::IMAGE-REP        : #<GRAPHICS-PORTS:IMAGE 21934A43>
  GRAPHICS-PORTS::TO-X             : 100
  GRAPHICS-PORTS::TO-Y             : 100
  GRAPHICS-PORTS::TO-WIDTH         : 100
  GRAPHICS-PORTS::TO-HEIGHT        : 100
  GRAPHICS-PORTS::FROM-X           : 0
  GRAPHICS-PORTS::FROM-Y           : 0
  GRAPHICS-PORTS::FROM-WIDTH       : 100
  GRAPHICS-PORTS::FROM-HEIGHT      : 100
  GRAPHICS-PORTS::USE-SOURCE-ALPHA : T
  GRAPHICS-PORTS::GLOBAL-ALPHA     : NIL

CL-USER 18 : 1 > :n
Call to GRAPHICS-PORTS:DRAW-IMAGE

CL-USER 19 : 1 > :v
Call to GRAPHICS-PORTS:DRAW-IMAGE {offset 906}
  GRAPHICS-PORTS::PORT             : #<CAPI:OUTPUT-PANE  2009C09B>
  GRAPHICS-PORTS:IMAGE             : #<GRAPHICS-PORTS:IMAGE 21934A43>
  GRAPHICS-PORTS::TO-X             : 100
  GRAPHICS-PORTS::TO-Y             : 100
  GRAPHICS-PORTS::ARGS             : NIL
  GRAPHICS-PORTS:TRANSFORM         : NIL
  GRAPHICS-PORTS::FROM-X           : 0
  GRAPHICS-PORTS::FROM-Y           : 0
  GRAPHICS-PORTS::TO-WIDTH         : 100
  GRAPHICS-PORTS::TO-HEIGHT        : 100
  GRAPHICS-PORTS::FROM-WIDTH       : 100
  GRAPHICS-PORTS::FROM-HEIGHT      : 100
  GRAPHICS-PORTS::USE-SOURCE-ALPHA : T
  GRAPHICS-PORTS::GLOBAL-ALPHA     : NIL

===================================

Re: Why is gp:draw-image failing on my MacOS LWPE 6.1.1 ?

Hi, 

after an update of Mac OS X (I can't remember which), gp:draw-image and some other drawing functions stopped working when called outside a redraw callback.

Michal

> 24. 4. 2017 v 21:52, Glenn Iba <giba@alum.mit.edu>:
> 
> Hoping someone can help:
> 
> I'm running LispWorks Personal Edition 6.1.1 on Mac OS Sierra.
> [ I reinstalled 6.1.1 after the original LWPE 6.1.1 died upon upgrade to Sierra]
> 
> I've had success with other drawing functions like gp:draw-rectangle, gp:draw-line etc,
> but I can't get gp:draw-image to work :(
> 
> The error I get speaks of trying to "retain" a null pointer,
> but it looks like the null-pointer is an OBJC null-pointer,
> and I have not idea where that's coming from.
> 
> Can anyone shed light on this from the backtrace below ??
> 
> I can supply actual code if needed, but I'm hoping the backtrace will
> provide a clue ...
> 
> Thanks in advance!
> --Glenn
> 
> 
> =============BEGIN BACKTRACE============
> CL-USER 12 : 1 > :b
> Call to ERROR
> Call to OBJC::INVOKE-INTO*
> Call to (METHOD GRAPHICS-PORTS::%DRAW-IMAGE (GRAPHICS-PORTS::GP-COCOA-MIXIN GRAPHICS-PORTS:IMAGE T T T T T T T T T T))
> Call to GRAPHICS-PORTS:DRAW-IMAGE
> Call to EVAL
> Call to CAPI::CAPI-TOP-LEVEL-FUNCTION
> Call to CAPI::INTERACTIVE-PANE-TOP-LOOP
> Call to MP::PROCESS-SG-FUNCTION
> 
> CL-USER 13 : 1 > :v
> Call to ERROR {offset 67}
>   SYSTEM::ESTRING : "Invoking a method ~S on a null pointer."
>   SYSTEM::EARGS   : ("retain")
> 
> CL-USER 14 : 1 > :n
> Call to OBJC::INVOKE-INTO*
> 
> CL-USER 15 : 1 > :v
> Call to OBJC::INVOKE-INTO* {offset 535}
>   OBJC::RESULT                : NIL
>   OBJC::POINTER-OR-CLASS-NAME : #<Pointer: OBJC:OBJC-OBJECT-POINTER = #x00000000>
>   METHOD                      : #S(OBJC::INTERNED-OBJC-SELECTOR :NAME "retain" :SEL #<Pointer: OBJC:SEL = #x9030AA5F>)
>   OBJC::ARGS                  : NIL
> 
> CL-USER 16 : 1 > :n
> Call to (METHOD GRAPHICS-PORTS::%DRAW-IMAGE (GRAPHICS-PORTS::GP-COCOA-MIXIN GRAPHICS-PORTS:IMAGE T T T T T T T T T T))
> 
> CL-USER 17 : 1 > :v
> Call to (METHOD GRAPHICS-PORTS::%DRAW-IMAGE (GRAPHICS-PORTS::GP-COCOA-MIXIN GRAPHICS-PORTS:IMAGE T T T T T T T T T T)) {offset 367}
>   GRAPHICS-PORTS::PORT             : #<CAPI-COCOA-LIBRARY::OUTPUT-PANE-REPRESENTATION for #<CAPI:OUTPUT-PANE  2009C09B> 200E2D97>
>   GRAPHICS-PORTS::IMAGE-REP        : #<GRAPHICS-PORTS:IMAGE 21934A43>
>   GRAPHICS-PORTS::TO-X             : 100
>   GRAPHICS-PORTS::TO-Y             : 100
>   GRAPHICS-PORTS::TO-WIDTH         : 100
>   GRAPHICS-PORTS::TO-HEIGHT        : 100
>   GRAPHICS-PORTS::FROM-X           : 0
>   GRAPHICS-PORTS::FROM-Y           : 0
>   GRAPHICS-PORTS::FROM-WIDTH       : 100
>   GRAPHICS-PORTS::FROM-HEIGHT      : 100
>   GRAPHICS-PORTS::USE-SOURCE-ALPHA : T
>   GRAPHICS-PORTS::GLOBAL-ALPHA     : NIL
> 
> CL-USER 18 : 1 > :n
> Call to GRAPHICS-PORTS:DRAW-IMAGE
> 
> CL-USER 19 : 1 > :v
> Call to GRAPHICS-PORTS:DRAW-IMAGE {offset 906}
>   GRAPHICS-PORTS::PORT             : #<CAPI:OUTPUT-PANE  2009C09B>
>   GRAPHICS-PORTS:IMAGE             : #<GRAPHICS-PORTS:IMAGE 21934A43>
>   GRAPHICS-PORTS::TO-X             : 100
>   GRAPHICS-PORTS::TO-Y             : 100
>   GRAPHICS-PORTS::ARGS             : NIL
>   GRAPHICS-PORTS:TRANSFORM         : NIL
>   GRAPHICS-PORTS::FROM-X           : 0
>   GRAPHICS-PORTS::FROM-Y           : 0
>   GRAPHICS-PORTS::TO-WIDTH         : 100
>   GRAPHICS-PORTS::TO-HEIGHT        : 100
>   GRAPHICS-PORTS::FROM-WIDTH       : 100
>   GRAPHICS-PORTS::FROM-HEIGHT      : 100
>   GRAPHICS-PORTS::USE-SOURCE-ALPHA : T
>   GRAPHICS-PORTS::GLOBAL-ALPHA     : NIL
> 
> ===================================


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Updated at: 2020-12-10 08:31 UTC