Issue 109142

Summary: Let assertions abort
Product: porting Reporter: Stephan Bergmann <stephan.bergmann.secondary>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: dtardon, frank.schoenheit, issues, malte_timmermann, mst.ooo, tenger
Version: DEV300m71   
Target Milestone: 4.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---

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 mst.ooo 2010-02-11 09:59:42 UTC
+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 :)
Comment 3 Frank Schönheit 2010-02-11 13:24:48 UTC
-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.
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 "issues@openoffice.apache.org".