[MacRuby] #703: Call AudioDeviceCreateIOProcID() cause assertion failed
#703: Call AudioDeviceCreateIOProcID() cause assertion failed -----------------------------------+---------------------------------------- Reporter: nagachika00@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- I try to CoreAudio application by MacRuby and met some difficulties. Code: {{{ framework "CoreAudio" ptr = Pointer.new("^^?") callback = Proc.new{|*args| } p AudioDeviceCreateIOProcID(0, callback, nil, ptr) }}} Result is: {{{ MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64] unknown: warning: bs: CF type `^{__CFBundle=}' already defined unknown: warning: bs: enum `FALSE' already defined unknown: warning: bs: enum `TRUE' already defined Assertion failed: (len < buflen), function GetFirstType, file objc.h, line 159. }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/703> MacRuby <http://macruby.org/>
#703: Call AudioDeviceCreateIOProcID() cause assertion failed -----------------------------------+---------------------------------------- Reporter: nagachika00@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by lsansonetti@…): This assertion happens when compiling the stub for this C function, apparently the signature is too big. {{{ (gdb) fr 3 #3 0x000000010010e378 in RoxorCompiler::compile_stub (this=0x103000400, types=0x102a737d8 "iI<iI^{AudioTimeStamp=dQdQ{SMPTETime=ssIIIssss}II}^{AudioBufferList=I[1{AudioBuffer=II^v}]}^{AudioTimeStamp=dQdQ{SMPTETime=ssIIIssss}II}^{AudioBufferList=I[1{AudioBuffer=II^v}]}^{AudioTimeStamp=dQdQ{S"..., variadic=false, min_argc=4, is_objc=false) at objc.h:159 159 assert(len < buflen); (gdb) p types $1 = 0x102a737d8 "iI<iI^{AudioTimeStamp=dQdQ{SMPTETime=ssIIIssss}II}^{AudioBufferList=I[1{AudioBuffer=II^v}]}^{AudioTimeStamp=dQdQ{SMPTETime=ssIIIssss}II}^{AudioBufferList=I[1{AudioBuffer=II^v}]}^{AudioTimeStamp=dQdQ{S"... }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/703#comment:1> MacRuby <http://macruby.org/>
#703: Call AudioDeviceCreateIOProcID() cause assertion failed -----------------------------------+---------------------------------------- Reporter: nagachika00@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------------+---------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: Should be fixed in r4067. Note that I had to change a little bit your example (the Pointer.new type). {{{ $ cat t.rb framework "CoreAudio" ptr = Pointer.new("^?") callback = Proc.new{|*args| } p AudioDeviceCreateIOProcID(0, callback, nil, ptr) $ ./miniruby t.rb 560227702 }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/703#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby