[MacRuby-devel] malloc error

Laurent Sansonetti lsansonetti at apple.com
Mon Jul 26 18:29:48 PDT 2010


Hi Robert,

On Jul 26, 2010, at 6:18 PM, Robert Rice wrote:

> MacRuby 0.6 is working well for me but I recently started getting the following malloc error while using the custom page size dialog in Page Setup:
> 
> MacRuby 0.6 Release(774,0x7fff7045cc20) malloc: reference count underflow for 0x20275e080, break on auto_refcount_underflow_error to debug.
> MacRuby 0.6 Release(774,0x7fff7045cc20) malloc: reference count underflow for 0x202644e40, break on auto_refcount_underflow_error to debug.
> MacRuby 0.6 Release(774,0x7fff7045cc20) malloc: reference count underflow for 0x20083b6c0, break on auto_refcount_underflow_error to debug.
> 
> This bug generally doesn't cause my MacRuby app to crash but it does crash audio and video streaming applications such as iTunes and EyeTV.
> 
> Is this a known bug?

It may have been fixed in trunk. If you still reproduce the problem with trunk, it would be nice to get a proper backtrace from auto_refcount_underflow_error:

1) Build MacRuby trunk using `rake'. Do not install.

2) Inside the MacRuby build directory, run

DYLD_LIBRARY_PATH=. gdb --args /Path/To/YourApp.app/Contents/MacOS/YourApp 

3. Inside gdb, type

b auto_refcount_underflow_error
r

Your program should run. Then, do whatever necessary until gdb breaks on auto_refcount_underflow_error. Then, please type

thread apply all bt

and paste the result here.

Thanks :-)

Laurent


More information about the MacRuby-devel mailing list