[MacRuby-devel] Memory allocation problem
Here is a simple test case to show the problem.
macirb
>> str = [10].pack('N').unpack('g')[0].to_s
macruby(29176,0x7fff70513720) malloc: *** free() called with
0x8004a5c60 with refcount 0
macruby(29176,0x7fff70513720) malloc: reference count underflow for
0x8004a5c60, break on auto_refcount_underflow_error to debug.
macruby(29176,0x7fff70513720) malloc: *** free() called with
0x8004a5c40 with refcount 0
macruby(29176,0x7fff70513720) malloc: reference count underflow for
0x8004a5c40, break on auto_refcount_underflow_error to debug.
=> "1.40129846432482e-44"
macruby -v
MacRuby version 0.4 (ruby 1.9.0 2008-06-03) [universal-darwin9.0,
x86_64]
Taken from trunk on 30 Jan 09.
Dave.
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
[MacRuby-devel] µgem (notice I am using your G reek character!) question
Hi Matt, First of all, thank you so much for working on the gem issue with macruby. There is no more important work in the world, er universe, right now than this--I mean it, from the bottom of my frustrated-at-not-being-able-to-use-sqlite3-heart. I am hoping you could comment on why sqlite3-ruby seems to install, but still isn't functional. Here is how I did with my first try at using µgem. 1. Installing rake via µgem appears to have worked! (this is hard to verify because "require 'rake'" works in macirb even before installing with µgem). 2. Installing sqlite3 via µgem seems to have worked! (BUT "require 'sqlite3'" STILL FAILS in macirb). How do you test gems installed via µgem? Where do they install to? Does that path need to be added to the $: for macirb to find them? Sorry for the basic questions... Thanks, Tim Here is my terminal screen: Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/bin> sudo ./µgem install rake [info] Installing `rake-0.8.3' Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/bin> which rake /usr/bin/rake Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/bin> macgem which rake /Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.0/rake.rb Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/bin> sudo ./µgem install sqlite3-ruby Password: [info] Installing `sqlite3-ruby-1.2.4' Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/bin> macgem which sqlite3 Can't find sqlite3 Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/bin> macgem which sqlite3-ruby Can't find sqlite3-ruby Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/bin> macgem query --local *** LOCAL GEMS *** alloy-microgem (0.2.0) ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] µgem (notice I am using your G reek character!) question
Hi Tim, I think you meant to direct your question at me rather then Matt, but since you're using the Greek character you are forgiven for anything ;-) So the problem with sqlite3 is that it requires a C extension, which is one of the things not yet supported by MicroGem. I don't think it's perticualiary hard to get that to work though. However, I won't have much time to look at it these coming days, so if you would like to get this to work you'll have to get your hands dirty. Since MicroGem is all about achieving goals in a as simple as possible way, I guess you could see what kind of commands you'd have to execute in the terminal to install the sqlite3-ruby library by hand and adding a compile method to Gem::MicroGem::Installer which executes these commands. I hope this helps you further, let me know if you have any questions. Cheers, Eloy On 13 feb 2009, at 18:35, Tim Rand wrote: Hi Matt, First of all, thank you so much for working on the gem issue with macruby. There is no more important work in the world, er universe, right now than this--I mean it, from the bottom of my frustrated-at-not-being- able-to-use-sqlite3-heart. I am hoping you could comment on why sqlite3-ruby seems to install, but still isn't functional. Here is how I did with my first try at using µgem. 1. Installing rake via µgem appears to have worked! (this is hard to verify because "require 'rake'" works in macirb even before installing with µgem). 2. Installing sqlite3 via µgem seems to have worked! (BUT "require 'sqlite3'" STILL FAILS in macirb). How do you test gems installed via µgem? Where do they install to? Does that path need to be added to the $: for macirb to find them? Sorry for the basic questions... Thanks, Tim Here is my terminal screen: Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/ bin> sudo ./µgem install rake [info] Installing `rake-0.8.3' Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/ bin> which rake /usr/bin/rake Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/ bin> macgem which rake /Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/ 1.9.0/rake.rb Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/ bin> sudo ./µgem install sqlite3-ruby Password: [info] Installing `sqlite3-ruby-1.2.4' Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/ bin> macgem which sqlite3 Can't find sqlite3 Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/ bin> macgem which sqlite3-ruby Can't find sqlite3-ruby Tim:~/Documents/References/Technical/Ruport Book and pics/microgem/ bin> macgem query --local *** LOCAL GEMS *** alloy-microgem (0.2.0) ___ 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] Another Cucumber Related Bug
Fixed in r813, thanks for reporting. Laurent On Feb 12, 2009, at 11:41 AM, M. Scott Ford wrote: Even more data. The following code block also segfaults. It looks like the issue is the cast of ary to a CFMutableArrayRef. But that is where I am stumped, because I am not sure what alternatives there are. Any help? fred = Module.new args = ['a'] args.extend(fred) args.replace(['a', 'b']) On Feb 12, 2009, at 2:01 PM, M. Scott Ford wrote: One more piece of data. The module that is being extended does not matter. The following block dies the same way. fred = Module.new args = [] args.extend(fred) args.clear ___ 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] Bug: NSValueTransformer receivers NSCFNumber, not fixnum
Hi Brian,
This is currently a well-known limitation of MacRuby, we will address
it in the future. In the meantime, you might have to work-around it by
doing this extra check.
Laurent
On Feb 12, 2009, at 7:03 AM, Brian Marick wrote:
Is this a bug? I don't see anything quite like it in Trac.
I have a binding to a button's state property. Here's the binding:
@comboBox.bind 'enabled',
toObject: @button,
withKeyPath: 'state',
options: {
NSValueTransformerBindingOption =>
OffStateMeansTrueTransformer.alloc.init
}
At the point the binding is made, the state of the button is a
fixnum 0.
The value transformer is immediately called to set the starting
value. Here's the transformedValue code:
def transformedValue(state)
puts "state -> bool transforming #{state.inspect}"
# prints #
# state.intValue is 0
Because of this, I have to cast the state before making comparisons:
case state.intValue
when NSOffState then true
when NSOnState then false
else
raise "The value to transform should be either NSOffState or
NSOnState."
end
If this is a bug, I'll write a testcase.
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
___
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] Memory allocation problem
Hi Dave,
Could you file a bug on the tracker regarding this problem?
Thanks in advance,
Laurent
On Feb 13, 2009, at 5:51 AM, Dave Baldwin wrote:
Here is a simple test case to show the problem.
macirb
>> str = [10].pack('N').unpack('g')[0].to_s
macruby(29176,0x7fff70513720) malloc: *** free() called with
0x8004a5c60 with refcount 0
macruby(29176,0x7fff70513720) malloc: reference count underflow for
0x8004a5c60, break on auto_refcount_underflow_error to debug.
macruby(29176,0x7fff70513720) malloc: *** free() called with
0x8004a5c40 with refcount 0
macruby(29176,0x7fff70513720) malloc: reference count underflow for
0x8004a5c40, break on auto_refcount_underflow_error to debug.
=> "1.40129846432482e-44"
macruby -v
MacRuby version 0.4 (ruby 1.9.0 2008-06-03) [universal-darwin9.0,
x86_64]
Taken from trunk on 30 Jan 09.
Dave.
___
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
