Patches

Dirk Hohndel dirk at hohndel.org
Mon May 12 19:40:02 PDT 2014


On Mon, May 12, 2014 at 06:55:05PM -0700, Thiago Macieira wrote:
> Em ter 13 maio 2014, às 10:01:12, Dirk Hohndel escreveu:
> > I disagree. Crashing in a release build is NOT a good way to let the user
> > know that something is wrong. We should avoid crashes as much as humanly
> > possible.
> 
> Q_ASSERT in debug mode is not an answer either, since the effect is pretty much 
> equivalent to that of a crash (except one gets a SIGABRT instead of SIGSEGV).
> 
> Q_ASSERTs and C assert()s are meant for devs only. For that reason, Tomaz's 
> patch is fine: it doesn't remove or introduce any new protection.

Yes it does. It removes two (I think) cases where we had
if (dive == NULL)
	return;

> That said, the question stands: can it happen?

My take on this is "most bad bugs happen because an assumption that you
made writing that code turned out to be wrong - or later is changed".

So I really don't care if I think it can happen. Let's not go all
anal-retentive on this, but also let's make sure we don't have an app that
randomly bombs on people.

Or randomly deletes dives (see Linus' last email - ignoring the
autocorrect gems in it)

/D


More information about the subsurface mailing list