[MacRuby] #724: malloc warning
#724: malloc warning -----------------------------+---------------------------------------------- Reporter: tvmoore@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- framework 'cocoa' p = NSURL.fileURLWithPath(File.expand_path("~/Desktop/test")) data = NSURL.bookmarkDataWithContentsOfURL(p, error:nil) macruby(420,0x7fff70770be0) malloc: reference count underflow for 0x2004b9800, break on auto_refcount_underflow_error to debug. -- Ticket URL: <http://www.macruby.org/trac/ticket/724> MacRuby <http://macruby.org/>
#724: malloc warning -----------------------------+---------------------------------------------- Reporter: tvmoore@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by martinlagardette@…): Hi! I can't reproduce this on my machine... Can you reproduce it each time you run this script? -- Ticket URL: <http://www.macruby.org/trac/ticket/724#comment:1> MacRuby <http://macruby.org/>
Yes every time. you must have any alias on the desktop called test though.... Terry oh and macruby 0.6 On 26/05/2010, at 9:53 AM, MacRuby wrote:
#724: malloc warning -----------------------------+---------------------------------------------- Reporter: tvmoore@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: -----------------------------+----------------------------------------------
Comment(by martinlagardette@…):
Hi!
I can't reproduce this on my machine... Can you reproduce it each time you run this script?
-- Ticket URL: <http://www.macruby.org/trac/ticket/724#comment:1> MacRuby <http://macruby.org/>
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Ah ok, I can reproduce now. The missing part was that the file needed to be an alias :-) -- Thibault Martin-Lagardette On May 25, 2010, at 15:08, Terry Moore wrote:
Yes every time. you must have any alias on the desktop called test though....
Terry
oh and macruby 0.6
On 26/05/2010, at 9:53 AM, MacRuby wrote:
#724: malloc warning -----------------------------+---------------------------------------------- Reporter: tvmoore@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: -----------------------------+----------------------------------------------
Comment(by martinlagardette@…):
Hi!
I can't reproduce this on my machine... Can you reproduce it each time you run this script?
-- Ticket URL: <http://www.macruby.org/trac/ticket/724#comment:1> MacRuby <http://macruby.org/>
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
#724: malloc warning with bookmarkDataWithContentsOfURL on aliases -----------------------------+---------------------------------------------- Reporter: tvmoore@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Description changed by martinlagardette@…: Old description:
framework 'cocoa'
p = NSURL.fileURLWithPath(File.expand_path("~/Desktop/test")) data = NSURL.bookmarkDataWithContentsOfURL(p, error:nil)
macruby(420,0x7fff70770be0) malloc: reference count underflow for 0x2004b9800, break on auto_refcount_underflow_error to debug.
New description: Create a Mac OS alias (not a symbolic link) named test on the Desktop, run the following script: {{{ #!ruby framework 'cocoa' p = NSURL.fileURLWithPath(File.expand_path("~/Desktop/test")) data = NSURL.bookmarkDataWithContentsOfURL(p, error:nil) }}} It will result in this warning: {{{ macruby(420,0x7fff70770be0) malloc: reference count underflow for 0x2004b9800, break on auto_refcount_underflow_error to debug. }}} -- -- Ticket URL: <http://www.macruby.org/trac/ticket/724#comment:2> MacRuby <http://macruby.org/>
#724: malloc warning with bookmarkDataWithContentsOfURL on aliases -----------------------------+---------------------------------------------- Reporter: tvmoore@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by martinlagardette@…): {{{ Breakpoint 1, 0x00007fff8523dc34 in auto_refcount_underflow_error () (gdb) bt #0 0x00007fff8523dc34 in auto_refcount_underflow_error () #1 0x00007fff8524ac71 in Auto::Zone::dec_refcount_small_medium () #2 0x00007fff8524c75e in Auto::Zone::block_decrement_refcount () #3 0x00007fff85235a0f in auto_zone_release () #4 0x00007fff82eaf756 in _CFRelease () #5 0x00007fff88966ec0 in _CFURLCreateBookmarkDataFromFile () #6 0x00007fff82fbf858 in +[NSURL bookmarkDataWithContentsOfURL:error:] () #7 0x000000010110071c in ?? () #8 0x00000001001364e5 in __rb_vm_dispatch [inlined] () at /Users/naixn/Documents/Projets/MacRuby/dispatcher.cpp:450 #9 0x00000001001364e5 in rb_vm_dispatch () at dispatcher.cpp:1061 #10 0x00000001011002c2 in ?? () #11 0x0000000100154c8d in rb_vm_run (fname=0x2000d69e0 "/Users/naixn/Desktop/test.rb", node=0x2000d9500, binding=0x0, inside_eval=false) at vm.cpp:3708 #12 0x000000010003f6f1 in ruby_run_node (n=0x2000d9500) at eval.c:202 #13 0x0000000100000c15 in main (argc=2, argv=0x100f1cba0, envp=0x7fff5fbff7f0) at main.cpp:40 (gdb) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/724#comment:3> MacRuby <http://macruby.org/>
#724: malloc warning with bookmarkDataWithContentsOfURL on aliases -----------------------------+---------------------------------------------- Reporter: tvmoore@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Resolution: invalid Keywords: | -----------------------------+---------------------------------------------- Changes (by martinlagardette@…): * status: new => closed * resolution: => invalid Comment: This is a bug in the OS actually: {{{ $> cat t.m #import <Foundation/Foundation.h> int main(void) { NSURL *url = [NSURL fileURLWithPath:@"/tmp/test"]; NSData *data = [NSURL bookmarkDataWithContentsOfURL:url error:nil]; printf("-> %p\n", data); return 0; } $> gcc /tmp/t.m -o /tmp/t -framework Foundation -fobjc-gc $> ./t t(61211,0x7fff70982be0) malloc: reference count underflow for 0x20000f580, break on auto_refcount_underflow_error to debug. -> 0x20000f540 $> }}} Well I say bug, but it's just a simple warning. It has been reported anyway :-). -- Ticket URL: <http://www.macruby.org/trac/ticket/724#comment:4> MacRuby <http://macruby.org/>
thanks. On 26/05/2010, at 12:15 PM, MacRuby wrote:
#724: malloc warning with bookmarkDataWithContentsOfURL on aliases -----------------------------+---------------------------------------------- Reporter: tvmoore@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Resolution: invalid Keywords: | -----------------------------+---------------------------------------------- Changes (by martinlagardette@…):
* status: new => closed * resolution: => invalid
Comment:
This is a bug in the OS actually:
{{{ $> cat t.m #import <Foundation/Foundation.h>
int main(void) { NSURL *url = [NSURL fileURLWithPath:@"/tmp/test"]; NSData *data = [NSURL bookmarkDataWithContentsOfURL:url error:nil]; printf("-> %p\n", data); return 0; } $> gcc /tmp/t.m -o /tmp/t -framework Foundation -fobjc-gc $> ./t
t(61211,0x7fff70982be0) malloc: reference count underflow for 0x20000f580, break on auto_refcount_underflow_error to debug. -> 0x20000f540 $> }}}
Well I say bug, but it's just a simple warning. It has been reported anyway :-).
-- Ticket URL: <http://www.macruby.org/trac/ticket/724#comment:4> MacRuby <http://macruby.org/>
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (3)
-
MacRuby
-
Terry Moore
-
Thibault Martin-Lagardette