#Program problem
5 messages in this thread
I've run into a strange problem (at least it's strange to me!). I've
finished my first "real" Amiga program and have been having a few friends
test it for me. The program is a game for one player versus the computer.
The program works fine on my machine, a newer 2000 with 1M chip & 2 Megs of
fast ram. The three people who've tested the program have run into problems
when they run the program, one of them had it crash in the morning and run
fine in the afternoon, it's crashed on all others. Two of the test machines
are A500s with 512K chip and the other is a 2000 with 512K chip & 512K fast
ram. Here's the problem, after you make your first move, the computer
responds with it's move, before it does it goes into a recursive evaluation
routine to decide which is the "best" possible move. While it's in this
routine it crashes on the other machines, but never on mine. At first I
suspected that it was a stack problem, but the testers tried stacks of up
to 50000 with the same results, and the recursive routine is only passed
two ints and only goes down 6 "levels". I've been combing the code looking
for errors, but can't seem to find anything. What's really annoying is that
it runs just fine on my machine (and an earlier incomplete version ran on a
friend's new A2000, also with 1M of chip).
My next thought was that the program was hogging all the chip memory. The
executable is 86K, about 20K of that is code and the rest is graphic data,
mostly Images, which is force loaded to chip. Using AVAIL it seems that in
the worst case, the program is using a bit over 200K of chip while two
large windows are open. So, this doesnt SEEM to be the problem.
It doesn't do any disk access. It only opens Intuition, Graphics and the
Dos library [for Delay()]. It doesn't allocate any memory. It's driving me
up the wall! Bugs I can deal with, but I can't reproduce them on my
machine!
Arghhh!
Anyone have any suggestions? The only empirical data I've been able to
gather is that it doesn't like machines older than 7 months. Any help
[ MORE ]
Francis,
If you could post a few more particulars, such as which compiler (including
version) you're using, what switches you use to compile, what guru numbers
you're getting, etc., it would help us to suggest where to look.
There is a program in the DL's that you can use to restrict the available
memory on your machine for testing. Unfortunately, the name escapes me at
the moment, but perhaps that program will help you to duplicate the
problem.
There is a file called MEMLIB.ZOO in the DL's that might be of great help
to you in monitoring memory usage. It works with Lattice, but the docs
give untested directions to use it with Manx.
Hope this helps. 8)
David
David,
I'm using DICE 2.00, the only switches I use are the -mD -mC which specify
large code/data model.
__I'M__ not getting gurus, that's the problem. As I said, it runs fine on
my machine. The only guru numbers that have been reported to me are
00000003,xxxxxxxx which, I'm lead to believe, indicates an odd address,
etc.
Could you explain MEMLIB a bit more, it might be useful. Is that the
program that restricts the available memory?
–francis
Francis,
MEMLIB is a set of routines that you can use to monitor memory allocations
by inserting hooks into your program and linking the necessary object
files. It should be in the Tools or System Software library (guessing – I
DL'd it while it was still in the new uploads section a while back.) It's
not the program that restricts available memory. If I get a chance, I'll
try to search out the name for you, but I've been too busy to check today.
If you're using DICE, are you certain that you've got a good set of include
files to use?
David
>DA>> If you're using DICE, are you certain that you"ve got a good
>DA>> set of include files to use?
Yes, I'm using the Includes from the 1.3 Native Developer's Kit