[interfacekit] Re: Broken BMessage

On 2004-08-25 at 01:38:15 [+0200], Erik Jaesler wrote:
> Well, I've been testing with the code below, and I haven't found any
> crashes.

I don't get the crashes with you updated version anymore either.

>  I have found several bugs, however: a couple of memory leaks,
> and an incorrect index bounds check -- which shows up because the code
> below adds two items, and then tries to reference the third index (2).
> =)  So good stuff there.  I'm going to check the changes in and keep
> poking at it; please let me know if your crashes magically disappear. =)

The little piece of test code doesn't crash anymore, but the unit tests 
still don't work very well.

The BNodeInfo test still crashes the registrar:

loading symbols
segment violation occurred
memcpy_pIII:
memcpy_pIII:
+0047  ec0912e7:   *          068a    movb    (%esi), %al
main_mime:sc
   frame         retaddr
fd081fac   ecfb43c4  BPrivate::BDataBuffer::BDataReference::Create(void *, 
unsigned long, BPrivate::BDataBuffer::BDataReference *&, bool) + 00000038
fd081fd8   ecfb42c6  BPrivate::BDataBuffer::BDataBuffer(void *, unsigned 
long, bool) + 0000002a
fd081ff8   ecfbe767  BMessage::AddData(char const *, unsigned long, void 
const *, long, bool, long) + 00000313
fd082034   ecfbcc16  BMessage::Unflatten(BDataIO *) + 0000060a
fd08219c   ecfbc5b4  BMessage::Unflatten(char const *) + 00000030
fd0821f0   ecfba1d6  BLooper::ConvertToMessage(void *, long) + 00000066
fd082214   ecfba152  BLooper::ReadMessageFromPort(long long) + 00000046
fd082248   ecfb99f9  BLooper::MessageFromPort(long long) + 00000021
fd082260   ecfba284  BLooper::task_looper(void) + 00000048
fd08228c   ecfba05a  BLooper::_task0_(void *) + 00000036
fd0822a0   ec0851ed  thread_start + 00000039
main_mime:

The BAppFileInfo unit test doesn't crash anymore in the "Supported Types 
Test", but the test case fails and the following test case ("Icon Test") 
hangs. It seems like the "main_mime" thread (a BLooper thread) gets 
terminated somehow and the test app is waiting for a reply on a temporary 
message port for good. The same holds for the BMimeType unit test.

The BApplication unit test (the remote application, to be precise) crashs:

loading symbols
segment violation occurred
BMessage::Unflatten(BDataIO *):
Unflatten__8BMessageP7BDataIO:
+05d3  ecfbcbdf:   *          068b    movl    (%esi), %eax
AppRunTestApp1:sc
   frame         retaddr
fd0015d8   ecfbc5b4  BMessage::Unflatten(char const *) + 00000030
fd00162c   ecfba1d6  BLooper::ConvertToMessage(void *, long) + 00000066
fd001650   ecfba152  BLooper::ReadMessageFromPort(long long) + 00000046
fd001684   ecfb99f9  BLooper::MessageFromPort(long long) + 00000021
fd00169c   ecfba284  BLooper::task_looper(void) + 00000048
fd0016c8   ecfb2780  BApplication::run_task(void) + 00000028
fd0016d8   ecfb188e  BApplication::Run(void) + 00000056
fd0016f0   80002809  CommonTestApp::Run(void) + 0000001d
fd001708   800023ae  main + 0000008e
fd001844   80002205  _start + 00000061
AppRunTestApp1:

Furthermore the BMessenger::SendMessageTest1 test case fails.

CU, Ingo

Other related posts: