Hi,

On 2015-10-23 19:21:48 +0200 Josh Freeman <gnustep_li...@twilightedge.com> wrote:

Hi Riccardo,

From the stack trace, it looks like the recursion begins with the call to [NSObject respondsToSelector: selector] in PPAppBootUtils_PerformNSObjectSelectorAfterAppLoads() (PPAppBootUtilities.m:42).

Apparently on NetBSD, +load methods are called earlier in the app- bootup process than on Linux & Mac - on those platforms, I hadn't seen any issues from calling respondsToSelector: in +load.

This'll be fixed in the next release of PikoPixel by delaying the respondsToSelector: check until after the app loads. In the meantime, you can probably get PikoPixel to run on NetBSD by commenting out the selector check (PPAppBootUtilities.m, lines 42-49):

As both Richard and David suggest - you should do less stuff in +load if possible. Moving to +initialize might help. Of course you can't do that with categories, but it is much better supported. I tried looking up +load and +inizialize and apparently... +load is asking for trouble, it is called very early.



/*
     if (!selector || ![NSObject respondsToSelector: selector])
     {
         NSLog(@"ERROR: Invalid NSObject selector, %@, in "
                 "PPAppUtils_PerformNSObjectSelectorAfterAppLoads()",
(selector) ? NSStringFromSelector(selector) : @"NULL");

         goto ERROR;
     }
*/

I will try that on NetBSD next week, so we see if that helps. My goal is actually to check menus and the patch of Fred :)

Riccardo


_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to