Exception on Windows x64
I am trying to run a simple example that creates a channel after compiling the library and its dependencies on x64 for Windows.
All I have done so far is add a reference and copy the following DLLs to the execution folder:
- boost_chrono-vc141-mt-x64-1_67.dll
- boost_system-vc141-mt-x64-1_67.dll
- libcrypto-1_1-x64.dll
- libssl-1_1-x64.dll
- rabbitmq.4.dll
- SimpleAmqpClient.2.dll
and in terms of code, I just added two lines:
`#include "stdafx.h" #include <SimpleAmqpClient/SimpleAmqpClient.h>
int main() { AmqpClient::Channel::ptr_t connection = AmqpClient::Channel::Create("localhost"); return 0; } ` This is currently throwing an exception and I am not sure if this is a problem with my compilation of the libraries or if the libraries do not support Win x64 systems at all.
this is the exception I get:
Unhandled exception at 0x00007FFEA67A1F38 in rmq-test.exe: Microsoft C++ exception: AmqpClient::AmqpLibraryException at memory location 0x0000000A772FF360. occurred
For what is worth, I am attaching the project where I reproduce the issue.
Can you please let me know if what I am trying to do is at all possible or if there is simply something I am doing wrong?
Thanks!
Check if the RabbitMQ server is running ?
It is indeed running. Since I asked this question I created a .NET Core client and it worked the first time with no issues, just installing the client library from NuGet, so RabbitMQ is not the issue. It has to be something in the compilation process (and the rabbit hole that it is to compile SimpleAmqp because of all the dependencies). I am not very familiar with compiling C++ libraries, and I am most probably doing something wrong, but of course, I have no idea what it is.
I guess I will just keep trying, all I wanted here was confirmation that it was indeed possible to compile SimpleAmpq for Windows x64 or if there was any known incompatibility.
Yes, it is possible. I have compiled the SimpleAmqpClient for Windows x64.
Perfect, thanks for letting me know, I will report back when I get it to work.
The same error. OS: Windows 10, Development Environment: Visual Studio 15, dependencies: SImpleAmqpClient 2.4.0 boost/1.68 rabbitmq.4/0.6.0
At some point, incorrect processing of string variables occurs. As a result, incorrect variables are inserted into the "Channel :: Channel" constructor, shifted by several characters, or even the memory allocated for variables is unreadable (the message "Error reading characters in a string").
As a result, the "getaddrinfo" in "amqp_socket::amqp_open_socket_noblock" function cannot read the IP address for connection and throws an error.
I had cases when the line was displaced on some characters to the left. However, even in these cases, variables with a login and password are passed to the amqp_open_socket_noblock function as unreadable.
Update: I was able to make it work consistently in DEBUG mode, however, when I build in RELEASE mode I get exactly the same behavior reported by @ahousetov15. It seems unlikely that this is a problem with something we are doing when it works in DEBUG mode with no exception, so I suspect this is some incompatibility with one of the dependencies newer versions.
I am using BOOST 1.68.0; RabbitMQ-C 4.
@chaithubk do you recall which version of BOOST were you using last time it worked for you?
I recorded a short video demonstrating the issue: https://youtu.be/07P1XRHISkQ
Does anyone have any idea how to solve this one? Do you think that going back to another version of BOOST may fix it? Does anyone have any documented case of a version of BOOST that works with SimpleAmqpClient in both debug and release modes?
Any help is appreciated.
Thanks!
@murven i have the same error do you reslove it !
@ChinigamiHunter, yes, you need to build SimpleAmqpClient again with the dependencies in release mode as well. That should fix it.