Re: vm blocks, structs, and pointers

GWRepCami@aol.com
Wed, 1 Jan 1997 00:19:33 -0500

In a message dated 96-12-31 10:57:32 EST, edwdig@bergen.org (Edward Di
Geronimo Jr.) writes:

> Anything else I forgot?
>
> These are two seperate methods, not one. I put a comment saying which
method
> they were from. The only compiler warnings I've gotten from these
functions
> are "suspicious pointer convertion" on some on my attempts to get the
> pointers right.
>

That is a compiler warning worth heeding, and could possibly be the problem
that may be crashing you. ie...if you declared a variable named "mapBlock"
and used the variable "mapblock", it's a totally different variable...because
C is case sensitive.

As John points out, in his message to you, that you say that you do perform
the functions that you didn't include in the code snippet...it's difficult to
guess why you're getting the problem that you are. The best thing to do is
to watch the program execute in SWAT.

In your answer to John's pointers you say:

>Swat doesn't like my program. When I click new file it dies with a stack
>overflow. Glue says "Stack/uninitialized data size: 5016" The program works
>just fine in Ensemble with "stack 5000". I tried bumping it up to 6000, and
>even 10000 but swat still crashes. Doesn't even make it to the initialize
>file method.

If SWAT doesn't like your program...that is a clear indication that something
is wrong..however where that is...is questionable. Does your
MSG_GEN_PROCESS_OPEN_APPLICATION message do anything strange in the startup
of the program that you haven't shown us?

If it's saving the information to your file..you're doing something
right..however, if you're crashing, and glue is complaining, and your
compiler is complaining, and you can't get SWAT to run it ....then
something's wrong outside of the code snippet that you're showing us, as John
has confirmed what I thought..that basically the technique is right for what
you're doing...at least within our understanding. I think you're going to
find that your problem is somewhere else in your code, and that code...you
haven't posted.

Lee