[fpc-pascal] Android calling JNI functions crash

2011-02-14 Thread de_jean_7777
Under Android I've tried running my native programs which works great. However, If I try to call any of the JNI functions as received with env (PJNIEnv, as the first argument of any native JNI function) I get a crash. I've checked the pointers and they are not nil, but from what I've been able

Re: [fpc-pascal] Android calling JNI functions crash

2011-02-14 Thread de_jean_7777
I've also forgot to mention the crosscompiler is a i386-win (under XP). On 14.2.2011 18:28, de_jean_ wrote: Under Android I've tried running my native programs which works great. However, If I try to call any of the JNI functions as received with env (PJNIEnv, as the first argum

Re: [fpc-pascal] Android calling JNI functions crash

2011-02-14 Thread de_jean_7777
On 14.2.2011. 21:39, Felipe Monteiro de Carvalho wrote: I use eabi=5 (aka ARMv5), just in case this is the problem. But I don't use JNI. I've tried 4 different toolchains: CodeSourcery ones, NDK ones (ld crashes), WinARM (cannot get it to work, something about different EABI's when linking),

Re: [fpc-pascal] Android calling JNI functions crash

2011-02-17 Thread de_jean_7777
On 15.2.2011 9:57, Felipe Monteiro de Carvalho wrote: No idea, I always use Linux, but if no-one has a better idea, I would suggest that you try first using the linux cross-compiler, just to check if the crash is really related to the binutils. There are some instructions here: http://wiki.lazar

[fpc-pascal] Ansistrings under Android

2011-02-22 Thread de_jean_7777
Now that I have a working fpc crosscompiler for Android, and all the code runs ok, I encountered another problem. Namely working with ansistrings causes crashes. For example, in a simple test, calling the str() routine will cause a crash due to a run-time 216 error (general protection fault). I

Re: [fpc-pascal] Ansistrings under Android

2011-02-22 Thread de_jean_7777
On 22.2.2011. 19:34, Andrew Haines wrote: Not sure if this is the case for you but I started writing a program for arm wince device and I had some trouble because of unaligned access to strings. So "FooString := BarString" in some instances might cause a AV. But "FooString := unaligned(BarString