IDL on Windows vs. Unix, debugging consideration [message #40409] |
Thu, 05 August 2004 10:19 |
MKatz843
Messages: 98 Registered: March 2002
|
Member |
|
|
I'm not meaning to start a flame war of any kind (well okay maybe just
a little one), but I came across an interesting bug (in my own IDL
code) that occurred while running on Windows, but which I could only
diagnose on Unix. I'm sharing this to get some constructive discussion
going on debugging techniques.
I was working with an object class "MainClass" that has a typical
GetProperty method. Since there are a number of smaller object classes
that it inherits, the GetProperty routine is written in a way that
passes along the _Ref_Extra keywords to the individual GetProperty
methods of the inherited classes. All pretty standard stuff.
When running my program on Windows, I discovered that at the moment
the GetProperty is called on a MainClass object -- whammo! -- the
whole machine locks up into a massive endless loop. IDL has to be
killed from the Task Manager, and you don't get to see where the
problem was. I did notice that not a single line of the GetProperty
methods of the inherited classes is ever called.
I do all of my development on Unix (Apple) and then run experiments on
a Windows machine. So I took my problem back to the Mac and found it
immediately. When the Mac entered the same endless loop I simply hit
control-C and it broke at the offending line. It seems that an
unrelated object class, "OtherClass", had been defined with a
MainClass::GetProperty method due to a shoddy copy-and-paste job on my
part. So the error message looked like (approximately):
Execution halted in MainClass::GetProperty in library
OtherClass__Define.pro (aha!)
So thank goodness for the control-C in Unix. What do Windows IDL
programmers do when the mouse cursor disappears, and the IDL window
becomes unresponsive? -- Besides "End Task"?
I also wrestle with the issue that every time I have to close and
re-launch IDLDE on Windows I have to re-open all of the program
libraries I was just working with. It's a time-consuming pain. But in
Unix (where I don't use IDLDE) I just keep all of the text editor
windows open and running in a different application (BBEdit on Mac).
Is there a Windows setting for this I'm unaware of.
Thanks for the tips.
M. Katz
|
|
|