Closed Bug 1097592 Opened 10 years ago Closed 10 years ago

[gtk3] freeze in gdk_x11_window_set_user_time()

Categories

(Core :: Widget: Gtk, defect)

35 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: stransky, Assigned: stransky)

References

Details

Attachments

(2 files)

After some time running Firefox freezes in startup notification code, resp. in gdk_x11_window_set_user_time() where gdk_drawable_get_display() fails to get the display.

3716	void
3717	gdk_x11_window_set_user_time (GdkWindow *window,
3718	                              guint32    timestamp)
3719	{
3720	  GdkDisplay *display;
3721	  GdkDisplayX11 *display_x11;
3722	  GdkToplevelX11 *toplevel;
3723	  glong timestamp_long = (glong)timestamp;
3724	  Window xid;
3725	
3726	  if (GDK_WINDOW_DESTROYED (window) ||
3727	      !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
3728	    return;
3729	
3730	  display = gdk_drawable_get_display (window);
3731	  display_x11 = GDK_DISPLAY_X11 (display); <<< display is null here
Attached file _back
backtrace
The problem is PR_FindFunctionSymbolAndLibrary() in SetUserTimeAndStartupIDForActivatedWindow(). 

Sometimes a gtk2 library is choosen (like libflashplugin.so) so gdk_x11_window_set_user_time() from it freezes with null display.
Attached patch patchSplinter Review
Attachment #8522971 - Flags: review?(karlt)
Comment on attachment 8522971 [details] [diff] [review]
patch

The change is good, thanks, but I don't know that it will fix all related problems.
PR_FindFunctionSymbolAndLibrary() only considers libraries already loaded.
If GTK2 and GTK3 libraries are both loaded in the process, then there may be other problems.  Or perhaps this works because ld.so always prefers symbols from the first library loaded.

Is this from loading libflashplugin.so in the main process to check its MIME type?  Is it not unloaded after that happens?
Bug 939796 may be relevant.
Attachment #8522971 - Flags: review?(karlt) → review+
IMHO it comes from the Bug 939796 because mime types are still loaded in-process. But I haven't see any other conflicts yet.
Keywords: checkin-needed
Hi Martin,

could you post a link to  try run, thanks!
Assignee: nobody → stransky
Flags: needinfo?(stransky)
Keywords: checkin-needed
The try is here: https://tbpl.mozilla.org/?tree=Try&rev=60e107e0dea0
Flags: needinfo?(stransky)
Looks okay (at least the modified gtk parts).
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/de71b9d01773
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: