Issue 109142 - Let assertions abort
Summary: Let assertions abort
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: DEV300m71
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: 4.x
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2010-02-11 08:39 UTC by Stephan Bergmann
Modified: 2017-05-20 11:33 UTC (History)
6 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2010-02-11 08:39:11 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).
Comment 1 Stephan Bergmann 2010-02-11 08:39:43 UTC
Comment 2 2010-02-11 09:59:42 UTC

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 :)
Comment 3 Frank Schönheit 2010-02-11 13:24:48 UTC

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

Now that I've said this, let's start the discussion/war. But in a mailing list,
please, not in this issue here.
Comment 4 Stephan Bergmann 2010-02-11 15:42:44 UTC
@fs:  yes, please start over on a mailing list, and I'll answer you there, then
Comment 6 malte_timmermann 2010-04-30 10:11:36 UTC
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.
Comment 7 Stephan Bergmann 2010-04-30 10:18:41 UTC
@mt: see OSL_TRACE to flag "unusual program states"
Comment 8 Frank Schönheit 2011-02-07 12:50:29 UTC
*** Issue 116845 has been marked as a duplicate of this issue. ***
Comment 9 Marcus 2017-05-20 11:33:51 UTC
Reset assigne to the default "".