Closed Bug 208762 Opened 21 years ago Closed 21 years ago

[gtk2] mozilla hangs on some sparc ultra 60 due to multi visual

Categories

(Core :: XUL, defect)

Sun
Solaris
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: iamawalrus, Assigned: iamawalrus)

References

Details

(Keywords: hang)

Attachments

(2 files, 1 obsolete file)

mozilla 1.2.1 crashes on sun sparc ultra 60 used a ffb card because the visual
used in gfx and widget are not the same.
In gfx, mozilla uses gdk_rgb_get_visual() to get the visual while gdkwindow uses
 gdk_screen_get_system_visual. The two visuals are the same in most of time and
different on ,e.g., Sun Sparc Ultra 60 used a ffd card.
In mozilla for gtk1.2, there are codes to force the gtkwidget uses the same
visual as gfx. I generate a patch according to it and it fixes the crash.
Attached patch patch (obsolete) — Splinter Review
Attachment #125213 - Flags: review?(blizzard)
Comment on attachment 125213 [details] [diff] [review]
patch

This doesn't feel right.  Shouldn't we just be using the right visual instead
of pushing and popping another visual?
It is hard to determine which one is right. We just make sure they use the same
visual. I have another patch which replace all the gdk_rgb_get_visual in gfx
side. That patch affect much more than the visual. It also needs replacing
gdk_rgb_get_cmap() with gdk_colormap_get_system() and gdk_rgb_xpixel_from_rgb()
with gdk_rgb_find_color().
This patch is simple and works.
I'm wondering if we just need to use the same calls to get the visual in the
window code instead of pushing and popping around the calls that create the window?
Attached patch patchSplinter Review
I just found the gtk_widget_push_visual/pop_visual were deprecated in gtk2.0. I
have tested on the Sun Blade 60, what makes it work is the
gtk_widget_push_colormap/pop_colormap.

I wish I could use the same calls to get the visual and colormap in the window
code but that parts of code are in gtk/gdk side.
Attachment #125213 - Attachment is obsolete: true
Attachment #125213 - Flags: review?(blizzard)
Sorry, I made a mistake in the summary. The sympton should be 'hang' instead of
'crash'. And following warning can be seen during the hang:
(<unknown>:1051): Gdk-WARNING **: Attempt to draw a drawable with depth 24 to a
drawable with depth 8

(<unknown>:1051): Gdk-WARNING **: Attempt to draw a drawable with depth 24 to a
drawable with depth 8
Keywords: crashhang
Summary: [gtk2] mozilla crashes on some sparc ultra 60 due to multi visual → [gtk2] mozilla hangs on some sparc ultra 60 due to multi visual
We are seeing this same behavior on AIX with certain graphics cards. I will test
this patch for AIX as well.
This patch does fix the crash on AIX machines with low color graphics adapters.
This patch just sets the visual on the widget where it should be inherited for
all the subwindows.  Does this work for you guys?
The new patch fixes the problem on AIX as well.
Sorry for my lateness. The patch works for me too. Thanks!
Checked in.  Thanks!
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: