Jaguar broke my Bluetooth code!
Jaguar broke my Bluetooth code!
- Subject: Jaguar broke my Bluetooth code!
- From: Jonas Salling <email@hidden>
- Date: Sun, 28 Jul 2002 22:57:55 +0200
It is quite likely I have a memory problem somewhere, but as I know
Apple engineers are reading this, I am hoping for some inside
information on what could be going wrong.
Basically, in my OBEX-get handler, I extract the OBEX-headers like this:
CFDictionaryRef dictionaryRef = NULL;
dictionaryRef = OBEXGetHeaders( inOBEXSessionEventData->headerDataPtr,
inOBEXSessionEventData->headerDataLength );
This ends up crashing on Jaguar 6C106. Stack trace as follows:
#0 0x90074e84 in memmove
#1 0x901bc84c in __CFStringCreateImmutableFunnel3
#2 0x9014f9fc in CFStringCreateWithBytes
#3 0x96f20128 in OBEXGetHeaders
#4 0x002d177c in -[JSIrMCTransportImpl OBEXGetHandler:]
(JSIrMCTransportImpl.m:315)
Now, it works fine the first time I'm doing a get, but crashes with a
SIGSEGV the second time (for a different file). Looking at the headers
before calling OBEXGetHeaders, I noticed that the second time around,
the device has passed an empty "name" header, like this:
0000: 01 00 03 49 01 bb 54 6f 74 61 6c 2d 52 65 63 6f
...I..Total-Reco
It is _possible_ (although not likely) that this is causing the problem
in OBEXGetHandler. Unless, of course I have messed up the heap before
all this happens.
Any ideas? Most importantly, it would be really helpful to learn from
Apple developers what could be going wrong in OBEXGetHeaders; as far as
I can tell from using NSLog, the data I'm passing to OBEXGetHeaders is
ok.
Cheers,
Jonas
PS. Also. The received data fits in one frame.
PPS. If there is a better channel for discussing this, let me know.
_______________________________________________
bluetooth-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
Do not post admin requests to the list. They will be ignored.