yihtserns / bluecove

Automatically exported from code.google.com/p/bluecove
0 stars 0 forks source link

RFCOMM write crashing on OSX 10.6.2 #104

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. compile latest SVN (3027) on Mac OSX 10.6.2 after changing target to x86_64 
(compilation 
using mvn, passing all tests: Tests run: 52, Failures: 0, Errors: 0, Skipped: 0)
2. running bluecove-tester (java -cp 
/PATH_TO_LIB/bluecove-2.1.1-SNAPSHOT.jar:bluecove-
tester.jar net.sf.bluecove.se.Main)
3. opening an RFCONN connection using: more -> client connection -> connect 
(all works fine)
4. trying to send anything (in example: "test") as String.getBytes()+CR or as 
String.getBytes()
5. application crashes

The same happens if writing a Java application with the following code:

StreamConnection conn = (StreamConnection)Connector.open(bd.getServiceUrl());
OutputStream os = conn.openOutputStream();
String testStr = "test_string";
os.write(testStr.getBytes());

Please note that reading from the channel works fine.

What is the expected output? What do you see instead?
The client should keep on working, instead it crashes with the attached report

Original issue reported on code.google.com by marfo...@gmail.com on 1 Mar 2010 at 4:31

Attachments:

GoogleCodeExporter commented 8 years ago
Confirmed using bluecove-tester on x86_64 
----
Thread 20 Crashed:                                                              

0   libbluecove.jnilib          0x000000011fdd63d0 -[RFCOMMChannelDelegate
rfcommChannelWriteComplete:refcon:status:] + 107                
1   com.apple.Bluetooth         0x00007fff824a6843
-[IOBluetoothRFCOMMChannel(IOBluetoothRFCOMMChannelPrivate) 
processIncomingData:] + 1031
2   com.apple.Bluetooth         0x00007fff824a460d
-[IOBluetoothRFCOMMChannel(IOBluetoothRFCOMMChannelPrivate) handleMachMessage:] 
+ 53    
3   com.apple.Foundation        0x00007fff863d408b __NSFireMachPort + 103        

4   com.apple.CoreFoundation    0x00007fff801f2f7e __CFMachPortPerform + 366     

5   com.apple.CoreFoundation    0x00007fff801cb551 __CFRunLoopRun + 5201         

6   com.apple.CoreFoundation    0x00007fff801c9c2f CFRunLoopRunSpecific + 575    

7   com.apple.CoreFoundation    0x00007fff801c99b6 CFRunLoopRun + 70             

8   libbluecove.jnilib          0x000000011fdcf340 oneNativeThreadMain(void*) + 
289  

9   libSystem.B.dylib           0x00007fff85c5cf8e _pthread_start + 331          

10  libSystem.B.dylib           0x00007fff85c5ce41 thread_start + 13             

Original comment by skarzhev...@gmail.com on 31 Mar 2010 at 5:30

GoogleCodeExporter commented 8 years ago
If I could be of any help, for what I'm doing I just completely commented out 
the code in:
OSXStackRFCOMM.mm
RFCOMMChannelController::rfcommChannelWriteComplete(void* refcom, IOReturn 
error) (line 175 to 182)

In this way the data gets transmitted, but of course the sending doesn't get 
"acknowledged" and therefore the 
sending thread doesn't know whether data has been sent or not. It's just a 
"dirty" fix to have bluecove 
"working" waiting for an official fix from your side.

Thank you very much for noticing this issue!

~Claudio M.

Original comment by marfo...@gmail.com on 31 Mar 2010 at 5:51

GoogleCodeExporter commented 8 years ago
It looks like we faced the same problem. I'll attach crash log in case it helps 
research the issue.

Original comment by eostrouk...@gmail.com on 15 Jun 2010 at 11:43

Attachments:

GoogleCodeExporter commented 8 years ago
Is there any information on what causes the problem? Can we somehow avoid it?

Original comment by eostrouk...@gmail.com on 15 Jun 2010 at 11:45