[fpc-devel] units precedence cthreads, variants
petr.kristan at epos.cz
petr.kristan at epos.cz
Fri Jun 3 15:17:10 CEST 2005
On Thu, Jun 02, 2005 at 02:58:11PM +0200, petr.kristan at epos.cz wrote:
> Hi
>
> I'm trying to track down 'Variant Array is locked' bug and during
> simulation on simple program i found the unit precedence problem.
>
> --------------------------------------------------
> program pokus1;
>
> uses
> cthreads, variants, Classes;
>
> type
> TTr = class(TThread)
> procedure Execute; override;
> end;
>
> procedure TTr.Execute;
> var
> v: Variant;
> begin
> writeln('before');
> v := VarArrayOf(['1','2','3']);
> writeln('after');
> end;
>
> var
> tr: TTr;
> begin
> tr:=TTr.Create(False);
> end.
> --------------------------------------------------
>
> If unit cthreads are before variants then i get:
> --------------------------------------------------
> before
>
> Program needs probably the variants unit.
> Include the variants unit in your uses statements
> as one of the first units.
>
> --------------------------------------------------
>
> If unit variants are before cthreads then:
> --------------------------------------------------
> Threading has been used before cthreads was initialized.
> Make cthreads one of the first units in your uses clause.
> Runtime error 211 at $08065B87
> $08065B87
> $080551CE
> $08048440
>
>
> --------------------------------------------------
>
> Linux, fpc from svn
>
> Petr
Please, can somebody advise me how I can make program with threads and variants simultaneously.
Thanks
Petr
--
Ing. Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223 Czech Republic (Eastern Europe)
fax: +420 466510709
More information about the fpc-devel
mailing list