[mythtv] Re: [mythtv-commits] mythtv commits

Isaac Richards ijr at po.cwru.edu
Sat Nov 27 21:35:25 UTC 2004

On Saturday 27 November 2004 04:02 pm, Kenneth Aafl°y wrote:
> On Saturday 27 November 2004 21:49, Isaac Richards wrote:
> > And what exactly is the difference to the end user?  The program would
> > still exit with an assert there.  It doesn't matter to them if it's due
> > to an assert or due to a segfault, all they know is that it's not running
> > anymore.
> It's a difference to the developer and the user, because for speed reasons
> asserts can be removed when compiling products without bugs, and to
> developers, because it tells them that this condition was not supposed to
> happen, but since you are the only devel mattering here, it does not
> matter.

Please tell me how putting in an assert would fix this bug.

It's not a difference to a developer, since a developer has access to gdb and 
can gather better information than what would be presented.  It's not a 
difference to the user, because the assert's just going to make the program 
exit, and if it were compiled out, it'd die the same way.

Adding in an assert for a _known_ problem is just plain stupid.  It doesn't do 
anything to fix the issue, and it doesn't make the issue any more visible 
than a segfault does.

> > > When was ignoring the error of a null pointer from a underlying library
> > > (which might have been caused by the user of the library) become a good
> > > thing to do?
> >
> > When using an assert causes the program to exit, and handling the null
> > value will quite possibly work around this?
> And what happends later? You even questioned this in response to the user 
> reporting the problem..  so why are you even bothering arguing this with me? 

Because you're absolutely wrong.  You're saying that I should put an assert 
in, and write back to Torbj÷rn and say: "Well, I put in an assert() there, so 
that it'll die a few lines earlier, and you'll know exactly when it happens 
again.  Good luck with it."  How would that be useful at all?  How would that 
lead to the problem being fixed?


More information about the mythtv-dev mailing list