Projects

Ticket #18 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

NSZeroSize Causes Abort

Reported by: alloye@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.1
Component: MacRuby Keywords:
Cc:

Description

In r36, accessing NSZeroSize prior to creating an instance of NSSize causes the interpreter to abort with an assertion failure. This behavior is unexpected and breaks one of the examples in the MacRubyTutorial.

[~]: /usr/local/bin/irb --simple-prompt
>> framework 'Foundation'
=> true
>> point = NSPoint.new(0, 0)
=> #<NSPoint x=0.0 y=0.0>
>> rect = NSRect.new(point, NSZeroSize)
Assertion failed: (bs_boxed->ffi_type != NULL), function rb_bs_boxed_new_from_ocdata, file objc.m, line 532.
Abort trap

[~]: /usr/local/bin/irb --simple-prompt
>> framework 'Foundation'
=> true
>> point = NSPoint.new(0, 0)
=> #<NSPoint x=0.0 y=0.0>
>> size = NSSize.new(0, 0)
=> #<NSSize width=0.0 height=0.0>
>> rect = NSRect.new(point, NSZeroSize)
(irb):4: warning: already initialized constant NSZeroSize
=> #<NSRect origin=#<NSPoint x=0.0 y=0.0> size=#<NSSize width=0.0 height=0.0>>

Attachments

ruby_2008-03-01-224908_Waynes-iMac.crash Download (8.6 KB) - added by alloye@… 4 years ago.
Crash Report

Change History

Changed 4 years ago by alloye@…

Crash Report

Changed 4 years ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed

Fixed in r37/trunk.

Changed 4 years ago by lsansonetti@…

  • milestone changed from MacRuby 1.0 to MacRuby 0.1
Note: See TracTickets for help on using tickets.