realbasic-betas.mbox
[Top] [All Lists]

Re: Failure Assertion Exception

To: REALbasic Betas <realbasic-betas at lists dot realsoftware dot com>
Subject: Re: Failure Assertion Exception
From: Charles Yeomans <yeomans at desuetude dot com>
Date: Tue, 30 Jul 2002 12:54:42 -0400
Have you tried the following? Add a global constant debugMode as Boolean. Then add the code below to every method, event handler, and menu handler.


//all other declarations
Const methodName = "ClassName.MethodName"

#if debugMode
WriteMessage methodName + "..."
#endif

//your code

#if debugMode
WriteMessage methodName + "complete"
#endif
//return statement here for functions

WriteMessage would send the message to the Console in OS X; in OS 9, I suppose you could send it to Macsbug (I'm not sure about this), or a text file. A log window in the app might work as well.

Compile your project with debugMode = true. Play with your app until it spits up an RB assertion failure. You now know in which method the assertion failure occurred. Once you know this, you can play the same game until you've pinned down the precise line at which the assertion failure occurs. Now you have something useful to tell RS.


Charles Yeomans



On Tuesday, July 30, 2002, at 12:27  PM, Lo Saeteurn wrote:

LOL. Trust me. I tried everything, even commenting out several pages of
code. I even stepped through the code in the IDE, the errors never happen. The stacks are so large that I just quit on it. It just never seem to appear
when you want it.

Sure, I fixed a few failure assertions. Those were just the simple ones,
easy to duplicate and track.

I guess you never experienced these impossible to track Failures unless if you are working with a large complex project. It would make all of our lives
easier to just have this exception raised.


on 7/30/02 8:32 AM, Charles Yeomans at yeomans at desuetude dot com wrote:

It isn't always easy, I agree.  But you need to use something a more
disciplined and comprehensive approach that just sticking in a msgbox.

Charles Yeomans


On Monday, July 29, 2002, at 07:35  PM, Lo Saeteurn wrote:

It's not quite that easy, especially if you're working with a large
project. I did msgboxes, beeps, etc. you can never tell where it's
coming from.  The worst part is that it doesn't always happen.

It's not as simple as you say it, you have to do all sorts of things to
make it come out and it's impossible to tell where it's coming from
especially if your project has thousands of pages.


---
Subscribe to the digest:
<mailto:realbasic-dr-digest at lists dot realsoftware dot com>
Unsubscribe:
<mailto:realbasic-dr-off at lists dot realsoftware dot com>





<Prev in Thread] Current Thread [Next in Thread>