The output file on mine is ok, i mean much bigger, reloadable. (47Ko)
if i change the sample program to this
begin
pn := TPinContainer.Create(nil);
pn.PinCast.isImage:=True;
//pn.PinCast.Picture.LoadFromFile('pmb.jpg');
//for i:=1 to 10 do
// with pn.PinCast.Ranges.Add do
// begin
// ColorIndex1:=i;
// ColorIndex2:=i-1;
// Range:=IntToStr(i);
// end;
//SaveToFile(pn, 'test.txt');
//pn.PinCast.Ranges.Clear;
LoadFromFile(pn, 'test.txt');
writeln(pn.PinCast.Ranges.Count);
readln;
FreeAndNil(pn);
end.
it still displays 10 items (with the file produced on my computer). If i use the file you've produced then it crashes.
This is definitively a problem related to your setup, your computer, or i don't know what...I can't help more. From the beginning i was sure that the code is ok.
By a pure hasard, did you change something to the LCL/FCL source code ?