[haiku-bugs] Re: [Haiku] #4260: [ScreenSaver] freezes when switching screensavers

  • From: "anevilyak" <trac@xxxxxxxxxxxx>
  • Date: Wed, 04 Sep 2013 19:05:56 -0000

#4260: [ScreenSaver] freezes when switching screensavers
---------------------------------------+----------------------------
   Reporter:  diver                    |      Owner:  axeld
       Type:  bug                      |     Status:  closed
   Priority:  normal                   |  Milestone:  R1
  Component:  Preferences/ScreenSaver  |    Version:  R1/Development
 Resolution:  fixed                    |   Keywords:
 Blocked By:                           |   Blocking:
Has a Patch:  0                        |   Platform:  All
---------------------------------------+----------------------------

Comment (by anevilyak):

 That report shows a pretty straightforward reason for the deadlock: the
 window thread is in MessageReceived() waiting for the renderer thread to
 exit. Being in MessageReceived implies that thread holds the window lock.
 Meanwhile, the renderer thread tries to grab the window lock, which it
 won't be able to get because of the aforementioned thread state. Without
 looking more closely, two possible resolutions immediately come to mind:

 a) the window doesn't wait for the renderer thread, and instead the
 renderer sends the window a message indicating it's terminated right
 before exiting, at which point the window takes the actions it would've
 taken after the thread exited,

 or b) the renderer thread simply doesn't touch the window directly at all,
 and instead sends it messages to ask it to do things on its behalf, so it
 never has to do the aforementioned locking at all.

--
Ticket URL: <http://dev.haiku-os.org/ticket/4260#comment:6>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: