Problem with Linz V4 for windows 
Author Message
 Problem with Linz V4 for windows

I need to understand what's causing a problem with a
program running under Linz V4 for Windows.
A trap appears as follows:

Trap 21 (range overflow) ...
Files.GetTempName ...
i = -1
n = -1
name = "999999999998371225264"
...

Here is Files.GetTempName:

PROCEDURE GetTempName (VAR name: ARRAY OF CHAR);
  VAR n, i: LONGINT;
BEGIN
  INC(tempno); n := tempno;
  COPY("Oberon.Tmp.0000000000", name);
  i := 20;
  WHILE n # 0 DO
    name[i] := CHR(n MOD 10 + ORD("0"));
    n := n DIV 10; DEC(i)
  END
END GetTempName;

PROCEDURE Init;
  VAR mod: LONGINT;
BEGIN
  ... tempno := GetTickCount();  ...
END Init;

Variable n should divide down to 0
after no more than about 10 iterations.  However,
this is not happening, and characters in name are
getting set to 9 until the index i becomes < 0.

This problem is reproducible on a customer's PC,
but I can't duplicate it on my PC. I'm about  ready to ask
him some questions about what kind of PC he's
using, but first I'd like to get some opinions about
what may be causing this problem.

Any suggestions are much appreciated!

-Greg Haynes
UTMC
Colorado Springs, Colorado



Mon, 12 Aug 2002 03:00:00 GMT  
 Problem with Linz V4 for windows
I have not analized your problem in detail, but
what happens if GetTickCount() returns a negative
value?

Quote:

> Trap 21 (range overflow) ...
> Files.GetTempName ...
> i = -1
> n = -1
> name = "999999999998371225264"
> ...

> PROCEDURE Init;
>   VAR mod: LONGINT;
> BEGIN
>   ... tempno := GetTickCount();  ...
> END Init;

Christian.

--
Christian Luginbuehl



Tue, 13 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Linz V4 is the official Oberon V4

2. Using Mail on Linz V4 for Windows 3.1

3. Error in Linz V4 Strings module

4. Using Linz V4 - how to change TextFrames.Mod?

5. NT Service using Linz V4

6. Update to the new Oberon V4 release from the Linz group

7. Linz V4 CD-ROM

8. Using PSPrinter.Install and Edit.Print $out.ps in Linz V4

9. Mailer for Linz V4?

10. Linz V4 on 68K Macs?

11. New release of Linz Oberon V4 Release 2.2

12. NEW RELEASE: Linz Oberon V4, Release 2.1

 

 
Powered by phpBB® Forum Software