discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Header organization of -base & -gui


From: David Ayers
Subject: Re: [RFC] Header organization of -base & -gui
Date: Fri, 04 Jul 2003 12:05:52 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507

Lars Sonchocky-Helldorf wrote:

It has something to do with the class and method cache of the Apple runtime, specifically with the function _class_lookupMethodAndLoadCache () in it. This function is looking up in a cache if a class is already loaded. If not it sends it (or its superclass a initialize message. If then again there is any objc message send in the initialize method, the cache will be looked up again nad because the class is not loaded you'll end up in an infinite loop. You can see how this works if you download the objc4 project from Apple (http://www.opensource.apple.com/darwinsource/tarballs/10.2.6/apsl/objc4.tar.gz, you must be registered for this, but registration is free and Apple doesn't spam you) and have a look at /objc4/runtime/objc-class.m

This boils down to: Don't send objc messages in initialize if you want to use 
the Apple runtime

This is not an option. But what is really disturbing, is that +initilalize was introduced (since +load existed), so that you *could* rely on all classes being loaded and may start sending messages.

If what you describe is the real issue, then the apple runtime is pretty broken. I hope that this is just some strange symptom of a different problem. But someone with access to OS X needs to figure this one out I guess.

Cheers,
David






reply via email to

[Prev in Thread] Current Thread [Next in Thread]