[lazarus] StrPCopy bug

michael at tfdec1.fys.kuleuven.ac.be michael at tfdec1.fys.kuleuven.ac.be
Thu Jul 8 14:16:35 EDT 1999




On Thu, 8 Jul 1999, Michael A. Hess wrote:

> Shane Miller wrote:
> > 
> > Could someone else try and get some example to Peter please.  If
> > needed, send him the Lazarus code and pinpoint the location.  I think
> > I may have found the other problem with the gtk_widget_show error and
> > I am stalking that.
> 
> I won't be back in my office for another 2 1/2 hours at the least so I
> can't do it until then. However, given what you have found so far with
> the DispatchStr('resize') crash I tend to think that we might be do some
> bad pointer passing or something and stomping on memory that is just
> plain messing everything up. StrPCopy was first and we by passed that
> only to find something else that got messed up. Since a smaller program
> StrPCopy does work I am leaning towards it being our problem. We are
> going to have to isolate parts of the code little by little until we
> find it.  :-\

The StrPCopy simply does the following:

function StrPCopy(Dest: PChar; Source: string): PChar;
begin
  result := StrMove(Dest, PChar(Source), length(Source));
end ;

It seems rather strange that this would go wrong, since strmove
has been around and tested for ages. 

Michael.






More information about the Lazarus mailing list