Ethereal-dev: [Ethereal-dev] Banish ALL kinds of g_assert from epan (dissector) code?
Hi List!
Of course, dissectors should be bug free (so no assert's necessary :-),
but as we all know they certainly often aren't.
As assert's being the main causes for several recent crashes in Ethereal
(ask the buildbot and others), there are a lot of (362 to be precise)
g_assert calls (and alike ones) in both the dissectors and dissector
support code (e.g. epan/ftype).
With the current g_assert behaviour, typical user's will simply get
annoyed by a message that an assert has occurred (and won't have the
knowledge to do anything against it). They usually blame it on the
developers (well, which is correct BTW) and click away that message and
will be annoyed that their data has just gone, which is the worst
behaviour we could provide at all IMHO :-(
Should we banish these g_assert calls from epan completely to provide
much better program stability?
I personally like assert's, but as we have the DISSECTOR_ASSERT call,
which throws a DissectorError exception, is a much better choice in that
code part in my opinion.
It's not that I don't want to fix bugs (I'm doing that continuously for
the time being), but IMHO it's more important to have a non crashing
Ethereal than to fix the bugs.
Single packets marked as [Dissector Bug] will be much more user friendly
than a crash because of a g_assert().
Any objections against this?
Regards, ULFL