Hello, It's possible that geteuid() does not exist on Android. I don't know why GNUstep's trying to initialize NSUserDefaults.
You should not be using that PDF. http://bitbucket.org/ivucica/thegrandexperiment is messy, but better, as a starter project. Next, you shouldn't be afraid to figure out a way to fix an issue, for example by not calling geteuid() on Android, but without affecting anyone on other platform. If you fling a patch to the appropriate mailing list, someone may import the appropriate patch. Finally, I've recently began working on a small toy project and the whole thing works for me. On Tue May 13 2014 at 4:58:04 PM, Mayank Maheshwari <[email protected]> wrote: > Hi Ivan, > > I compiled gnustep-base for Android using your code from > https://bitbucket.org/ivucica/gnustep-android. > I picked up your helloJni Application from http://ivan.vucica.net/public/ > android-objc/Android%20Obj-C.pdf and modified provideString to call > NSDate instead of returning an static string. FYI hello-jni.m was compiled > as part of gnustep-base itself. > > This is how my provideString function looks (ignore useless variable tmp) > > -(char*)provideString > { > > NSDate *date = [NSDate date]; > //return "This is from provideString function"; > char *tmp = malloc(1024*sizeof(char)); > return tmp; > } > > > > When I execute helloJni on an Android phone application crash in > NSPathUtilities.m. Using the crash dump I found that application crash at a > line where geteuid is being invoked. > > File:NSPathUtilities.m > Function: NSString * NSUserName(void) > > Line: int uid = geteuid(); > > Called From > > NSUserDefaults.m > Function: - (id) init > Line : return [self initWithUser: NSUserName()]; > > > > Can you please give me some pointer on possible cause of this issue? > _______________________________________________ > Discuss-gnustep mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/discuss-gnustep >
_______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
