[MacRuby-devel] unrecognized runtime type `{OpaqueExtAudioFile}
I'm trying to load audio data using ExtAudioFileOpenURL() in the AudioToolbox,
but seem to have a problem with the pointer gymnastics involved.
First I created a BridgeSuppport file using:
gen_bridge_metadata -f AudioToolbox -o AudioToolbox.bridgesupport
I'm then using code like this:
#load bridgesuppport file
framework 'AudioToolbox'
load_bridge_support_file
"#{File.dirname(__FILE__)}/AudioToolbox.bridgesupport"
#open audio file
fileURL = NSURL.fileURLWithPath "#{File.dirname(__FILE__)}/Blow.aiff"
fileRef = Pointer.new_with_type '^{OpaqueExtAudioFile}'
raise "Can't open audio file" unless ExtAudioFileOpenURL(fileURL,
fileRef)==0 #ok
#read audio file
ioNumberFramesPtr = Pointer.new_with_type 'I'
ioNumberFramesPtr[0] = 800
ioDataPtr = Pointer.new_with_type '^{AudioBufferList}'
raise "Can't read audio file" unless ExtAudioFileRead(fileRef[0],
ioNumberFramesPtr, ioDataPtr)==0 # error
but runnig this from xcode the last line causes:
/Users/emiltin/Desktop/builds/Debug/Waveform.app/Contents/Resources/MyView.rb:101:in
`awakeFromNib': unrecognized runtime type `{OpaqueExtAudioFile}' (TypeError)
from
/Users/emiltin/Desktop/builds/Debug/Waveform.app/Contents/Resources/rb_main.rb:11:in
`'
The problem seem to occur where I access fileRef[0]. Am I doing something wrong
here?
Thanks,
Emil
From the generated BridgeSupport file:
smime.p7s
Description: S/MIME cryptographic signature
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
[MacRuby-devel] Warnings from print operation
Hi Developers: I get the followings warning from my PrintOperation: SimpleX_ViewController.print 2010-08-15 12:25:12.609 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) beginPrologueBBox:creationDate:createdBy:fonts:forWhom:pages:title:] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.610 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) endHeaderComments] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.612 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) endPrologue] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.613 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) beginSetup] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.614 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) endSetup] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) beginPage:label:bBox:fonts:] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) beginPageSetupRect:placement:] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.616 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) addToPageSetup] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) endPageSetup] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) beginTrailer] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. 2010-08-15 12:25:12.618 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) endTrailer] was deprecated before Mac OS 10.0 and overrides of it are not being invoked anymore, starting in Mac OS 10.5. Looks like I may need to update something. Would this be a framework or a Ruby library? How would I update my system? Thanks, Bob Rice ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
[MacRuby-devel] Error on a new project
Hi, I am using OSX 10.6.4 and MAcRuby 0.6. I created a new project and just simply added to the MainWindow.nib an Image browser an then built When Running the project in Xcode I get a SIGABRT So I ended up looking in a console what happened... AndI get the following error message Any idea what I am missing or doing wrong? uncaught Objective-C/C++ exception... 2010-08-15 11:54:20.089 iWarranty[55002:903] An uncaught exception was raised 2010-08-15 11:54:20.091 iWarranty[55002:903] *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (IKImageBrowserView) 2010-08-15 11:54:20.093 iWarranty[55002:903] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (IKImageBrowserView)' *** Call stack at first throw: ( 0 CoreFoundation 0x7fff863edcc4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x7fff823ff0f3 objc_exception_throw + 45 2 CoreFoundation 0x7fff863edae7 +[NSException raise:format:arguments:] + 103 3 CoreFoundation 0x7fff863eda74 +[NSException raise:format:] + 148 4 Foundation 0x7fff8558ea86 _decodeObjectBinary + 2427 5 Foundation 0x7fff8558f805 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 6 Foundation 0x7fff8558fd45 -[NSArray(NSArray) initWithCoder:] + 462 7 Foundation 0x7fff8558eaff _decodeObjectBinary + 2548 8 Foundation 0x7fff8558df79 _decodeObject + 208 9 AppKit 0x7fff8833a47a -[NSView initWithCoder:] + 362 10 Foundation 0x7fff8558eaff _decodeObjectBinary + 2548 11 Foundation 0x7fff8558df79 _decodeObject + 208 12 AppKit 0x7fff8834883b -[NSWindowTemplate initWithCoder:] + 3824 13 Foundation 0x7fff8558eaff _decodeObjectBinary + 2548 14 Foundation 0x7fff8558f805 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 15 Foundation 0x7fff8558f248 -[NSSet(NSSet) initWithCoder:] + 447 16 Foundation 0x7fff8558eaff _decodeObjectBinary + 2548 17 Foundation 0x7fff8558df79 _decodeObject + 208 18 AppKit 0x7fff882ca55a -[NSIBObjectData initWithCoder:] + 1983 19 Foundation 0x7fff8558eaff _decodeObjectBinary + 2548 20 Foundation 0x7fff8558df79 _decodeObject + 208 21 AppKit 0x7fff882c9c89 loadNib + 146 22 AppKit 0x7fff882c91e9 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 248 23 AppKit 0x7fff882c9021 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 326 24 AppKit 0x7fff882c65a3 NSApplicationMain + 279 25 ??? 0x000101201300 0x0 + 4313846528 26 libmacruby.dylib0x00010013d81a rb_vm_dispatch + 3450 27 ??? 0x000101200630 0x0 + 4313843248 28 libmacruby.dylib0x00010014f9ac rb_vm_run + 348 29 libmacruby.dylib0x0001000431e9 ruby_run_node + 73 30 libmacruby.dylib0x00010014fcb8 macruby_main + 360 31 iWarranty 0x00010eaf main + 40 32 iWarranty 0x00010d20 start + 52 ) terminate called after throwing an instance of 'NSException' Abort trap Thanks Emmanuel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Error on a new project
I think you may have a problem with your project. Can you try to reproduce this with a Cocoa project and see if the issue arises too? -- Thibault Martin-Lagardette On Aug 15, 2010, at 13:58, Manu wrote: > > Hi, > > I am using OSX 10.6.4 and MAcRuby 0.6. I created a new project and just > simply added to the MainWindow.nib an Image browser an then built > > When Running the project in Xcode I get a SIGABRT So I ended up looking > in a console what happened... AndI get the following error message > > Any idea what I am missing or doing wrong? > > uncaught Objective-C/C++ exception... > 2010-08-15 11:54:20.089 iWarranty[55002:903] An uncaught exception was raised > 2010-08-15 11:54:20.091 iWarranty[55002:903] *** -[NSKeyedUnarchiver > decodeObjectForKey:]: cannot decode object of class (IKImageBrowserView) > 2010-08-15 11:54:20.093 iWarranty[55002:903] *** Terminating app due to > uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** > -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class > (IKImageBrowserView)' > *** Call stack at first throw: > ( > 0 CoreFoundation 0x7fff863edcc4 > __exceptionPreprocess + 180 > 1 libobjc.A.dylib 0x7fff823ff0f3 > objc_exception_throw + 45 > 2 CoreFoundation 0x7fff863edae7 > +[NSException raise:format:arguments:] + 103 > 3 CoreFoundation 0x7fff863eda74 > +[NSException raise:format:] + 148 > 4 Foundation 0x7fff8558ea86 > _decodeObjectBinary + 2427 > 5 Foundation 0x7fff8558f805 > -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 > 6 Foundation 0x7fff8558fd45 > -[NSArray(NSArray) initWithCoder:] + 462 > 7 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 8 Foundation 0x7fff8558df79 > _decodeObject + 208 > 9 AppKit 0x7fff8833a47a -[NSView > initWithCoder:] + 362 > 10 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 11 Foundation 0x7fff8558df79 > _decodeObject + 208 > 12 AppKit 0x7fff8834883b > -[NSWindowTemplate initWithCoder:] + 3824 > 13 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 14 Foundation 0x7fff8558f805 > -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 > 15 Foundation 0x7fff8558f248 > -[NSSet(NSSet) initWithCoder:] + 447 > 16 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 17 Foundation 0x7fff8558df79 > _decodeObject + 208 > 18 AppKit 0x7fff882ca55a > -[NSIBObjectData initWithCoder:] + 1983 > 19 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 20 Foundation 0x7fff8558df79 > _decodeObject + 208 > 21 AppKit 0x7fff882c9c89 loadNib + 146 > 22 AppKit 0x7fff882c91e9 > +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 248 > 23 AppKit 0x7fff882c9021 > +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 326 > 24 AppKit 0x7fff882c65a3 > NSApplicationMain + 279 > 25 ??? 0x000101201300 0x0 + > 4313846528 > 26 libmacruby.dylib0x00010013d81a > rb_vm_dispatch + 3450 > 27 ??? 0x000101200630 0x0 + > 4313843248 > 28 libmacruby.dylib0x00010014f9ac rb_vm_run + > 348 > 29 libmacruby.dylib0x0001000431e9 > ruby_run_node + 73 > 30 libmacruby.dylib0x00010014fcb8 macruby_main > + 360 > 31 iWarranty 0x00010eaf main + 40 > 32 iWarranty 0x00010d20 start + 52 > ) > terminate called after throwing an instance of 'NSException' > Abort trap > > > Thanks > > Emmanuel > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Warnings from print operation
It looks like you are using deprecated APIs from the printing Framework. These are clearly not ruby errors, but deprecated objective-c calls :-) -- Thibault Martin-Lagardette On Aug 15, 2010, at 09:44, Robert Rice wrote: > Hi Developers: > > I get the followings warning from my PrintOperation: > > SimpleX_ViewController.print > 2010-08-15 12:25:12.609 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginPrologueBBox:creationDate:createdBy:fonts:forWhom:pages:title:] was > deprecated before Mac OS 10.0 and overrides of it are not being invoked > anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.610 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endHeaderComments] was deprecated before Mac OS 10.0 and overrides of it are > not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.612 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endPrologue] was deprecated before Mac OS 10.0 and overrides of it are not > being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.613 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginSetup] was deprecated before Mac OS 10.0 and overrides of it are not > being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.614 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endSetup] was deprecated before Mac OS 10.0 and overrides of it are not being > invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginPage:label:bBox:fonts:] was deprecated before Mac OS 10.0 and overrides > of it are not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginPageSetupRect:placement:] was deprecated before Mac OS 10.0 and > overrides of it are not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.616 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > addToPageSetup] was deprecated before Mac OS 10.0 and overrides of it are not > being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endPageSetup] was deprecated before Mac OS 10.0 and overrides of it are not > being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginTrailer] was deprecated before Mac OS 10.0 and overrides of it are not > being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.618 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endTrailer] was deprecated before Mac OS 10.0 and overrides of it are not > being invoked anymore, starting in Mac OS 10.5. > > Looks like I may need to update something. Would this be a framework or a > Ruby library? How would I update my system? > > Thanks, > Bob Rice > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Warnings from print operation
Hi Thibault Martin-Lagardette: Yes, but the deprecated calls are originating from NSView. Printing had stopped working for the views in my application so I tried creating my own PrintOperation and ran it modally for my window instead of routing the print command directly to the view. Then the warnings appeared. Could my project be linked to an old framework or Ruby library? Thanks, Bob Rice On Aug 15, 2010, at 5:24 PM, Thibault Martin-Lagardette wrote: > It looks like you are using deprecated APIs from the printing Framework. > These are clearly not ruby errors, but deprecated objective-c calls :-) > > -- > Thibault Martin-Lagardette > > > > On Aug 15, 2010, at 09:44, Robert Rice wrote: > >> Hi Developers: >> >> I get the followings warning from my PrintOperation: >> >> SimpleX_ViewController.print >> 2010-08-15 12:25:12.609 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> beginPrologueBBox:creationDate:createdBy:fonts:forWhom:pages:title:] was >> deprecated before Mac OS 10.0 and overrides of it are not being invoked >> anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.610 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> endHeaderComments] was deprecated before Mac OS 10.0 and overrides of it are >> not being invoked anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.612 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> endPrologue] was deprecated before Mac OS 10.0 and overrides of it are not >> being invoked anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.613 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> beginSetup] was deprecated before Mac OS 10.0 and overrides of it are not >> being invoked anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.614 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> endSetup] was deprecated before Mac OS 10.0 and overrides of it are not >> being invoked anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> beginPage:label:bBox:fonts:] was deprecated before Mac OS 10.0 and overrides >> of it are not being invoked anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> beginPageSetupRect:placement:] was deprecated before Mac OS 10.0 and >> overrides of it are not being invoked anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.616 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> addToPageSetup] was deprecated before Mac OS 10.0 and overrides of it are >> not being invoked anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> endPageSetup] was deprecated before Mac OS 10.0 and overrides of it are not >> being invoked anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> beginTrailer] was deprecated before Mac OS 10.0 and overrides of it are not >> being invoked anymore, starting in Mac OS 10.5. >> 2010-08-15 12:25:12.618 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >> endTrailer] was deprecated before Mac OS 10.0 and overrides of it are not >> being invoked anymore, starting in Mac OS 10.5. >> >> Looks like I may need to update something. Would this be a framework or a >> Ruby library? How would I update my system? >> >> Thanks, >> Bob Rice >> >> ___ >> MacRuby-devel mailing list >> [email protected] >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Error on a new project
Did you load the ImageKit framework in your project? If not this could explain the problem here. You can manually drop the ImageKit.framework into the Xcode project, or in the rb_main.rb file, use "framework 'ImageKit'". The later is preferred since it will allow you to use the static C APIs of ImageKit in Ruby code. Laurent On Aug 15, 2010, at 1:58 PM, Manu wrote: > > Hi, > > I am using OSX 10.6.4 and MAcRuby 0.6. I created a new project and just > simply added to the MainWindow.nib an Image browser an then built > > When Running the project in Xcode I get a SIGABRT So I ended up looking > in a console what happened... AndI get the following error message > > Any idea what I am missing or doing wrong? > > uncaught Objective-C/C++ exception... > 2010-08-15 11:54:20.089 iWarranty[55002:903] An uncaught exception was raised > 2010-08-15 11:54:20.091 iWarranty[55002:903] *** -[NSKeyedUnarchiver > decodeObjectForKey:]: cannot decode object of class (IKImageBrowserView) > 2010-08-15 11:54:20.093 iWarranty[55002:903] *** Terminating app due to > uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** > -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class > (IKImageBrowserView)' > *** Call stack at first throw: > ( > 0 CoreFoundation 0x7fff863edcc4 > __exceptionPreprocess + 180 > 1 libobjc.A.dylib 0x7fff823ff0f3 > objc_exception_throw + 45 > 2 CoreFoundation 0x7fff863edae7 > +[NSException raise:format:arguments:] + 103 > 3 CoreFoundation 0x7fff863eda74 > +[NSException raise:format:] + 148 > 4 Foundation 0x7fff8558ea86 > _decodeObjectBinary + 2427 > 5 Foundation 0x7fff8558f805 > -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 > 6 Foundation 0x7fff8558fd45 > -[NSArray(NSArray) initWithCoder:] + 462 > 7 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 8 Foundation 0x7fff8558df79 > _decodeObject + 208 > 9 AppKit 0x7fff8833a47a -[NSView > initWithCoder:] + 362 > 10 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 11 Foundation 0x7fff8558df79 > _decodeObject + 208 > 12 AppKit 0x7fff8834883b > -[NSWindowTemplate initWithCoder:] + 3824 > 13 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 14 Foundation 0x7fff8558f805 > -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 > 15 Foundation 0x7fff8558f248 > -[NSSet(NSSet) initWithCoder:] + 447 > 16 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 17 Foundation 0x7fff8558df79 > _decodeObject + 208 > 18 AppKit 0x7fff882ca55a > -[NSIBObjectData initWithCoder:] + 1983 > 19 Foundation 0x7fff8558eaff > _decodeObjectBinary + 2548 > 20 Foundation 0x7fff8558df79 > _decodeObject + 208 > 21 AppKit 0x7fff882c9c89 loadNib + 146 > 22 AppKit 0x7fff882c91e9 > +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 248 > 23 AppKit 0x7fff882c9021 > +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 326 > 24 AppKit 0x7fff882c65a3 > NSApplicationMain + 279 > 25 ??? 0x000101201300 0x0 + > 4313846528 > 26 libmacruby.dylib0x00010013d81a > rb_vm_dispatch + 3450 > 27 ??? 0x000101200630 0x0 + > 4313843248 > 28 libmacruby.dylib0x00010014f9ac rb_vm_run + > 348 > 29 libmacruby.dylib0x0001000431e9 > ruby_run_node + 73 > 30 libmacruby.dylib0x00010014fcb8 macruby_main > + 360 > 31 iWarranty 0x00010eaf main + 40 > 32 iWarranty 0x00010d20 start + 52 > ) > terminate called after throwing an instance of 'NSException' > Abort trap > > > Thanks > > Emmanuel > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/ma
Re: [MacRuby-devel] Warnings from print operation
Could you show your source code? Just from what you pasted I would assume you're using deprecated APIs. Laurent On Aug 15, 2010, at 3:19 PM, Robert Rice wrote: > Hi Thibault Martin-Lagardette: > > Yes, but the deprecated calls are originating from NSView. Printing had > stopped working for the views in my application so I tried creating my own > PrintOperation and ran it modally for my window instead of routing the print > command directly to the view. Then the warnings appeared. Could my project be > linked to an old framework or Ruby library? > > Thanks, > Bob Rice > > > On Aug 15, 2010, at 5:24 PM, Thibault Martin-Lagardette wrote: > >> It looks like you are using deprecated APIs from the printing Framework. >> These are clearly not ruby errors, but deprecated objective-c calls :-) >> >> -- >> Thibault Martin-Lagardette >> >> >> >> On Aug 15, 2010, at 09:44, Robert Rice wrote: >> >>> Hi Developers: >>> >>> I get the followings warning from my PrintOperation: >>> >>> SimpleX_ViewController.print >>> 2010-08-15 12:25:12.609 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> beginPrologueBBox:creationDate:createdBy:fonts:forWhom:pages:title:] was >>> deprecated before Mac OS 10.0 and overrides of it are not being invoked >>> anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.610 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> endHeaderComments] was deprecated before Mac OS 10.0 and overrides of it >>> are not being invoked anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.612 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> endPrologue] was deprecated before Mac OS 10.0 and overrides of it are not >>> being invoked anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.613 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> beginSetup] was deprecated before Mac OS 10.0 and overrides of it are not >>> being invoked anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.614 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> endSetup] was deprecated before Mac OS 10.0 and overrides of it are not >>> being invoked anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> beginPage:label:bBox:fonts:] was deprecated before Mac OS 10.0 and >>> overrides of it are not being invoked anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> beginPageSetupRect:placement:] was deprecated before Mac OS 10.0 and >>> overrides of it are not being invoked anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.616 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> addToPageSetup] was deprecated before Mac OS 10.0 and overrides of it are >>> not being invoked anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> endPageSetup] was deprecated before Mac OS 10.0 and overrides of it are not >>> being invoked anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> beginTrailer] was deprecated before Mac OS 10.0 and overrides of it are not >>> being invoked anymore, starting in Mac OS 10.5. >>> 2010-08-15 12:25:12.618 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) >>> endTrailer] was deprecated before Mac OS 10.0 and overrides of it are not >>> being invoked anymore, starting in Mac OS 10.5. >>> >>> Looks like I may need to update something. Would this be a framework or a >>> Ruby library? How would I update my system? >>> >>> Thanks, >>> Bob Rice >>> >>> ___ >>> MacRuby-devel mailing list >>> [email protected] >>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >> >> ___ >> MacRuby-devel mailing list >> [email protected] >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Warnings from print operation
Hi Robert, (Please mail the list, not me directly.) On Aug 15, 2010, at 8:20 PM, Robert Rice wrote: > Hi Laurent: > > My application has grown to over 200 files, but I could probably create a > small project to create these errors, however, if the problem has to do with > my MacRuby or framework installation, as I suspect, then the errors might not > be reproducible on your system. Maybe. Did you see if you call these deprecated APIs by yourself in your project? Could you show the printing code at least? Also, I would check the Xcode project settings to see if you're not building for 10.5. Did these warnings just appear now? Larent > On Aug 15, 2010, at 10:51 PM, Laurent Sansonetti wrote: > >> Could you show your source code? Just from what you pasted I would assume >> you're using deprecated APIs. >> >> Laurent >> >> On Aug 15, 2010, at 3:19 PM, Robert Rice wrote: >> >>> Hi Thibault Martin-Lagardette: >>> >>> Yes, but the deprecated calls are originating from NSView. Printing had >>> stopped working for the views in my application so I tried creating my own >>> PrintOperation and ran it modally for my window instead of routing the >>> print command directly to the view. Then the warnings appeared. Could my >>> project be linked to an old framework or Ruby library? >>> >>> Thanks, >>> Bob Rice >>> >>> >>> On Aug 15, 2010, at 5:24 PM, Thibault Martin-Lagardette wrote: >>> It looks like you are using deprecated APIs from the printing Framework. These are clearly not ruby errors, but deprecated objective-c calls :-) -- Thibault Martin-Lagardette On Aug 15, 2010, at 09:44, Robert Rice wrote: > Hi Developers: > > I get the followings warning from my PrintOperation: > > SimpleX_ViewController.print > 2010-08-15 12:25:12.609 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginPrologueBBox:creationDate:createdBy:fonts:forWhom:pages:title:] was > deprecated before Mac OS 10.0 and overrides of it are not being invoked > anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.610 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endHeaderComments] was deprecated before Mac OS 10.0 and overrides of it > are not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.612 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endPrologue] was deprecated before Mac OS 10.0 and overrides of it are > not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.613 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginSetup] was deprecated before Mac OS 10.0 and overrides of it are not > being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.614 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endSetup] was deprecated before Mac OS 10.0 and overrides of it are not > being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginPage:label:bBox:fonts:] was deprecated before Mac OS 10.0 and > overrides of it are not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.615 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginPageSetupRect:placement:] was deprecated before Mac OS 10.0 and > overrides of it are not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.616 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > addToPageSetup] was deprecated before Mac OS 10.0 and overrides of it are > not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endPageSetup] was deprecated before Mac OS 10.0 and overrides of it are > not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.617 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > beginTrailer] was deprecated before Mac OS 10.0 and overrides of it are > not being invoked anymore, starting in Mac OS 10.5. > 2010-08-15 12:25:12.618 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting) > endTrailer] was deprecated before Mac OS 10.0 and overrides of it are not > being invoked anymore, starting in Mac OS 10.5. > > Looks like I may need to update something. Would this be a framework or a > Ruby library? How would I update my system? > > Thanks, > Bob Rice > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >>> >>> ___ >>> MacRuby-devel mailing list >>> [email protected] >>> http:
[MacRuby-devel] Fwd: Warnings from print operation
Hi Laurent:
Thanks for your reply. I'll try to reproduce the problem with a stripped down
version of my app - It could be useful as a sample script if it doesn't
reproduce the problem.
Far as I can tell I'm building for 10.5.
I get the warnings by running the PrintOperation modally as follows:
class SimpleX_ViewController < NSViewController
def init
if super
puts "SimpleX_ViewController"
initWithNibName( 'SimpleX', bundle:nil )
loadView()
end
self
end
# selector for printOperationDidRun is not recognized
def printOperationDidRun( printOperation, success:success,
contextInfo:info )
puts "printOperationDidRun #{ success }"
end
def print
puts "#{ self.class }.print"
printInfo = NSPrintInfo.sharedPrintInfo
puts "printInfo #{ printInfo.dictionary.inspect }"
printOperation = NSPrintOperation.printOperationWithView(
@printableView )
printOperation.runOperationModalForWindow( view().window,
delegate:self, didRunSelector:"printOperationDidRun:", contextInfo:nil )
end
end
class SimpleX_View < NSView
include DrawUtilities
def drawRect( rect )
@context = NSGraphicsContext.currentContext.graphicsPort #
returns invalid context
puts "SimpleX_View #{ @context.class }"
DrawX( bounds )
end
def beginDocument
puts "Got beginDocument"
super # Should create the graphics context but operations
returns nil for context
end
def knowsPageRange( rangePtr ) # Override pagination. Image may clip on
some printers
rangePtr[ 0 ] = NSMakeRange( 1, 1 )
true
end
def rectForPage( page ); bounds; end # Use IB layout size. page should
be 1
def locationOfPrintRect( rect ) # Called only once for printing
puts "locationOfPrintRect"
currentOperation = NSPrintOperation.currentOperation
puts "currentOperation #{ currentOperation.class }"
context = currentOperation.context
puts "context #{ currentOperation.context.class }"
if context.nil?
puts "Invalid NSPrintOperation contect"
end
puts "view #{ currentOperation.view.class }" # OK
super # super returns NSMakePoint( 0, 0 )
end
end
Thanks,
Bob Rice
Begin forwarded message:
> From: Laurent Sansonetti
> Date: August 16, 2010 12:18:21 AM EDT
> To: Robert Rice
> Cc: "MacRuby development discussions."
> Subject: Re: [MacRuby-devel] Warnings from print operation
>
> Hi Robert,
>
> (Please mail the list, not me directly.)
>
> On Aug 15, 2010, at 8:20 PM, Robert Rice wrote:
>
>> Hi Laurent:
>>
>> My application has grown to over 200 files, but I could probably create a
>> small project to create these errors, however, if the problem has to do with
>> my MacRuby or framework installation, as I suspect, then the errors might
>> not be reproducible on your system.
>
> Maybe. Did you see if you call these deprecated APIs by yourself in your
> project? Could you show the printing code at least?
>
> Also, I would check the Xcode project settings to see if you're not building
> for 10.5.
>
> Did these warnings just appear now?
>
> Larent
>
>> On Aug 15, 2010, at 10:51 PM, Laurent Sansonetti wrote:
>>
>>> Could you show your source code? Just from what you pasted I would assume
>>> you're using deprecated APIs.
>>>
>>> Laurent
>>>
>>> On Aug 15, 2010, at 3:19 PM, Robert Rice wrote:
>>>
Hi Thibault Martin-Lagardette:
Yes, but the deprecated calls are originating from NSView. Printing had
stopped working for the views in my application so I tried creating my own
PrintOperation and ran it modally for my window instead of routing the
print command directly to the view. Then the warnings appeared. Could my
project be linked to an old framework or Ruby library?
Thanks,
Bob Rice
On Aug 15, 2010, at 5:24 PM, Thibault Martin-Lagardette wrote:
> It looks like you are using deprecated APIs from the printing Framework.
> These are clearly not ruby errors, but deprecated objective-c calls :-)
>
> --
> Thibault Martin-Lagardette
>
>
>
> On Aug 15, 2010, at 09:44, Robert Rice wrote:
>
>> Hi Developers:
>>
>> I get the followings warning from my PrintOperation:
>>
>> SimpleX_ViewController.print
>> 2010-08-15 12:25:12.609 MacDriverLog-0.7[243:a0f] -[NSView(NSPrinting)
>> beginPrologueBBox:creationDate:create
Re: [MacRuby-devel] MacRuby Devel Beginner Question
Hi Jeff, Sorry for the late reply. On Aug 13, 2010, at 11:59 AM, Jeff Hemmelgarn wrote: > Alright! > > Thanks for all the help. I was able to track down the problem and have some > changes for marshal.c that I need to get back to the repository. There were > some assumptions about the sizes of types that were broken by going to 64-bit > . Excellent! > I don't know the procedures on this project. Do I need to include tests for > the fix? I am familiar with testunit but I haven't used rspec yet. Where > and how would I include tests if I write them? What documentation is normal > for the trouble ticket? How do I get the changes into the repository? > Anything else I need to know? Feel free to open a ticket on trac, describe the problem and attach your patch there. We will review and merge it once it's good. We currently only use RubySpec as a regression test suite, so if you desire, looking at the pack specs and writing a new one if applicable might be a good idea too. Laurent On Aug 11, 2010, at 6:49 PM, Laurent Sansonetti wrote: > >> Also, when debugging MacRuby it is better to use the version of libmacruby >> in the build directory, because the installer strips symbols during >> installation. From the build directory: >> >> DYLD_LIBRARY_PATH=. gdb --args ./macruby ... >> >> Also, the whole project is compiled with heavy optimizations which makes the >> debugging of certain things harder (inline functions, optimized variables, >> etc.). Sometimes it is better to debug a version of MacRuby with no >> optimization. You can build one using: >> >> rake optz_level=0 macruby >> >> HTH, >> Laurent >> >> On Aug 11, 2010, at 3:28 PM, Thibault Martin-Lagardette wrote: >> >>> Hi, >>> >>> Good to know you're motivated to get into hacking MacRuby :D >>> >>> `rb_marshal_load` is an "API", supposed to be used by extensions for >>> example. >>> If you look in `marshal.c`, you'll see that the "load" method is defined by >>> `marshal_load` (without the rb_ prefix): >>> rb_objc_define_method(*(VALUE *)rb_mMarshal, "load", marshal_load, >>> -1); >>> >>> This means that when a ruby code calls Marshal.load, it will call this >>> method. >>> To sum things up, I think you just need to set a breakpoint to >>> marshal_load, not rb_marshal_load :D >>> >>> Let us know how things work out! >>> -- >>> Thibault Martin-Lagardette >>> >>> >>> >>> On Aug 11, 2010, at 13:33, Jeff Hemmelgarn wrote: >>> Hello, First I want to thank everyone involved in the project for their efforts in bringing MacRuby to us. I love being able to use GCD with ruby! I have been on vacation for a week and finally feel like touching a computer again so I thought I would look into doing some MacRuby development. Since I have no experience with llvm and almost none with ObjectiveC, I decided to pick a low-priority, narrow focus bug to look into. That should allow me to get used to the environment without going too far into the weeds. I pretty much randomly chose #502 Marshalling large integers returns wrong value. I have downloaded and built both llvm and the latest code from the git mirror. I have been trying to reproduce the problem with macirb under gdb. I have some experience with gdb but I am getting confused trying to set a breakpoint in the Marshal package load function. It looks like MacRuby is bypassing the globally visible function rb_marshal_load and using rb_objc_define_method to export a pointer to the file local function marshal_load. The basics of the question is, how do I set a breakpoint in gdb for this function? Is this problem a result of using llvm? Will I end up needing to set a generic breakpoint in a dispatch routine with a condition looking for the selector for the load function? Thank you in advance for any help! Jeff Hemmelgarn ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >>> >>> ___ >>> MacRuby-devel mailing list >>> [email protected] >>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >> >> ___ >> MacRuby-devel mailing list >> [email protected] >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
