Ticket #50 (closed defect: fixed)

Opened 5 months ago

Last modified 2 months ago

Java implementation of send_data appears to mangle bytes above 127

Reported by: aanand Assigned to: raggi
Priority: major Milestone: Java/JRuby support
Keywords: Cc:


It looks like the Java implementation of send_data sends all bytes above 127 as 63. I've attached a simple client/server test I ran, where the client sends every byte from 0 to 255 and the server prints out the bytes it receives. Running it under MRI produces the correct result - the server receives exactly the same data - but running it under jruby with em_reactor.jar produces the erroneous result on my machine.

I'm on OS X 10.4, JRuby 1.1, and an EM gem/jar built from the raggi branch, revision 738.


run.txt (4.4 kB) - added by aanand on 07/10/08 09:55:00.
EventMachineClientTest.rb (328 bytes) - added by aanand on 07/10/08 09:55:19.
EventMachineServerTest.rb (318 bytes) - added by aanand on 07/10/08 09:55:31.

Change History

07/10/08 09:55:00 changed by aanand

  • attachment run.txt added.

07/10/08 09:55:19 changed by aanand

  • attachment EventMachineClientTest.rb added.

07/10/08 09:55:31 changed by aanand

  • attachment EventMachineServerTest.rb added.

07/10/08 09:58:27 changed by aanand

Whoops, forgot to mention: the reason I think it's sending that's the culprit (rather than receiving) is that running the server under JRuby and the client under MRI produces the correct result. Running the server under MRI and the client under JRuby doesn't work on my machine - the client hangs - but I don't know enough about EM to know whether this is a bug in EM or my code.

07/25/08 09:55:29 changed by raggi

  • owner set to raggi.
  • status changed from new to assigned.

07/25/08 09:56:41 changed by raggi

  • priority changed from minor to major.

Real defect, upping priority.

Needs some investigation, but tmm1 was noticing binary data being corrupted also.

07/25/08 09:56:52 changed by raggi

  • milestone set to Java/JRuby support.

09/13/08 09:51:32 changed by raggi

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in [771] by tmm1, applied to branches/raggi.