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: David Chisnall
Subject: Re: crash in NSPathUtilies / UserDefaults (from PikoPixel)
Date: Sat, 24 Oct 2015 10:43:18 +0100

On 23 Oct 2015, at 18:21, Josh Freeman <address@hidden> wrote:
> 
>   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):
> 
> /*
>    if (!selector || ![NSObject respondsToSelector: selector])
>    {
>        NSLog(@"ERROR: Invalid NSObject selector, %@, in "
>                "PPAppUtils_PerformNSObjectSelectorAfterAppLoads()",
>                (selector) ? NSStringFromSelector(selector) : @"NULL");
> 
>        goto ERROR;
>    }
> */

There should be no problem with using -respondsToSelector: in +load for an 
NSObject subclass (it’s an NSObject method, not provided by a category).

The problem is in the NSLog, which depends on NSString, NSLocale, and various 
other classes.

David




-- Sent from my IBM 1620




reply via email to

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