gnustep-dev
[Top][All Lists]
Advanced

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

Re: crash in NSPathUtilies / UserDefaults (from PikoPixel)


From: Riccardo Mottola
Subject: Re: crash in NSPathUtilies / UserDefaults (from PikoPixel)
Date: Sat, 24 Oct 2015 19:39:19 +0200
User-agent: GNUMail (Version 1.2.2)

Hi,

On 2015-10-23 19:21:48 +0200 Josh Freeman <address@hidden> 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




reply via email to

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