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

Reply via email to