[fpc-devel] units precedence cthreads, variants
petr.kristan at epos.cz
petr.kristan at epos.cz
Thu Jun 2 14:58:11 CEST 2005
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
--
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