[haiku-development] Re: BLooper::IsLocked()

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 30 Sep 2007 18:08:42 +0200 CEST

Stephan Assmus <superstippi@xxxxxx> wrote:
> I've had a crash when quitting an app with an offscreen bitmap. The 
> BBitmap 
> destructor calls fWindow->Lock(); delete fWindow. The crash was in 
> the 
> BLooper::IsMessageWaiting() called from the destructor because the 
> AssertLock() call failed. But the destructor called Lock() on top of 
> what 
> the BBitmap destructor did, so I think the looper was not in the 
> global 
> looper list (and then IsLocked() returns false). This looper has 
> never been 
> run either. Should IsLocked() simply test the fTerminating flag and 
> then 
> proceed to the fOwner based check?

I don't think that's a good idea. The looper is removed from the list 
in the BLooper destructor - as the last thing that happens; I don't 
know why the assert failed, though. But if your situation is 
reproducible, it should be fixable, too :-)
What happens under BeOS in this case?

Bye,
   Axel.


Other related posts: