[fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.
    Michael Van Canneyt 
    michael at freepascal.org
       
    Fri May  2 08:50:53 CEST 2014
    
    
  
On Thu, 1 May 2014, fredvs wrote:
> Hello.
>
> When a java class use a fpc library that call jni.CallVoidMethod inside a
> thread it crash the application.
>
> If the fpc library call jni.CallVoidMethod  directly (not via a thread) =>
> perfect, it works.
>
> Is that a known problem ?
Not known, but definitely expected.
FPC has it's specific threading mechanism in the RTL. 
Java has such a mechanism in place as well.
I would be very surprised if the 2 could cooperate without a lot of additional glue code.
In general, libraries and threading is not an easy story.
Michael.
    
    
More information about the fpc-pascal
mailing list