Fixed news_server core dump on VGX

randy frank randy at tessa.iaf.uiowa.edu
Thu Feb 7 02:43:25 AEST 1991


	Fixed the problem. Basically this is what causes it:
I was using the fact that exit closed all windows.  I had three programs
calling exit within 1 sec of each other.  One of them had a substantial
amount of memory allocated to it via malloc and appeared to be slightly
slower to exit than the others even though it called exit first.  Somewhere
in the exit code as windows were being closed (5 in all) the news_server
found something strange and dropped core (only on a 210VGX IRIX 3.3.1, not
on a 120GTX nor a number of 4D20s).  This only happened when the program
which called exit first had quite a bit of memory malloc'ed to it (quite
a bit = ~100k).  Again this memory is beyond that attached to via shmem
(it would appear shmem has nothing to do with this problem). Almost forgot,
the programs are basically FORTRAN with calls to a couple of C wrapper libs
and an extra home grown C graphics lib. So the exit() call is the FORTRAN
exit call.
  Anyway here is the fix I came to be trial and error:
	CLOSE ALL YOUR WINDOWS EXPLICITLY!!!  Do not rely on exit to close
them.  In my case I added code to close each apps windows before calling
exit and the program runs fine now.  The only visual change is that windows
close one at a time now (although quickly) and in a predefined order.

Anyway, thought I'd post in case others would like to know...
--
rjf.
Randy Frank, Engineer                       |  (319) 335-6712       
University of Iowa, Image Analysis Facility |  73 EMRB              
randy at tessa.iaf.uiowa.edu                   |  Iowa City, IA 52242  



More information about the Comp.sys.sgi mailing list