[fpc-pascal] Some RTL functions cry big tears when mixing Pchar and Ansistring/String

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Wed Jun 12 05:51:39 CEST 2013


On Tue, Jun 11, 2013 at 5:29 PM, md at rpzdesign.com <md at rpzdesign.com> wrote:

>  I totally understand, but I did not discover the problem until
> I was well into a larger project that I could not de-construct
> to try to generate a reproducible sample.
>
> I am under a time pressure, decided to start using using LAZ/FPC about 3
> months ago,
> and when I starting running the program under load, it started to die.
>

In my experience when such strange issues appeared and I started
distrusting the RTL, every single time I eventually could track the bug to
.... an error in my own code. Don't remember the RTL ever causing such
issues in all those years. You probably have a memory corruption,
uninitialized variable or some other error in your code which causes the
problem, but depending on the problem it might be really hard to debug.

Sometimes when debugging didn't help, I simply resorted to reading the
entire code base again ... until I found the error.

Running in a different operating system also helps, sometimes it debugs
better in another OS. Sometimes it even works fine in another OS, despite
the error being present at all times =D

-- 
Felipe Monteiro de Carvalho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130612/62a92176/attachment.html>


More information about the fpc-pascal mailing list