Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.IndexOutOfRangeException using Push sockets #20

Closed
tobi-tobsen opened this issue Nov 11, 2012 · 3 comments
Closed

System.IndexOutOfRangeException using Push sockets #20

tobi-tobsen opened this issue Nov 11, 2012 · 3 comments

Comments

@tobi-tobsen
Copy link
Contributor

Context:

I tried porting the libzmq performance tests since the netmq readme (https://github.com/zeromq/netmq#netmq) suggested these are missing and I were curious and wanted to help you guys).

I created the throughput test along the lines to the original libzmq version. If you want I can create a pull request from that commit: https://github.com/tobi-tobsen/netmq/tree/perf_throughput

Bug:

When running the tests I getting the following exception on the push-side (remote_thr):

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.   at NetMQ.zmq.ByteArraySegment.set_Item(Int32 i, Byte value) in C:\Users\tobsen\Documents\GitHub\netmq\src\NetMQ\zmq\ByteArraySegment.cs:line 110   at NetMQ.zmq.V1Encoder.MessageReady() in C:\Users\tobsen\Documents\GitHub\netmq\src\NetMQ\zmq\V1Encoder.cs:line 83   at NetMQ.zmq.V1Encoder.Next() in C:\Users\tobsen\Documents\GitHub\netmq\src\NetMQ\zmq\V1Encoder.cs:line 36   at NetMQ.zmq.EncoderBase.GetData(ByteArraySegment& data, Int32& size) in C:\Users\tobsen\Documents\GitHub\netmq\src\NetMQ\zmq\EncoderBase.cs:line 87   at NetMQ.zmq.StreamEngine.OutEvent() in C:\Users\tobsen\Documents\GitHub\netmq\src\NetMQ\zmq\StreamEngine.cs:line 267   at NetMQ.zmq.IOObject.OutEvent() in C:\Users\tobsen\Documents\GitHub\netmq\src\NetMQ\zmq\IOObject.cs:line 96   at NetMQ.zmq.Poller.Loop() in C:\Users\tobsen\Documents\GitHub\netmq\src\NetMQ\zmq\Poller.cs:line 195   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   at System.Threading.ThreadHelper.ThreadStart()

Steps to reproduce:

  • get tobi-tobsen@6fef662
  • compile the solution
  • run the following: local_thr.exe tcp://127.0.0.1:4711 300 1000
  • run the following: remote_thr.exe tcp://127.0.0.1:4711 300 1000
@somdoron
Copy link
Member

i think i fixed this with the last pull request.

Regarding the performance test, very nice, please add pull request and i will merge it.

@somdoron
Copy link
Member

tobi please confirm that it's fixed

@tobi-tobsen
Copy link
Contributor Author

This seems to be fixed. I created a pullrequest for the performance test #24 . However that doesn't currently work due to another issue which results in the received message being empty (empty as in zero size). I will create a new bug report for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants