I just managed to trace a subtle crashing bug (no debugger catch, just a
crash with an OS X report) back to a ContextualMenu which was receiving two
Open events and was therefore setting itself up twice. Why would a
ContextualMenu receive two Open events? Because the IDE had inserted a copy
of Super.Window into the parent Window's Constructor method at some point in
time when I didn't notice, even though the line was already there.

Searched my code and found two other spots in two other windows where this
had happened. You have to look for both Super.Constructor and Super.Window.

Needless to say I was rather annoyed. This was one of those bugs that was
hard to track down in part because it didn't happen reliably. (I imagine
sometimes the events would overlap and that's when the crash would occur).
Once I narrowed it down to a window I started removing controls on a temp
copy to try and isolate a piece of code or control. Finally I traced it to a
ContextualMenu, but tried numerous other tests before realizing what was
happening.

Basically if you create a new Window then add a Constructor method the IDE
will insert Super.Window *after* you click away from the method. If you've
typed it already, or pasted code that contained it, you get double calls.
This is actually rather dangerous behavior for the IDE, and I've filed a
feedback report regarding it.

Any way...something to check if you have an error you just can't trace. For
the record, every crash caused by this was an EXC_BAD_ACCESS and the stacks
varied as it was memory related, i.e. the crash could occur some time after
the double-event firing. The stack usually ended with a chain of OS calls,
which could be misleading, but they all ultimately had to do with memory.

Daniel L. Taylor
Taylor Design
Computer Consulting & Software Development
[EMAIL PROTECTED]
www.taylor-design.com

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to