[MacRuby-devel] malloc error: GC operation on unregistered thread

Michael Jackson mjijackson at gmail.com
Tue Jul 27 13:11:40 PDT 2010


Hi Laurent,

The only framework I'm using up to this point is WebKit, and it
appears that is the problem. Here's the result I get when I set the
breakpoint:

(gdb) bt
#0  0x00007fff881d6c64 in auto_zone_thread_registration_error ()
#1  0x00007fff881d69aa in Auto::Zone::registered_thread ()
#2  0x00007fff881cfdf0 in auto_zone_allocate_object ()
#3  0x00007fff837d1dc5 in _CFRuntimeCreateInstance ()
#4  0x00007fff837d410f in __CFStringCreateImmutableFunnel3 ()
#5  0x00007fff837d8ef6 in CFStringCreateWithCharacters ()
#6  0x00007fff85e54663 in WebCore::fileSystemRepresentation ()
#7  0x00007fff85e544da in WebCore::makeAllDirectories ()
#8  0x00007fff85e542f0 in WebCore::IconDatabase::iconDatabaseSyncThread ()
#9  0x00007fff841bb456 in _pthread_start ()
#10 0x00007fff841bb309 in thread_start ()

Is there any way around this? Perhaps I could use a later version of
WebKit? I'm not sure what version I'm using now (and not sure how to
find out either).

--
Michael Jackson
http://mjijackson.com
@mjijackson



On Tue, Jul 27, 2010 at 1:41 PM, Laurent Sansonetti
<lsansonetti at apple.com> wrote:
> Hi Michael,
>
> It's likely not a problem in your code neither in MacRubyi (I hope!), but in a framework you use. This warning typically happen when a native thread makes use of the GC without being registered. Do you use any 3rd party framework in your app?
>
> In any case, try setting a breakpoint on auto_zone_thread_registration_error in Xcode, run your app, and once it breaks type "bt". It should tell you where exactly the problem is.
>
> Laurent
>
> On Jul 27, 2010, at 9:08 AM, Michael Jackson wrote:
>
>> Hi all,
>>
>> I'm getting a malloc error every time I run my app. Here's what I'm
>> getting in the console:
>>
>> Running…
>> Bottlefly(45475,0x116a20000) malloc: *** auto malloc[45475]: error: GC
>> operation on unregistered thread. Thread registered implicitly. Break
>> on auto_zone_thread_registration_error() to debug.
>>
>> Being a Ruby developer and not familiar with C debugging techniques,
>> I'm a bit lost as to what to do to track down this bug. I noticed
>> there's another thread going on right now, but with a slightly
>> different error. Does this seem like something that may be fixed in
>> trunk?
>>
>> --
>> Michael Jackson
>> http://mjijackson.com
>> @mjijackson
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>


More information about the MacRuby-devel mailing list