[comp.sys.atari.st] orphaned virtual GEM workstations

braner@batcomputer.tn.cornell.edu (braner) (05/19/87)

[]

When you write a program that opens a GEM virtual workstation, you
need to close it (with v_clsvwk()) before you exit the program.  If you
don't, GEM keeps that workspace open, and opens a _new_ one next time
you run the program.  Eventually it runs out of "handles" and wierd
things happen.  You then have to reboot.

The problem is: if your program crashes unintentionally, without doing
the v_clsvwk(), you're in trouble!  Question: can you close it later,
without knowing the handle number?  Is there a way to find out whether
virtual workstations are open and what their handles are?  Is it safe
to call v_clsvwk() on a fictitious handle?  What handle numbers would
be good guesses to try and close?  (If all else fails, you might want
to have your program print out the handle numbers (to a file?) while
in debugging phase.)

- Moshe Braner

hmm@laura.informatik.uni-dortmund.de (Martin Mosner) (05/21/87)

I don't know if this is related in any way with Moshe's problem, but
I noticed that the same thing happens to GEM window handles.  When
your program likes to crash (which can happen in the development phase...),
you will have to reboot the machine to re-initialize GEM.  I tried
to remedy this by closing window handles 1 to 7 upon startup, but this
did not seem to work either (the program crashed in the close routine).
I haven't investigated further since it was not annoying enough
(and finally my program did not crash anymore :-), so maybe there is
a way to close all orphaned handles and I did not find it...

	Hans-Martin
D