-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Garbled Message published from OTMql4Zmg #1
Comments
After modifying OTZmqCmdEA.mq4 as shown in the gist and OTZmqSubscribe.py, it looks like the garbage text comes out of the debug messages https://gist.github.com/a3bhea/b865edd21ec7055eb81d |
Very Interesting. This kind of thing is very possible, and is why in general with I'll look carefully at the gist information, and even if I can't find the cause, I appreciate your help with tracking this down; you've given me something to look for. PS: if you "correct" my capitalization, it makes it much harder for me to read the diffs... |
I put some more diagnostic messages in where you were working, but the results are We'll have to wait until someone who knows C can look at it. The Python version is running fine: I'll start adding a test harness for it: Thanks very much for your help on this - it really identified the problem. |
I may have found the problem. Even with the debugging code in there, everything I simply replaced MQL4/Libraries/OTMql4/libzmq.dll with libzmq-v100-mt-4_0_4.dll from http://miru.hk/archive/ZeroMQ-4.0.4~miru1.0-x86.exe Do a git pull and see if this helps, and followup here. |
I spoke too soon: looks like nothing is working either way anymore. I'll try recompiling with debugging enabled and see if I can make some progress. |
I recompiled the mql4zmq.dll against the libzmq-v100-mt-4_0_4.dll from http://miru.hk/archive/ZeroMQ-4.0.4~miru1.0-x86.exe with MSVC 2010 and put them into src/mql4zmq/pre-compiled. Make sure you find the old dlls and renamed them to something like .old, then Sending from Mt4 works fine now, but receiving by Mt4 doesn't yet: nothing is received. Test it out and post back your results here. |
Looks like I've been able to solve the problem by dropping back to v2.2.0. Give me a few days to write it up and test it out, but both directions appear to be working |
Try the most recently checked in code. It's only been lightly tested, but seems to be I'll be testing it more over then next 2 weeks - post your results here when you try it. |
This issue I'm closing because the root of the problem was the MSVC compilation of the DLL. The message has zero length is an unrelated issue, and may be just an overzealous debugging warning from when we were tracking down the DLL issues - I'll look into it. |
The first 16 bytes of a message published from OTMql4Zmg are sometimes (not always)
garbled, including nulls. The rest of the message is fine. The workaround it to pad the
message with 16 bytes.
I checked with wireshark and it is garbled in the transmission.
I checked in Mt4 and it is going to the dll OK - StringToCharArray is not the culprit.
Pity I can't run metatrader under a debugger...
The text was updated successfully, but these errors were encountered: