[haiku-bugs] Re: [Haiku] #11982: [Tracker] crashes in BCompressionAlgorithm::BAbstractInputStream::Read

  • From: "anevilyak" <trac@xxxxxxxxxxxx>
  • Date: Mon, 10 Aug 2015 18:40:18 -0000

#11982: [Tracker] crashes in BCompressionAlgorithm::BAbstractInputStream::Read
------------------------------------+----------------------------
Reporter: vidrep | Owner: waddlesplash
Type: bug | Status: in-progress
Priority: normal | Milestone: R1/beta1
Component: Applications/Tracker | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking: 12039, 12264
Has a Patch: 0 | Platform: All
------------------------------------+----------------------------

Comment (by anevilyak):

Replying to [comment:16 pulkomandy]:

The addPosesThread locks a BMessenger at each iteration, and if that
fails, throws an exception that makes it exit the loop. However, this only
works if the PoseView is destructed with the looper locked. That would
make sure the thread stops running before the destruction starts. This
should probably be done where the PoseView destructor is called, probably
inside the window destructor?

I don't see the problem with the mentioned code. All calls that it makes
to the PoseView itself occur while it holds the lock, during which it
shouldn't be possible for the view to be removed/destroyed, as that's
normally only done on a directory switch or window close, both of which by
definition happen with the looper locked, as they're done in the message
loop. If someone's deleting the view without locking the looper, then
that's a bigger problem, but has nothing to do with the AddPoses thread.

--
Ticket URL: <https://dev.haiku-os.org/ticket/11982#comment:17>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: