Closed Bug 646714 Opened 9 years ago Closed 9 years ago

gdk_flush() should be used before gdk_error_trap_pop()

Categories

(Core :: Widget: Gtk, defect)

x86
Solaris
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)

References

Details

Attachments

(2 files)

A customer reports a crash with following stack

#9  0xfcef3600 in X11Error () from /tools/usrlocal/firefox-4.0/libxul.so
#10 0xfc6c0a34 in _XError () from /usr/openwin/lib/libX11.so.4
#11 0xfc6a00a8 in _XReply () from /usr/openwin/lib/libX11.so.4
#12 0xfc6a7134 in XSync () from /usr/openwin/lib/libX11.so.4
#13 0xfe09c750 in void nsShmImage::Release() () from /tools/usrlocal/firefox-4.0/libxul.so
#14 0xfe0e7b88 in already_AddRefed<nsShmImage>nsShmImage::Create(const gfxIntSize&,Visual*,unsigned) ()
  from /tools/usrlocal/firefox-4.0/libxul.so
#15 0xfe0e7ddc in already_AddRefed<gfxASurface>nsShmImage::EnsureShmImage(const gfxIntSize&,Visual*,unsigned,nsRefPtr<nsShmImage>&) () from /tools/usrlocal/firefox-4.0/libxul.so

The crash is gone, if --sync is used.

I checked widget/src/shared/nsShmImage.cpp.

We missed gdk_flush() before gdk_error_trap_pop().
Attached patch patchSplinter Review
Assignee: nobody → ginn.chen
Status: NEW → ASSIGNED
Attachment #523200 - Flags: review?(karlt)
Comment on attachment 523200 [details] [diff] [review]
patch

>+    gdk_flush();

I'd prefer XSync(dpy, False) as gdk_flush will sync all GDK displays and we only need to sync this one.
It would also be more XP.
Attachment #523200 - Flags: review?(karlt) → review+
Attached patch patch to commitSplinter Review
Attachment #523218 - Flags: approval2.0?
No patches are being taken for Gecko 2.0 yet.
If/when patches are considered, they should be landed on mozilla-central first.
If you have commit access, for landing on mozilla-central, either check with the sheriff, or outside California hours, patches may be landed on cedar and will be merged to mozilla-central the next day.
http://hg.mozilla.org/projects/cedar/rev/ec456dbb7c89
Whiteboard: fixed-in-cedar
http://hg.mozilla.org/mozilla-central/rev/ec456dbb7c89
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla2.2
Attachment #523218 - Flags: approval2.0?
You need to log in before you can comment on or make changes to this bug.