[To reply replace "Aaron.Sloman.XX" with "A.Sloman"]
Ed Sykes posted a message to which I replied privately. Adam Knowles
also posted a reply, which gives part of the answer.
Here is my full reply.
Ed wrote
>
> I keep on getting an error when printing to screen on the completion of
> my program. I've tried increasing popmemlim but this doesn't seem to
> work. I know that passing one of lists as an output variable is the
> culprit (it's a big list, 1000 elements) but I'd quite like to be able
> to see this list when my experiment ends. If anyone has any suggestions
> on how to solve the problem that would be great. The error is as
> follows:
>
> MISHAP - STACK CONTENTS WRONG AFTER DISPATCHING menuAction EVENT
> ;;; INVOLVING: [0.225312 [1 [[S1 [C5 C3 C7 C9 C1] [C2 C4 C6 C8 C10]]
> [S2
> <SNIPPED A LARGE PART OF THE LIST>
> ;;; ;;; S12]] <Ved Window> menuAction 'l1'
> ;;; DOING : runproc
> ;;; editing: diss.dir/antmob.dir/50stationnetwork.p, ON LINE 1
>
> It's not massively drastic as it does return the list - I just get a big
> mishap afterwards!!
How do you run the program, and what sort of program is it?
Are you creating control panels and running programs from them?
If so your program must never leave anything on the stack.
> MISHAP - STACK CONTENTS WRONG AFTER DISPATCHING menuAction EVENT
Does this mean you are invoking your program from the "compile" menu
in XVed?
You'll get that message if your program produces a result which
it leaves on the stack. E.g. you'll get it if you just do
[a b c d e];
then use the "compile line" option.
You won't get the same error message if you use
ESC d )compile one line
CTRL d )
ENTER lmr ) load marked range
ENTER l1 ) compile current file
but you will probably get some other indication of junk left
on the stack.
So you should try to find out which of your procedures is producing
an unused result.
One way is to use trace. See
TEACH TRACE
HELP TRACE
You can cheat by putting your program command inside decorated
list brackets to make a list of items left on the stack, then
simply get rid of the list by assigning it to nothing:
[% ... run program ... %] ->;
But it's better to fix the problem properly. E.g. you may have
a procedure with an output local variable which is assigned a list, and
then invoking that procedure without using the result produced.
If you use ENTER procheader on every procedure, and fill in the
gaps in the template header that it produces, that may force you to
think clearly about what that procedure is doing and how it is used.
For pop-forum readers not at Birmingham see
http://www.cs.bham.ac.uk/research/poplog/help/ved_procheader
http://www.cs.bham.ac.uk/research/poplog/auto/ved_procheader.p
Aaron
===
--
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk (NB: Anti Spam address)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/
|