Apache OpenOffice (AOO) Bugzilla – Issue 109142
Let assertions abort
Last modified: 2017-05-20 11:33:51 UTC
Assertions (OSL_ASSERT et al from osl/debug.h, and DBG_ASSERT et al from tools/debug.hxx), if enabled (i.e., doing an --enable-dbgutil build, or building parts of the code with debug=x) should abort (following practices established by C assert.h etc.). Without such a strict measure, the many assertions occurring in a run of OOo (e.g., even executing the smoke test produces lots of them) would probably never go a away, and the assertion tool would remain practically useless (as developers hardly notice assertions newly introduced by their code changes, in the sea of existing ones).
.
+1 that will finally give me a reason to track a lot of these down... though i would not want this change integrated until after 3.3 branches off :)
-1 This would just cause people to not add assertions to their code anymore. We need to solve this on a social level (well, backed up by management, and this is what's missing at the moment), not on a technical level. Also, not every of today's assertions justifies an abort when failing. Historically, DBG_ASSERT/OSL_ENSURE simply have not been used in the same way ::std::assert is intended to be used, so treating both the same way is inappropriate. Now that I've said this, let's start the discussion/war. But in a mailing list, please, not in this issue here.
@fs: yes, please start over on a mailing list, and I'll answer you there, then
http://www.openoffice.org/servlets/ReadMsg?list=dev&msgNo=26561
cc me And still -1 - IMHO there are situations where assertion should about, but also some where they shouldn't, so the developer should choose the appropriate macro for this, instead of blindly letting all assertions about.
@mt: see OSL_TRACE to flag "unusual program states"
*** Issue 116845 has been marked as a duplicate of this issue. ***
Reset assigne to the default "issues@openoffice.apache.org".