[fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.

Michael Van Canneyt michael at freepascal.org
Mon May 26 21:30:41 CEST 2014



On Mon, 26 May 2014, fredvs wrote:

> Hello.
> What is the best way to  unthread a procedure ?
> I have try with a fptimer outside the thread but the thing that disturb me
> is that you need a tcomponent as owner to create it.
> And in the library i do not use any tcomponent...
> How to create a fptimer without owner ?
> I have try with fptimer.create(Nil) but without luck...

A fptimer.create(nil) should always work. 
fptimer does not need a non-nil owner.

But if you don't have components, you probably also don't have a main application loop.
So I think it likely that then you probably also do not call checksynchronize() at 
regular intervals, meaning that fptimer will not work, as this is required to get the ticks.

So, the Nil owner is (with 99.99% certainty) not the problem.

Michael.



More information about the fpc-pascal mailing list