Board index » delphi » AMD K6 problems with Delphi code

AMD K6 problems with Delphi code

Has anyone had problems with Delphi and AMD K6 processors? I have a
single user (out of 1000's) reporting a problem.
It is strange because the code with problems is very simple and used
in many areas, but it's just one place where it won't work - although
he gets it to work on a Pentium OK.

I have a group box with some Edit controls. The code is like:

  String := Edit.text;
try
  Var2 := StrtoFloat(String);
except
  Edit.setfocus;
  MessageBeep(0);
  Exit;
end;

He just gets a beep and focus returned to the Edit box.

The same code works everywhere else.

I don't have access to a K6 machine so I'm having to guess what the
problem might be. Has anyone had any similar problems?

 

Re:AMD K6 problems with Delphi code


Quote
"John Beeteson" <beete...@aol.com> wrote in message

news:51539090.0306202352.46a52f30@posting.google.com...

Quote
> Has anyone had problems with Delphi and AMD K6 processors? I have a
> single user (out of 1000's) reporting a problem.
> It is strange because the code with problems is very simple and used
> in many areas, but it's just one place where it won't work - although
> he gets it to work on a Pentium OK.

> I have a group box with some Edit controls. The code is like:

>   String := Edit.text;
> try
>   Var2 := StrtoFloat(String);
> except
>   Edit.setfocus;
>   MessageBeep(0);
>   Exit;
> end;

> He just gets a beep and focus returned to the Edit box.

> The same code works everywhere else.

> I don't have access to a K6 machine so I'm having to guess what the
> problem might be. Has anyone had any similar problems?

IIRC there were a couple of obscure MMX related bugs with the early K6
chips, but the later ones (not exactly sure of the cutoff) worked fine. I've
run Delphi 2, 6, and 7 code on K6's without any problems (everything from
discrete simulators to graphics stuff).

The most likely possibility (if it is a K6 issue) would be a bug in the fpu
unit ... do a search on the AMD site to check this, though I don't remember
anything about it. I'd guess that it's more likely to be some wierd
configuration issue. Blame it on MS and tell him to reinstall Windows :)

--
Michael Brown
www.emboss.co.nz : OOS/RSI software and more :)
Add michael@ to emboss.co.nz - My inbox is always open

Re:AMD K6 problems with Delphi code


I can't remember any details, but I vaguely recall something about
people{*word*106}ing with registers in the FPU
- something like, if they are not restored properly obscure bugs
appear

Maybe someone else will remember this one
- I'm fairly sure I saw it in this NG well over a year ago

On 21 Jun 2003 00:52:51 -0700, beete...@aol.com (John Beeteson) wrote:

