[rabbitmq-discuss] rabbitmq-c (librabbizmq) works only partially.

TZHA sophiewenxizhang at googlemail.com
Mon Nov 28 13:13:57 GMT 2011


Hi David,

thanks for the reply.

The error I got with the latest version of rabbitmq-c was:

"A buffer overrun has occurred in z_rabbitmq_client_consumer.exe which
has corrupted the program's internal state. Press Break to debug the
program or Continue to terminate the program.

For more details please see Help topic 'How to debug Buffer Overrun
Issues'.

Beaks point went to "#if defined (_CRTBLD) && !defined (_SYSCRT)
    DebuggerWasPresent = IsDebuggerPresent();
    _CRT_DEBUGGER_HOOK(_CRT_DEBUGGER_GSFAILURE);
#endif  /* defined (_CRTBLD) && !defined (_SYSCRT) */" in gs_report.c
from VS 2010.

I started VS 2010 debugging on a consumer project (c++) which uses the
rabbitmq-c c api.

I guess I finally found out at least the reason for my previous
error.  I used a c++ wrapper (amqpcpp  - modified) which calls
amqp_simple_rpc to implement the consumer, which then caused the error
(but runs correctly with DEBUG).

I modified the code to use amqp_basic_consume (following the
consumer.c), the c++ consumer  application works now.

However, I still have the buffer overrun problem with the latest
version. I used MinGW to build the package.  Do you whether there is a
guide/readme for cmake build?





On 28 Nov., 13:28, David Wragg <da... at rabbitmq.com> wrote:
> Hi,
>
> John  <tianning.zh... at zanox.com> writes:
> > I am using rabbitmq-c under windows (VS 2010). The basic get features
> > works just fine. However when I tested the "consumer" feature I
> > encountered the following problem.
>
> What approach to building rabbitmq-c under windows are you using?  Are
> you running the amqp_consumer example program, or your own consumer
> code?
>
> If you are developing under Visual Studio, I recommend using the
> cmake-based build, as that allows you to build librabbitmq and the
> examples within VS.
>
> > 1. Starting application debugging from VS 2010 (even without any break points
> > and in release configuration) everything looks ok (calling amqp_simple_rpc
> > returns AMQP_RESPONSE_NORMAL)!
>
> > 2. Starting the application without debuging I got an error in calling
> > amqp_rpc_reply_t amqp_simple_rpc
>
> > with amqp_response_type_enum reply_type = AMQP_RESPONSE_LIBRARY_EXCEPTION
> > and library_error = ERROR_BAD_AMQP_DATA
>
> > I guess there is some "DEBUG" coding in source. Can anyone tell we
> > where I can make changes to solve this problem??
>
> There's nothing in the rabbitmq-c codebase ot make it behave differently
> in debug builds.
>
> > I have downloaded rabbitmq-c-default from 21.09.2011 and rebuild the
> > sources under windows. Rabbitmq servers have the version 2.4.1 and
> > 2.6.1.
>
> > I also tried the newest version from the server (dated 25.11, default
> > and the version 7cecf64752fd) - there I got the buffer overrun error.
>
> There have not been significant changes to the rabbitmq-c code between
> those two versions.  I recommend that you use the latest version,
> because it has cmake build support.  Could you say more about the buffer
> overrun you are seeing?
>
> David
>
> --
> David Wragg
> Staff Engineer, RabbitMQ
> VMware, Inc.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list