[Haiku-commits] r24228 - haiku/trunk/src/kits/app
Michael Lotz
mmlr at mlotz.ch
Tue Mar 4 12:44:48 CET 2008
On Tue, 4 Mar 2008 07:08:22 +0100, anevilyak at BerliOS wrote
> Author: anevilyak
> Date: 2008-03-04 07:08:20 +0100 (Tue, 04 Mar 2008)
> New Revision: 24228
> ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=24228&view=rev
>
> Modified:
> haiku/trunk/src/kits/app/Message.cpp
> Log:
> Fixed a crash that would happen sometimes with BInvoker: If an
> invoker was set up with a null replyTo, sometimes BMessage would
> crash calling IsSourceWaiting() after delivering the message. This appeared
> to be because fHeader was NULL, but I'm not entirely certain if this
> is actually supposed to be possible, so this may be masking a different
> bug. This was observable using the multiline paste spam BAlert in
> Vision, which would sometimes but not always crash in Haiku after hitting
> any of the buttons to dismiss it, though consistently when calling
> IsSourceWaiting() from the private BMessage::_SendMessage().
This definitely hides some other bug. The fHeader field must _always_ be
valid. And from quickly reviewing the code paths it also is always initialized
correctly after being cleared. There are some possibilities: a thread safety
issue, corruption of the message data or usage of a destroyed BMessage object.
I'd tend to the first or the last. As there is no locking involved it could
easily be a thread safety issue that happens when a BMessage is shared by
multiple threads that do not properly synchronize themselves. I am not sure
the R5 BMessage is thread safe, and I don't know if it should be at all. I
thought I had read somewhere that it is not thread safe, but I can't find that
source anymore. Anyway, I will look into it and try reproducing using the
steps you mentioned above. Thanks for the pointers!
Regards
Michael
More information about the Haiku-commits
mailing list