discuss-gnustep
[Top][All Lists]
Advanced

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

gnustep-base crash on Android


From: Mayank Maheshwari
Subject: gnustep-base crash on Android
Date: Tue, 13 May 2014 08:39:40 -0700 (PDT)
User-agent: G2/1.0

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?


reply via email to

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