Yes, those sporadic bugs can be the dickens to find and fix, usually because
the code that's causing the problems is far removed from the place where it
actually crashes. I remember spending a couple of days once on a crash bug.
I'd find a problem, only to find that it was being caused by something
earlier. I'd track that down, and find that it caused by something even
earlier. I had to write a flow chart on a white board to keep track of
everything that was going on.

I finally tracked it down to an unlikely source--the programmer who worked
on the project before me was doing a Boolean comparison on a value that
could sometimes be void. Void is neither true nor false, so it was setting
off a chain reaction, culminating in a crash somewhere down the line.

Those are the hardest, but can be the most satisfying. I convinced myself
about 10 times during the course of tracking down that bug that it was the
VM's fault, then I'd notice something, and I'd be off and running, chasing
that bug, slowly spiraling ever close to the true culprit.

Good luck!

Cordially,

Kerry Thompson

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Ashim D'Silva
> Sent: Monday, June 23, 2008 7:55 AM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Flash player crashes
> 
> Thanks for the response Kerry. Makes me appreciate even more the work
> that gets done in Flash. And although blaming the tool is easy enough
> I'm pretty sure its in my code somewhere. However, all the problems
> you mentioned I encounter often enough to spot. Plus Flash is helpful
> enough to tell you where these are. I use traces profusely in
> troublesome area's as well. But I'm just not being able to recreate my
> problem, which is ofcourse frustrating. So I was hoping I could count
> on some log somewhere so I know what was called; which class it was
> called from; anything to pin it close to the problem spot. I've used
> debugger (local and remote) but ofcourse, when it crashes, it crashes,
> and there's no bread crumb trail...
> If I could figure out what the problem was, there'd be the possibility
> of diagnosis, till then I guess its blind testing and lots of comment
> tags.
> 
> Cheers again!
> 
> Ash
> 
> 2008/6/23 Kerry Thompson <[EMAIL PROTECTED]>:
> > Ashim D'Silva wrote:
> >
> >> I'm using the Flash IDE CS3 to produce a project in AS3, and Flash is
> >> continually crashing erratically. Is there a way for me to figure out
> >> what's causing it?
> >
> > I've had similar problems, and it has always turned out to be an
infinite
> > loop, memory management, a null value, or something of the like.
> >
> > The first thing to do is figure out _where_ it is crashing, then figure
out
> > _why_
> >
> > Some people prefer to use trace() statements. Personally, if it's not a
> > time-critical issue, I use the debugger. Since I started using Flash
(F4), I
> > have found that the issue is inevitably in my coding. I'm not
initializing a
> > variable; I'm using a class wrong; or I just plain had faulty logic.
> >
> > It's not always easy, but it is seldom Flash's fault, though I often
wish I
> > could blame the tool. Track your problem down to a specific code
segment. If
> > it's failing for a reason you don't understand, post that code, with a
> > description of the problem, and we'll be glad to help. I'm afraid that
you
> > have only given a very vague complaint, so we can only give vague
answers at
> > this point.
> >
> > Don't give up, though. Flash is a great tool--not perfect, but pretty
darn
> > good. It's biggest problem is that it does what you tell it to, not what
you
> > want it to.
> >
> > Cordially,
> >
> > Kerry Thompson
> >
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> 
> 
> 
> --
> Random Lines 3D
> My online portfolio
> www.therandomlines.com
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to