Forum > Beginners

TStringList in Windows10 vs Windows7 work

(1/5) > >>

My colleague tells that there is difference on how TStringList works depend of OS. On Win10 he said, my TStringList often drops. i.e. just goes to exception and lose it's values. But on Win7 he said, there is no problem. Does anybody can confirm if there is special things in Win10? Or it's a result of his buggy code.

The code is big and I don't have it complete. But he refused TStringList and trying to use now a database selects instead of TStringList for comparing and etc. Thanks.

Some code from project:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---tsWorkers:=TStringList.Create;        for a := 0 to form1.ds.DataSet.RecordCount-1 do begin          for b := 0 to form1.ds.DataSet.Fields.count-1 do begin            if b = 0 then begin              at:=form1.ds.DataSet.Fields[b].AsString;            end else begin              at:=at+'>'+form1.ds.DataSet.Fields[b].AsString;            end;          end;          tsWorkers.Add(at);

I use TStringLists all over the place on my Win10 laptop.
If it crashes, it's my own sloppy coding.


His buggy code.

An issue like that  is not known.

Code relying on the exact sort order could be buggy though, since the default is to use the OS string comparison routine that might be OS dependent.

Still not a bug, but that could trip up buggy code using tstringlist on machines with differing locales.

mas steindorff:
the only thing i can think is a RAM limit.  I have found TStringList did have a 2G memory limit before you get a "out of memory" exception in 32 bit mode.  I have not tested the limit in 64bit mode.   
I think either the latest complier has some extra Run time testing to enforce this or windows itself is doing the limit enforcement on the 32bit exe.
something you can check.  Do you get the exception at start or when you get a lot to info in your dataset?


[0] Message Index

[#] Next page

Go to full version