[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Almost dead widgets

Ben Tupper wrote:

> I have a blocking widget application that calls a modal widget
> application.  Carefully planted bugs (not planted by me, of course) in
> the second application crash the application.   I can clean up the
> second (crashed) widget but not the first.  Even the system control
> button with 'QUIT' doesn't quite do it.  It is, as David F describes,
> almost dead but not entirely dead.   So far, my solution involves brute
> force and ignorance, which works but is messy:  I ignore the widget
> carnage until my desktop looks like a checkerboard, then I exit IDL when
> no one can see what I'm doing.   I have never bumped into this before,
> so I'm not sure what I've done to cause this mess.    I'm not even sure
> what info would be helpful to identifiy the problem.  Any suggestions
> greatly appreciated.


Thanks to all for the help.  I discovered what may be the problem.  In the
first routine's cleanup procedure, I failed to check for the existence of
top level base's info structure before trying to free the pointers it
contained.    I can't say I understand why the widget is not destroyed
(completely dead) by WIDGET_CONTROL, Even.Top, /Destroy before XMANAGER
calls my cleanup procedure, but maybe I don't need to.

It took me a while to figure this out for two reasons; (1) I didn't (and
haven't before) done any error checking in my cleanup routine and (2) I
couldn't get the problem to happen again (until just now).

At first, I was really wowed by David's ERROR_MESSAGE because after I
sprinkled it throughout the routines, I couldn't get the problem to occur
again.  Geez, that's good software: not only does it report diagnostics but
also it heals!  I'm gonna tape a copy of it on the inside of the hood of my


Ben Tupper

Bigelow Laboratory for Ocean Science