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 121850 - Broken asserts
Broken asserts
Status: RESOLVED DUPLICATE of bug 155472
Product: libart
Classification: Deprecated
Component: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 155472
 
 
Reported: 2003-09-09 17:01 UTC by George Lebl
Modified: 2005-07-03 16:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Stopgap patch. Doesn't fix the asserts, but fixes the crashes (1000 bytes, patch)
2003-09-09 17:07 UTC, George Lebl
none Details | Review

Description George Lebl 2003-09-09 17:01:56 UTC
In art_render_gradient.c on line 340, the asserts:

  assert ((offset_fraction != stops[ix-1].offset) ||
	  (d_offset >= 0.0));
  assert ((offset_fraction != stops[ix].offset) ||
	  (d_offset <= 0.0));

are broken.  I'll be commenting this stuff out in CVS as a stopgap
meassure.  These asserts don't seem to be hit anyway and when they were
"fixed" recently by using EPSILON they just resulted in crashes.  GDM is a
user here and will crash sometimes with these, so any change above should
be tested with the graphical GDM greeter using different themes (especially
ones with svg backgrounds of course like circles)
Comment 1 George Lebl 2003-09-09 17:07:46 UTC
Created attachment 19827 [details] [review]
Stopgap patch.  Doesn't fix the asserts, but fixes the crashes
Comment 2 George Lebl 2003-09-09 22:45:43 UTC
Actually what I put above was the reverted asserts.  Those may be
wrong too (they compare doubles with != , how "wronger" can you get).
 Here are the ones that really cause havoc (as is in 2.3.15 and not in
2.3.14)

  assert (fabs (offset_fraction - stops[ix-1].offset) > EPSILON ||
	  (d_offset >= 0.0));
  assert (fabs (offset_fraction - stops[ix].offset) > EPSILON ||
	  (d_offset <= 0.0));
Comment 3 George Lebl 2003-09-10 15:50:17 UTC
the patch is in cvs and in 2.3.16 now.  However this obviously doesn't
close the bug as the asserts are now just commented out and not fixed.
 Are they truly needed anyway?
Comment 4 Kjartan Maraas 2005-07-03 16:28:14 UTC
Marking this as duplicate of bug 155472 since that has a patch to #if 0 the
asserts and tries to clean up if the conditions fail.

*** This bug has been marked as a duplicate of 155472 ***