It looks like it's much lower level than that:

#import <Foundation/Foundation.h>
int main()
{
    @autoreleasepool {
    NSString *testString = nil;
    testString = [NSString stringWithUTF8String:"Hello World"];
    NSMutableArray* arr = [NSMutableArray arrayWithObject:testString];
    [arr addObject:testString];
    int length = [arr count];
    printf("The length: %d\n", length);
    }
}

The length: 0



On Thu, Jul 25, 2013 at 4:46 AM, David Chisnall <[email protected]
> wrote:

> If it's crashing in the message send, then it is most likely that it is
> sending an invalid message.
>
> Because this is a +load method, it may be that the class in question is
> not yet loaded.  It is undefined behaviour to refer to any classes that are
> not superclasses of the current class in a +load method, so this looks like
> a bug.
>
> David
>
> On 25 Jul 2013, at 02:40, Doug Warren <[email protected]> wrote:
>
> > After David's suggestion last week with property meta data being lost
> without the latest objc2 and clang, I rebuilt everything around
> -fobjc-runtime=gnustep-1.7 and clang3.3, but now I crash with invoking a
> +load:
> >
> > #0  0x4caf1880 in objc_msgSend_fpret () from
> /data/testnations.git/android/obj/local/armeabi-v7a/libobjc.so
> > #1  0x4de0e23c in +[UIImage(UIPrivate) load] (self=0x4e338990,
> _cmd=0x2a16c330) at /data/test.git/lib/ZIKit//UIKit/UIImage+UIPrivate.m:41
> > #2  0x4caf2224 in objc_send_load_message (class=0x4e338990) at
> class_table.c:58
> > #3  0x4caf31fc in objc_resolve_class (cls=0x4e338990) at
> class_table.c:249
> > #4  0x4caf3350 in objc_resolve_class_links () at class_table.c:269
> > #5  0x4caf8250 in __objc_exec_class (module=<optimized out>) at
> loader.c:133
> > #6  0x4de11e98 in .objc_load_function () from
> /data/test.git/android/obj/local/armeabi-v7a/libTest.so
> > #7  0x40003274 in _start () from
> /data/test.git/android/obj/local/armeabi-v7a/linker
> > #8  0x400050ce in ?? () from
> /data/test.git/android/obj/local/armeabi-v7a/linker
> >
> > The line in question is:
> >     imageCache = [NSMutableDictionary alloc];
> >
> > So I assume it is something incredibly basic, but as it's calling into
> an arm assembly function I don't really have the expertise to debug it.
>  Any assistance or pointers would be appreciated.
> >
> >
> > _______________________________________________
> > Gnustep-dev mailing list
> > [email protected]
> > https://lists.gnu.org/mailman/listinfo/gnustep-dev
>
>
_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to