Quote
>Has anyone had problems with Delphi and AMD K6 processors? I have a
>single user (out of 1000's) reporting a problem.
>It is strange because the code with problems is very simple and used
>in many areas, but it's just one place where it won't work - although
>he gets it to work on a Pentium OK.

>I have a group box with some Edit controls. The code is like:

>  String := Edit.text;
>try
>  Var2 := StrtoFloat(String);
>except
>  Edit.setfocus;
>  MessageBeep(0);
>  Exit;
>end;

>He just gets a beep and focus returned to the Edit box.

>The same code works everywhere else.

>I don't have access to a K6 machine so I'm having to guess what the
>problem might be. Has anyone had any similar problems?

Re:AMD K6 problems with Delphi code


Quote
In article <3ef422ca.4981...@news.btclick.com>, J French wrote:
> I can't remember any details, but I vaguely recall something about
> people{*word*106}ing with registers in the FPU
> - something like, if they are not restored properly obscure bugs
> appear

Afaik Windows 98 was already fixed in that regard. So unless he is running an original win'95
that isn't the problem.

K6's don't get extremely hot either. More likely to be a configuration or
generic hardware problem (e.g. try swapping mem, ide cables, mobo, in that
order. Don't think the memory is error free just because it wasn't faulty
with a software memtest) , not the brand of the processor.

Re:AMD K6 problems with Delphi code


it has nothing to do with a K6 processor..
there are hundreds of thousands of K6'es in use today , so i really don't
think something as simple as an upper level api function is going to be
selective on a K6.
Quote
John Beeteson wrote:
> Has anyone had problems with Delphi and AMD K6 processors? I have a
> single user (out of 1000's) reporting a problem.
> It is strange because the code with problems is very simple and used
> in many areas, but it's just one place where it won't work - although
> he gets it to work on a Pentium OK.

> I have a group box with some Edit controls. The code is like:

>   String := Edit.text;
> try
>   Var2 := StrtoFloat(String);
> except
>   Edit.setfocus;
>   MessageBeep(0);
>   Exit;
> end;

> He just gets a beep and focus returned to the Edit box.

> The same code works everywhere else.

> I don't have access to a K6 machine so I'm having to guess what the
> problem might be. Has anyone had any similar problems?

Re:AMD K6 problems with Delphi code


98 Se was fixed not 98 fe.
 and yes FPU is a cause of many problems and its due to other software or OCX
controls changing the ControlWord in the FPU.
 this problem if the same exact config was on any other system other than what he has stated here
would still fault.
 i my self have an app in delphi that on a 98 Fe pc some times while the app is
is processing FFT code (fast Fourier Transforms) and i hit the start Button on the
task bar my app will pop up with a Invalid Floating Point operation.
  this problem can be rectrofitted by setting the control word at suppected areas.

Marco van de Voort wrote:

Quote
> In article <3ef422ca.4981...@news.btclick.com>, J French wrote:
> > I can't remember any details, but I vaguely recall something about
> > people{*word*106}ing with registers in the FPU
> > - something like, if they are not restored properly obscure bugs
> > appear

> Afaik Windows 98 was already fixed in that regard. So unless he is running an original win'95
> that isn't the problem.

> K6's don't get extremely hot either. More likely to be a configuration or
> generic hardware problem (e.g. try swapping mem, ide cables, mobo, in that
> order. Don't think the memory is error free just because it wasn't faulty
> with a software memtest) , not the brand of the processor.

Re:AMD K6 problems with Delphi code


On Sat, 21 Jun 2003 14:08:34 +0200, "Maarten Wiltink"

Quote
<maar...@kittensandcats.net> wrote:
>John Beeteson wrote in message
><51539090.0306202352.46a52...@posting.google.com>...
>[...]
>>  Var2 := StrtoFloat(String);

>He doesn't have his regional settings mixed up?

But then he would have logged the invalid 'number'
- it would be obvious ?

Of course Val() is not locale aware
- and one's own 'personal' locale switch solves most of such problems

You might be right
- the poor s** could have been relying on MS's localization ...

You are probably totally correct

Re:AMD K6 problems with Delphi code


Quote
John Beeteson wrote:

> Has anyone had problems with Delphi and AMD K6 processors? I have a
> single user (out of 1000's) reporting a problem.

I have had in my personal use almost all the AMD processors in range
166MHz ... 2000MHz. And all the time some Delphi version has been my
development tool. So I am by 99,5% sure your string conversion problem
has nothing to do with the AMD CPU itself.

You did not mention anything about your Delphi nor Windows version.

For instance with the old 16-bit D1 and Win-ME you'll run in to
problems with Trunc and Frac, ane maybe also other math functions
too when using Double variables.

Var
  R,R2 : Double;
begin
  R := 4;
  R2 := Frac(R); // With Win-ME, occasionally R2 may get for
                 // instance value 1.0 !!

Years ago, I even had to install Win-ME (Yuk!) and Delphi on it  
to get this solved, as I started to get strange and irrational
error reports from clients using Win-ME.
I got around to that {*word*193} ME-problem by changing Doubles to Reals,
and adding something like:
  R2 := Frac(R + 0.000000000001);

Quote
> try
>   Var2 := StrtoFloat(String);
> except
>   Edit.setfocus;
>   MessageBeep(0);
>   Exit;
> end;
> I don't have access to a K6 machine so I'm having to guess what the

Send a couple of varying test apps to your client on a floppy.
One test consisting only about those lines you sent above.

Are they still able to reproduce the same error, with most of
the test apps you sent?
If they are, then the problem starts to be more interesting.

Markku Nevalainen

Re:AMD K6 problems with Delphi code


Quote
Markku Nevalainen <m...@iki.fi> wrote in message <news:3EF5A3D8.4CC0@iki.fi>...
> John Beeteson wrote:

> > Has anyone had problems with Delphi and AMD K6 processors? I have a
> > single user (out of 1000's) reporting a problem.

> I have had in my personal use almost all the AMD processors in range
> 166MHz ... 2000MHz. And all the time some Delphi version has been my
> development tool. So I am by 99,5% sure your string conversion problem
> has nothing to do with the AMD CPU itself.

> You did not mention anything about your Delphi nor Windows version.

> For instance with the old 16-bit D1 and Win-ME you'll run in to
> problems with Trunc and Frac, ane maybe also other math functions
> too when using Double variables.

> Var
>   R,R2 : Double;
> begin
>   R := 4;
>   R2 := Frac(R); // With Win-ME, occasionally R2 may get for
>                  // instance value 1.0 !!

> Years ago, I even had to install Win-ME (Yuk!) and Delphi on it  
> to get this solved, as I started to get strange and irrational
> error reports from clients using Win-ME.
> I got around to that {*word*193} ME-problem by changing Doubles to Reals,
> and adding something like:
>   R2 := Frac(R + 0.000000000001);

> > try
> >   Var2 := StrtoFloat(String);
> > except
> >   Edit.setfocus;
> >   MessageBeep(0);
> >   Exit;
> > end;
> > I don't have access to a K6 machine so I'm having to guess what the

> Send a couple of varying test apps to your client on a floppy.
> One test consisting only about those lines you sent above.

> Are they still able to reproduce the same error, with most of
> the test apps you sent?
> If they are, then the problem starts to be more interesting.

> Markku Nevalainen

Thanks for the discussion and suggestions. I have made a modified code
version using different Delhi functions and asked him to try it. I'll
be away for a few days, but I'll let you know if the changes work.

Re:AMD K6 problems with Delphi code


Quote
"Maarten Wiltink" <maar...@kittensandcats.net> wrote in message

news:3ef44ac2$0$49107$e4fe514c@news.xs4all.nl...

Quote
> John Beeteson wrote in message
> <51539090.0306202352.46a52...@posting.google.com>...
> [...]
> >  Var2 := StrtoFloat(String);

> He doesn't have his regional settings mixed up?

Yes, always look for the most obvious answer first. Its always, IMO, far
more likely that a user/user setting is incorrect than it is that the
hardware has a flaw. (Not to say that the hardware is perfect.) IMO it makes
far more sense to look first to situations that one can easily fix, rather
than obscure scenarios that are not easily corrected, i.e., KISS.

Re:AMD K6 problems with Delphi code


Quote
"Bruce Roberts" <b...@bounceitattcanada.xnet> wrote in message <news:ucHJa.40$CK.3008@news20.bellglobal.com>...
> "Maarten Wiltink" <maar...@kittensandcats.net> wrote in message
> news:3ef44ac2$0$49107$e4fe514c@news.xs4all.nl...
> > John Beeteson wrote in message
> > <51539090.0306202352.46a52...@posting.google.com>...
> > [...]
> > >  Var2 := StrtoFloat(String);

> > He doesn't have his regional settings mixed up?

> Yes, always look for the most obvious answer first. Its always, IMO, far
> more likely that a user/user setting is incorrect than it is that the
> hardware has a flaw. (Not to say that the hardware is perfect.) IMO it makes
> far more sense to look first to situations that one can easily fix, rather
> than obscure scenarios that are not easily corrected, i.e., KISS.

Well, the problem is fixed. I changed to using TexttoFloat() and this
has run happily on several of his machines. Don't ask me why!

Other Threads