discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Android issue: NSMutableDictionary broken?


From: Ivan Vučica
Subject: Re: Android issue: NSMutableDictionary broken?
Date: Fri, 13 Jun 2014 00:34:18 +0100

Now that I have NSLog() working, it's proven its worth already.

It's good to actually store a NSMutableDictionary and not a NSMutableArray in the variable when you're trying to call -setObject:forValue:. ;-)

(Exceptions are off -- no libffi right now -- so that's why the app did not crash.)


On Wed, Jun 11, 2014 at 10:00 PM, Ivan Vučica <ivan@vucica.net> wrote:
Hi all,

Though I don't know what debug information would be useful, it's worth mentioning the issue.

Given this chunk of code where _pages is an NSMutableDictionary:

        LOGI("STORING OBJECT %p AS %s into %p", page, [currentPage UTF8String], _pages);
        [_pages setObject: page forKey: currentPage];
        [_pages setObject: @"hi" forKey: @"test"];
        if(![_pages objectForKey: @"test"])
          LOGI("Ha.");
        if(![_pages objectForKey: currentPage])
          LOGI("Saving failed?!");

I'm getting the following output:

I/native-activity( 6871): STORING OBJECT 0x77dd2d30 AS 16-16 into 0x762b5db8
I/native-activity( 6871): Ha.
I/native-activity( 6871): Saving failed?!

Any thoughts on what might cause NSMutableDictionary to go haywire like this when built for an armv7 Android target? I didn't run any tests on Android -- it's possible to do so, but slightly tricky to get regular ELFs to run on it.
--
Ivan Vučica



--
Ivan Vučica
ivan@vucica.net

reply via email to

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