Closed Bug 287699 Opened 19 years ago Closed 19 years ago

crash when mozilla tries to render an svg (with cairo backend)

Categories

(Core :: SVG, defect)

Sun
Solaris
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: Egon.Nijns, Assigned: tor)

References

()

Details

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8b2) Gecko/20050325
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8b2) Gecko/20050325

Trying to view any SVG with the cairo backend will CRASH mozilla on Solaris.

error report (numbers were different btw):

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  72 (X_PutImage)
  Serial number of failed request:  32
  Current serial number in output stream:  39

After some googling I found this: 
http://lists.freedesktop.org/archives/cairo/2004-January/000956.html

I changed cairo_xlib_surface.c to say 
  image->depth == 32 ? 24 : image->depth,
instead of 
  image->depth,

And this solved the crashing. I'm not creating a patch because everything that's
supposed to be red is now green here (and the other way around)... :). These
colors can probably be fixed by doing a bitshift, but I'm really uncertain about
where to do this and IF this is the right way to proceed.

This issue is a CAIRO vs (24 bpp) XFree issue, so it should ideally be solved by
the cairo team...

Another related link:
http://lists.ximian.com/archives/public/mono-devel-list/2004-May/005998.html

Reproducible: Always
Attached patch 24bpp patchSplinter Review
I have attached a patch, since it solves the crash issue and because I have
just found out that the color-problem I'm having is already described in bug
277799. https://bugzilla.mozilla.org/show_bug.cgi?id=277799
> the color-problem I'm having is already described in bug
> 277799. https://bugzilla.mozilla.org/show_bug.cgi?id=277799

Whoops, I've been too fast with this... Although these issues could be related
they are in no way the SAME issues. I am talking about the colors of SVGs,
whereas bug 277799 is talking about colors of 'in svg embedded (raster) images'
(using <svg:image .... />).
Could you try this patch instead and see what happens?
Assignee: general → general
Component: General → SVG
Product: Mozilla Application Suite → Core
QA Contact: general → ian
Version: unspecified → Trunk
I will be able to try the suggested patch next Tuesday, I'll post the results here.
The suggested patch makes the crashes go away, but the colors are still wrong. 

The butterfly on croczilla
(http://www.croczilla.com/svg/samples/butterfly/butterfly.svg) is blue-ish in
this patched build.

In Circles 1 (http://www.croczilla.com/svg/samples/circles1/circles1.svg) the
red and the blue circle have switch places (actually the colors are
misinterpreted of course).
Assignee: general → tor
Attachment #178601 - Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
Attachment #180591 - Flags: approval1.8b2?
Comment on attachment 180591 [details] [diff] [review]
upstream patch, needed for xlib fallbacks

a=mkaply
Attachment #180591 - Flags: approval1.8b2? → approval1.8b2+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Finally I've been able to rebuild mozilla (this took so long due to solaris
oddities), and I can verify the checkin solved the crashing. Thanks!

Printing a page that contains an SVG still crashes my build (on Solaris), and I
will also file another bug about the swapped colors problem I'm seeing (I can't
find a similar bug yet).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: