Jira created: https://issues.apache.org/jira/browse/PROTON-1335 ________________________________ From: Adel Boutros <[email protected]> Sent: Thursday, October 27, 2016 4:02:17 PM To: Alan Conway; [email protected] Cc: kim.vdriet Subject: Re: [Proton-c] [0.14.0] C++ sending/receiving bytes and map messages
Adding the mailing list. Otherwise Cliff won't see the mail. Regards, Adel ________________________________ From: Alan Conway <[email protected]> Sent: Thursday, October 27, 2016 3:35:04 PM To: Adel Boutros Cc: kim.vdriet Subject: Re: [Proton-c] [0.14.0] C++ sending/receiving bytes and map messages On Thu, 2016-10-27 at 09:36 +0000, Adel Boutros wrote: > Hello Alan, > > I have a very simple reproducible test case for the sendBytes on > Visual Studio 2008 > Actually, you have to be in "RelWithDebInfo" because in "Debug" mode > it passes. > > PS: I don't have the issue using Visual Studio 2013 (nsvcr90.dll is > for Visual 2008 if I am not mistaken). > > Is Proton supposed to work using Visual Studio 2008? Or do you > recommend using at least 2013? We do still support C++03 so in principle it should work. Cliff can you comment on recommended Windows compilers? The new C++ code may well be stretching older compilers on template support ;( I would like to investigate this anyway, old compiler problems sometimes point to borderline code that might cause trouble in other circumstances if ignored. Can you make a JIRA? Thanks, Alan. > > Code > ---------------- > #include <string> > > #include <proton/binary.hpp> > #include <proton/message.hpp> > > int main() { > proton::message m; > m.body(proton::binary(std::string("m"))); > //m.body(proton::binary("m")); > return 0; > } > > Exception > -------------- > Unhandled exception at 0x623ce2e4 in messaging-feature-tests.dll: > 0xC0000005: Access violation reading location 0x0000000001479000 > > Stack > ----------- > msvcr90.dll!00000000623ce2e4() > [Frames below may be incorrect and/or missing, no symbols loaded > for msvcr90.dll] > > qpid-proton.dll!pn_buffer_append(pn_buffer_t * > buf=0x000007f7b22842bf, const char * bytes=0x0000000001477cd0, > unsigned __int64 size=0) Line 174 > C++ > qpid-proton.dll!pni_data_intern(pn_data_t * > data=0x0000000001477cd0, const char * start=0x00000000014785d0, > unsigned __int64 size=15595744) Line 437 > C++ > qpid-proton.dll!pni_data_intern_node(pn_data_t * > data=0x0000000000edf8e0, pni_node_t * node=0x0000000000000000) Line > 470 + 0x12 bytes > C++ > qpid-proton-cpp.dll!proton::codec::`anonymous > namespace'::pn_data_put_amqp_binary(pn_data_t * d=0x0000000000edf9c0, > const proton::binary & x={...}) Line 114 + 0x55 bytes > C++ > qpid-proton- > cpp.dll!proton::codec::encoder::insert<proton::binary,proton::binary > const & __ptr64>(const proton::binary & x={...}, int (pn_data_t *, > const proton::binary &)* put=0x000007f7b36edd1f) Line 121 + 0x11 > bytes C++ > messaging-feature- > tests.dll!proton::value::operator=<proton::binary>(const > proton::binary & x={...}) Line 88 > C++ > messaging-feature- > tests.dll!proton::value::value<proton::binary>(const proton::binary & > x={...}, void * __formal=0x0000000000000000) Line 82 + 0x3f bytes > C++ > messaging-feature-tests.dll!main() Line 8 + 0x6c bytes > C++ > messaging-feature-tests.dll!__tmainCRTStartup() Line 582 + 0x19 > bytes > C > kernel32.dll!000007f9da961842() > ntdll.dll!000007f9dcb24f45() > > Regards, > Adel > From: Alan Conway <[email protected]> > Sent: Wednesday, October 26, 2016 7:22:15 PM > To: Adel Boutros > Cc: kim.vdriet > Subject: Re: [Proton-c] [0.14.0] C++ sending/receiving bytes and map > messages > > On Wed, 2016-10-26 at 16:51 +0000, Adel Boutros wrote: > > Hello Alan, > > > > I don't think the sending issues are related to jms. > > Agreed. They are definitely C++ bugs and probably my fault :) > > > I tried once to isolate a test case for the receiveBytes but I > wasn't > > able to reproduce. The bytes were correctly found (I think I was in > > Debug mode) > > Tomorrow, I will try again and hopefully have a simple reproducible > > test case for each of the issues. > > > PS: I don't know if this has anything to do with the issues but all > > the c++ code is loaded in java code using jni and the dlls are > loaded > > by calling "System.loadLibrary()" in Java > > I can't think of any reason why that would be a problem, but if you > can't reproduce outside of Java then give me as much information as > you > can about how you reproduce it inside Java. > >
