qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qpid user 2 <qpid.use...@gmail.com>
Subject Re: Issue with C# binding libraries
Date Thu, 21 Oct 2010 15:58:51 GMT
I verified that I have  RuntimeLibrary="2" for VCCLCompilerTool in Release
configuration. and yes I am linking org.apache.qpid.messaging.dll and not
the one with 'd'.
and still getting access violation...
what else might be missing?

Thanks

On Wed, Oct 20, 2010 at 2:42 PM, Chuck Rolke <crolke@redhat.com> wrote:

> The setting from r1021351 that fixed the accVio was in file
> cpp\bindings\qpid\dotnet\src\org.apache.qpid.messaging.vcproj.
>
> Verify that for each Release or RelWithDebInfo Configuration the setting
> for
>  <Tool
>      Name="VCCLCompilerTool"
>      RuntimeLibrary="2"       <------
>
> Release builds use the MultiThread runtime library but NOT the debug
> version.
>
> You are linking to org.apache.qpid.messaging.dll and not to
> org.apache.qpid.messagingd.dll (with a 'd')?
>
> -Chuck
>
>
> ----- "qpid user 2" <qpid.user.2@gmail.com> wrote:
>
> > From: "qpid user 2" <qpid.user.2@gmail.com>
> > To: users@qpid.apache.org
> > Sent: Wednesday, October 20, 2010 2:12:15 PM GMT -05:00 US/Canada Eastern
> > Subject: Re: Issue with C# binding libraries
> >
> > Guys. For some reason I am still getting the exact same error on
> > Access
> > Violation in Release mode. I made a sync to head revision which
> > supposedly
> > carries the mentioned CL, linked the dlls. but still same error.
> > Is this verified for other people? am I missing anything?
> >
> > Thanks
> > QU2
> >
> > On Mon, Oct 11, 2010 at 10:39 AM, Chuck Rolke <crolke@redhat.com>
> > wrote:
> >
> > > This issue is fixed in recent check-in r1021351. Part of the release
> > build
> > > was including debug MSVC runtime libraries. This linked OK but
> > caused the
> > > access violation at run time.
> > >
> > > The check-in also adds configuration RelWithDebInfo so that the
> > > bld-winsdk.ps1 script can build a coherent set of libraries for the
> > SDK.
> > >
> > > -Chuck
> > >
> > > ----- "Ted Ross" <tross@redhat.com> wrote:
> > >
> > > > From: "Ted Ross" <tross@redhat.com>
> > > > To: users@qpid.apache.org
> > > > Sent: Tuesday, October 5, 2010 11:58:16 AM GMT -05:00 US/Canada
> > Eastern
> > > > Subject: Re: Issue with C# binding libraries
> > > >
> > > > We're seeing the same thing happen and we're looking for a
> > solution.
> > > >
> > > > I'll follow up on this list with anything we learn.
> > > >
> > > > -Ted
> > > >
> > > >
> > > > On 10/05/2010 11:34 AM, qpid user 2 wrote:
> > > > > Guys. Sorry but I am still struggling with this issue. I
> > thought
> > > > maybe the
> > > > > issue linked below is related and can fix it. its related to
> > how
> > > > managed
> > > > > objects are cloned on csharp wrapper. I built from the head rev
> > but
> > > > does not
> > > > > seem to be the case. Could you guys help me on this?
> > > > >
> > > > > Just to refresh mind, the problem is that I get exception when
> > using
> > > > the
> > > > > dotnet binding library ONLY in Release mode. The debug mode
> > works
> > > > fine.
> > > > > Following is the stack trace of the exception:
> > > > >
> > > > > System.AccessViolationException was unhandled
> > > > >    Message="Attempted to read or write protected memory. This
> > is
> > > > often an
> > > > > indication that other memory is corrupt."
> > > > >    Source="org.apache.qpid.messaging"
> > > > >    StackTrace:
> > > > >         at qpid.messaging.Connection.{ctor}(Connection* ,
> > > > > basic_string<char\,std::char_traits<char>\,std::allocator<char>
> > >*
> > > > ,
> > > > >
> > > >
> > map<std::basic_string<char\,std::char_traits<char>\,std::allocator<char>
> > > > >
> > > > >>
> > > >
> > >
> >
> \,qpid::types::Variant\,std::less<std::basic_string<char\,std::char_traits<char>\,std::allocator<char>
> > > > >>
> > > > >>
> > > >
> > >
> >
> \,std::allocator<std::pair<std::basic_string<char\,std::char_traits<char>\,std::allocator<char>
> > > > >> const \,qpid::types::Variant>  >  >* )
> > > > >>
> > > > >         at Org.Apache.Qpid.Messaging.Connection..ctor(String
> > url)
> > > > in
> > > > >
> > > >
> > >
> >
> c:\rimprojects\dev\enterprise\instrumentation\enterprise\instrumentation\vendor\qpid-0.6x\cpp\bindings\qpid\dotnet\src\connection.cpp:line
> > > > > 48
> > > > >         at
> > > > Rim.Core.Instrumentation.Utilities.AgentConnection..ctor(String
> > > > > ConnectionStr) in
> > > > >
> > > >
> > >
> >
> C:\rimProjects\dev\Enterprise\INSTRUMENTATION\enterprise\instrumentation\shared\csharp\Source\Utilities\Connection.cs:line
> > > > > 39
> > > > >         at
> > > > Rim.Core.Instrumentation.Utilities.Sinks.AgentSink..ctor() in
> > > > >
> > > >
> > >
> >
> C:\rimProjects\dev\Enterprise\INSTRUMENTATION\enterprise\instrumentation\shared\csharp\Source\Utilities\Sinks.cs:line
> > > > > 72
> > > > >         at
> > > > Rim.Core.Instrumentation.Examples.Bes.Program.Main(String[] args)
> > > > > in
> > > > >
> > > >
> > >
> >
> C:\rimProjects\dev\Enterprise\INSTRUMENTATION\enterprise\instrumentation\client\csharp\BES\Examples\ExampleUsage.cs:line
> > > > > 29
> > > > >         at System.AppDomain._nExecuteAssembly(Assembly
> > assembly,
> > > > String[]
> > > > > args)
> > > > >         at System.AppDomain.ExecuteAssembly(String
> > assemblyFile,
> > > > Evidence
> > > > > assemblySecurity, String[] args)
> > > > >         at
> > > > Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
> > > > >         at
> > System.Threading.ThreadHelper.ThreadStart_Context(Object
> > > > state)
> > > > >         at
> > System.Threading.ExecutionContext.Run(ExecutionContext
> > > > > executionContext, ContextCallback callback, Object state)
> > > > >         at System.Threading.ThreadHelper.ThreadStart()
> > > > >    InnerException:
> > > > >
> > > > >
> > > > >
> > > > > Any help would be appreciated.
> > > > >
> > > > > On Fri, Oct 1, 2010 at 3:55 PM, qpid user
> > 2<qpid.user.2@gmail.com>
> > > > wrote:
> > > > >
> > > > >
> > > > >> Adding the link would help:
> > > > >> https://issues.apache.org/jira/browse/QPID-2798
> > > > >>
> > > > >> The issue reported sound like the one I am facing now.
> > > > >>
> > > > >> Thanks
> > > > >>
> > > > >>
> > > > >> On Fri, Oct 1, 2010 at 3:54 PM, qpid user
> > 2<qpid.user.2@gmail.com>
> > > > wrote:
> > > > >>
> > > > >>
> > > > >>> Thanks Ted. I found this issue reported by you and a fix
has
> > > > already been
> > > > >>> patched for it. Is it related to the same issue?
> > > > >>>
> > > > >>>
> > > > >>> On Fri, Oct 1, 2010 at 2:52 PM, Ted Ross<tross@redhat.com>
> > > > wrote:
> > > > >>>
> > > > >>>
> > > > >>>>   You're right, that's not a very good URL.
> > > > >>>>
> > > > >>>> The thread started with a message from Chuck Rolke with
> > subject
> > > > "Help
> > > > >>>> with Windows app design" on 9/21/2010 12:00PM EDT.  The
text
> > of
> > > > his message
> > > > >>>> was:
> > > > >>>>
> > > > >>>> ========
> > > > >>>>
> > > > >>>> Hi,
> > > > >>>>
> > > > >>>> I'm working with the qpid cpp messaging dotnet client.
A
> > quick
> > > > review: user programs are in a .NET managed language, say C#.
> > They
> > > > refer to an Interop DLL that connects them to the unmanaged qpid
> > > > messaging layer built by qpid/cpp.
> > > > >>>>
> > > > >>>> Running under debug things are fine. However, when I
switch
> > to
> > > > Release or RelWithDebInfo, the qpid messaging DLL functions crash
> > in
> > > > the function prologue while it is trying to install it's
> > exception
> > > > handler. I've reproduced that failing call chain below. It acts
> > like
> > > > the FS:[0] chain is read-only.
> > > > >>>>
> > > > >>>>  From reading John Robbins I suspect that default exception
> > > > handling being synchronous in Debug and asynchronous in Release
> > may be
> > > > an issue but I can't pinpoint it. All the qpid messaging dlls are
> > > > linked the same (/EHsc, Multi-threaded DLL) for Debug and Release.
> > In
> > > > Debug mode one can step through writing to FS:[0] just fine.
> > > > >>>>
> > > > >>>> I'd appreciate some discussion.
> > > > >>>>
> > > > >>>> Regards,
> > > > >>>> Chuck
> > > > >>>>
> > > > >>>> C# code
> > > > >>>> =======
> > > > >>>>
> > > > >>>>      connection = new Connection(broker);
> > > > >>>>
> > > > >>>> C++ Binding DLL
> > > > >>>> ===============
> > > > >>>>
> > > > >>>>      Connection::Connection(System::String ^ url) :
> > > > >>>>          connectionp(new
> > > > ::qpid::messaging::Connection(QpidMarshal::ToNative(url)))
> > > > >>>>      {
> > > > >>>>      }
> > > > >>>>
> > > > >>>> Qpid Messaging DLL
> > > > >>>> ==================
> > > > >>>>
> > > > >>>> qpid::messaging::Connection::Connection:
> > > > >>>>
> > > > >>>>    6264E580  push        0FFFFFFFFh
> > > > >>>>    6264E582  push        626841EBh
> > > > >>>>    6264E587  mov         eax,dword ptr fs:[00000000h]
> > > > >>>>    6264E58D  push        eax
> > > > >>>>    6264E58E  push        ecx
> > > > >>>>    6264E58F  push        esi
> > > > >>>>    6264E590  mov         eax,dword ptr [___security_cookie
> > > > (626A92D0h)]
> > > > >>>>    6264E595  xor         eax,esp
> > > > >>>>    6264E597  push        eax
> > > > >>>>    6264E598  lea         eax,[esp+0Ch]
> > > > >>>>    6264E59C  mov         dword ptr fs:[00000000h],eax<---
> > fails
> > > > here
> > > > >>>>    6264E5A2  mov         esi,ecx
> > > > >>>>    6264E5A4  push        1F8h
> > > > >>>>    6264E5A9  mov         dword ptr [esi],0
> > > > >>>>    6264E5AF  call        operator new (62682202h)
> > > > >>>>
> > > > >>>>
> > > >
> > ---------------------------------------------------------------------
> > > > >>>> Apache Qpid - AMQP Messaging Implementation
> > > > >>>> Project:      http://qpid.apache.org
> > > > >>>> Use/Interact:
> > > >
> > mailto:dev-subscribe@qpid.apache.org<dev-subscribe@qpid.apache.org>
> > > > >>>>
> > > > >>>>
> > > > >>>> ========
> > > > >>>>
> > > > >>>>
> > > > >>>> On 10/01/2010 02:19 PM, qpid user 2 wrote:
> > > > >>>>
> > > > >>>> Sorry Ted but I cant seem to find the thread there. Do
you
> > mind
> > > > pointing
> > > > >>>> me to the discussion there?
> > > > >>>>
> > > > >>>> Thanks
> > > > >>>>
> > > > >>>>
> > > > >>>> On Fri, Oct 1, 2010 at 1:27 PM, Ted Ross<tross@redhat.com>
> > > > wrote:
> > > > >>>>
> > > > >>>>
> > > > >>>>>   On 10/01/2010 01:10 PM, qpid user 2 wrote:
> > > > >>>>>
> > > > >>>>>
> > > > >>>>>> Hi folks,
> > > > >>>>>>
> > > > >>>>>> I am having an issue with C# binding dll when
trying to
> > connect
> > > > to the
> > > > >>>>>> broker. This issue only happens in Release mode.
I get an
> > > > exception
> > > > >>>>>> when
> > > > >>>>>> trying to instantiate a Connection object and
pass on a
> > > > connection url
> > > > >>>>>> to
> > > > >>>>>> target the broker. the original exception is
> > > > AccessViolationException:
> > > > >>>>>> "Attempted to read or write protected memory.
This is often
> > an
> > > > >>>>>> indication
> > > > >>>>>> that other memory is corrupt.". and it happens
in
> > > > Connection.cpp when
> > > > >>>>>> QpidMarshal::ToNative(url) returns. I am assuming
that
> > this
> > > > function is
> > > > >>>>>> responsible to convert managed strings into a
native
> > encoding.
> > > > >>>>>>
> > > > >>>>>> Can someone provide some help on this? Any help
would be
> > much
> > > > >>>>>> appreciated.
> > > > >>>>>>
> > > > >>>>>> I can provide more detailed info if necessary.
> > > > >>>>>>
> > > > >>>>>> Thanks.
> > > > >>>>>> Qpid.User.2!
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>   QU2,
> > > > >>>>>
> > > > >>>>> This has been seen before (see this thread on dev:
> > > > >>>>>
> > > >
> > http://mail-archives.apache.org/mod_mbox/qpid-dev/201009.mbox/browser).
> > > > >>>>>
> > > > >>>>> -Ted
> > > > >>>>>
> > > > >>>>>
> > > > >>>>>
> > > >
> > ---------------------------------------------------------------------
> > > > >>>>> Apache Qpid - AMQP Messaging Implementation
> > > > >>>>> Project:      http://qpid.apache.org
> > > > >>>>> Use/Interact: mailto:users-subscribe@qpid.apache.org
> > > > >>>>>
> > > > >>>>>
> > > > >>>>>
> > > > >>>>
> > > > >>>>
> > > > >>>
> > > > >>
> > > > >
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > Apache Qpid - AMQP Messaging Implementation
> > > > Project:      http://qpid.apache.org
> > > > Use/Interact: mailto:users-subscribe@qpid.apache.org
> > >
> > >
> > ---------------------------------------------------------------------
> > > Apache Qpid - AMQP Messaging Implementation
> > > Project:      http://qpid.apache.org
> > > Use/Interact: mailto:users-subscribe@qpid.apache.org
> > >
> > >
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message