After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 155472 - assert() statements have no place in a shared library
assert() statements have no place in a shared library
Status: RESOLVED WONTFIX
Product: libart
Classification: Deprecated
Component: Other
unspecified
Other Linux
: Normal critical
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
gnome[unmaintained]
: 121850 166373 (view as bug list)
Depends on: 121850
Blocks:
 
 
Reported: 2004-10-15 07:34 UTC by Brian Tarricone
Modified: 2011-08-25 04:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
patch to remove assert statements (1.18 KB, patch)
2004-10-15 07:47 UTC, Brian Tarricone
none Details | Review

Description Brian Tarricone 2004-10-15 07:34:37 UTC
There appear to be several places where libart has assert() statements in it,
which, if encountered, cause the application using the library to abort.  This
is a bad practice: assert() statements should be used as developer debugging
aids only, and should not appear in released code, especially in code used by
third parties in a shared-library setting.

Some systems will convert assert() statements into no-ops if the NDEBUG macro is
defined.  Another option is to actually handle the errors properly instead of
just bailing.

Context: The Xfce Desktop Environment (http://xfce.org/) uses gdk-pixbuf, which
in turn uses librsvg (which uses libart_lgpl) to render SVG icons for menus and
panel launchers.  Some of our users are complaining that portions of our desktop
are crashing, when the root cause comes from assert() statements in libart, such
as this:

xfdesktop: art_render_gradient.c:338: art_render_gradient_linear_render_8: Asser
tion `offset_fraction <= stops[ix].offset' failed.
Aborted
Comment 1 Brian Tarricone 2004-10-15 07:47:15 UTC
Created attachment 32629 [details] [review]
patch to remove assert statements

This patch "#if 0"s the assert() statements, and (naively) attempts to recover
if the assert() conditions are not met.  This seems to work well enough to
allow our apps to continue running if the assert() condition fails.
Comment 2 Kjartan Maraas 2005-07-03 16:28:17 UTC
*** Bug 121850 has been marked as a duplicate of this bug. ***
Comment 3 Christian Persch 2006-12-01 14:01:56 UTC
*** Bug 166373 has been marked as a duplicate of this bug. ***
Comment 4 Akhil Laddha 2011-08-25 04:56:01 UTC
libart development has been stalled and it has been unmaintained now. 
Maintainers don't have future development plan so i am closing all the bugs as WONTFIX. Please feel free to reopen the bugs in future if anyone takes the responsibility for active development.