Opened 5 years ago

Last modified 3 years ago

#1255 new defect

objc:load-framework does not call ccl::register-objc-init-messages properly

Reported by: rongarret Owned by:
Priority: major Milestone:
Component: Objective-C Bridge Version: trunk
Keywords: Cc:

Description

objc:load-framework does not properly initialize the framework's init messages, so make-instance fails on newly loaded objc classes. e.g.:

Welcome to Clozure Common Lisp Version 1.10-r16304M  (DarwinX8664)!
? (objc:load-framework "Quartz" :quartz)
NIL
? (make-instance ns:pdf-document :with-url
    (make-instance ns:ns-url :with-string
      #@"http://www.flownet.com/ron/specials.pdf"))
#<PDF-DOCUMENT PDFDocument, number of pages: 0   <-- NOTE zero pages
 (#x608000015350)>

;;; Calling ccl::register-objc-init-messages manually fixes the problem

? (ccl::register-objc-init-messages)
NIL
? (make-instance ns:pdf-document :with-url
    (make-instance ns:ns-url :with-string
      #@"http://www.flownet.com/ron/specials.pdf"))
#<PDF-DOCUMENT PDFDocument, number of pages: 9
 (#x60000001BB20)>

? 

NOTE: load-framework does call register-objc-init-messages, but apparently not in the correct sequence.

Change History (1)

comment:1 Changed 3 years ago by rme

  • Milestone Clozure CL 1.10 deleted

Milestone Clozure CL 1.10 deleted

Note: See TracTickets for help on using tickets.