qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Rolke <cro...@redhat.com>
Subject Re: Issue with C# binding libraries
Date Thu, 21 Oct 2010 18:39:28 GMT
1. You can check that your libraries are built correctly by using DUMPBIN at a VS2008 command
prompt:

   dumpbin /dependents org.apache.qpid.messagingd.dll
   dumpbin /dependents org.apache.qpid.messaging.dll

The expected results are shown below. When the *messaging.dll is linking with
qpidmessaging.dll and with msvcm90.dll then that is what you want.

2. You can dodge having an unwanted dll somewhere in your path by organizing all your dlls
into a working directory. This will include MSVC, Boost, qpid*, and org.apache.qpid.messaging*.
The listing of what goes into my directory is shown below.

-Chuck

*******
DUMPBIN
*******

D:\Users> dumpbin /dependents org.apache.qpid.messagingd.dll
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file org.apache.qpid.messagingd.dll

File Type: DLL

  Image has the following dependencies:

    MSVCR90D.dll
    KERNEL32.dll
    qpidmessagingd.dll
    qpidtypesd.dll
    MSVCP90D.dll
    msvcm90d.dll
    mscoree.dll

  Summary

        1000 .data
       2D000 .rdata
        1000 .reloc
        1000 .rsrc
        F000 .text

D:\Users> dumpbin /dependents org.apache.qpid.messaging.dll
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file org.apache.qpid.messaging.dll

File Type: DLL

  Image has the following dependencies:

    MSVCR90.dll
    KERNEL32.dll
    qpidmessaging.dll
    qpidtypes.dll
    MSVCP90.dll
    msvcm90.dll
    mscoree.dll

  Summary

        2000 .data
       28000 .rdata
        1000 .reloc
        1000 .rsrc
        C000 .text

D:\Users>

*****************
Directory listing
*****************

 Volume in drive D is DATA
 Volume Serial Number is AA01-8EB3

 Directory of D:\Users

04/19/2010  06:37 PM            45,056 boost_date_time-vc90-mt-1_39.dll
04/19/2010  06:28 PM            83,456 boost_date_time-vc90-mt-gd-1_39.dll
04/19/2010  06:38 PM            67,584 boost_filesystem-vc90-mt-1_39.dll
04/19/2010  06:28 PM            97,280 boost_filesystem-vc90-mt-gd-1_39.dll
04/19/2010  06:47 PM           255,488 boost_program_options-vc90-mt-1_39.dll
04/19/2010  06:20 PM           461,312 boost_program_options-vc90-mt-gd-1_39.dll
04/19/2010  06:37 PM            12,800 boost_system-vc90-mt-1_39.dll
04/19/2010  06:28 PM            16,896 boost_system-vc90-mt-gd-1_39.dll
04/19/2010  06:53 PM            46,080 boost_thread-vc90-mt-1_39.dll
04/19/2010  06:25 PM            66,048 boost_thread-vc90-mt-gd-1_39.dll
07/12/2009  12:05 AM           225,280 msvcm90.dll
07/12/2009  12:02 AM           569,664 msvcp90.dll
07/12/2009  12:02 AM           653,120 msvcr90.dll
10/19/2010  01:56 AM           218,624 org.apache.qpid.messaging.dll
10/19/2010  01:53 AM             5,120 org.apache.qpid.messaging.sessionreceiver.dll
10/19/2010  01:50 AM           251,904 org.apache.qpid.messagingd.dll
10/19/2010  01:17 AM           237,056 qmf.dll
10/19/2010  12:59 AM           310,272 qmfconsole.dll
10/18/2010  10:55 PM           752,128 qmfconsoled.dll
10/18/2010  11:12 PM           517,120 qmfd.dll
10/19/2010  12:50 AM           744,960 qpidclient.dll
10/18/2010  10:45 PM         1,562,112 qpidclientd.dll
10/19/2010  12:35 AM         1,709,568 qpidcommon.dll
10/18/2010  10:29 PM         3,398,144 qpidcommond.dll
10/19/2010  12:56 AM           501,248 qpidmessaging.dll
10/18/2010  10:51 PM         1,163,776 qpidmessagingd.dll
10/18/2010  11:47 PM           154,112 qpidtypes.dll
10/18/2010  09:41 PM           301,056 qpidtypesd.dll

10/19/2010  11:40 AM            66,560 client.exe
10/19/2010  11:40 AM             5,632 csharp.direct.receiver.exe
10/19/2010  11:40 AM             5,632 csharp.direct.sender.exe
10/19/2010  11:40 AM            14,848 csharp.direct.sender.vshost.exe
10/19/2010  11:40 AM             6,144 csharp.example.client.exe
10/19/2010  11:40 AM             5,120 csharp.example.declare_queues.exe
10/19/2010  11:40 AM             8,192 csharp.example.drain.exe
10/19/2010  11:40 AM             5,632 csharp.example.helloworld.exe
10/19/2010  11:40 AM             5,632 csharp.example.server.exe
10/19/2010  11:40 AM             8,704 csharp.example.spout.exe
10/19/2010  11:40 AM             9,216 csharp.map.callback.receiver.exe
10/19/2010  11:40 AM             8,192 csharp.map.callback.sender.exe
10/19/2010  11:40 AM             5,632 csharp.map.receiver.exe
10/19/2010  11:40 AM             6,144 csharp.map.sender.exe
10/19/2010  11:40 AM           122,880 drain.exe
10/19/2010  11:40 AM            64,000 map_receiver.exe
10/19/2010  11:40 AM            90,624 map_sender.exe
10/19/2010  01:10 AM           169,984 qpid-latency-test.exe
10/19/2010  01:09 AM           204,800 qpid-perftest.exe
10/19/2010  11:40 AM            75,264 server.exe
10/19/2010  11:40 AM           146,432 spout.exe
              49 File(s)     15,462,528 bytes
               0 Dir(s)  112,321,585,664,877 bytes free















----- "qpid user 2" <qpid.user.2@gmail.com> wrote:

> From: "qpid user 2" <qpid.user.2@gmail.com>
> To: users@qpid.apache.org
> Sent: Thursday, October 21, 2010 11:58:51 AM GMT -05:00 US/Canada Eastern
> Subject: Re: Issue with C# binding libraries
>
> 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
> >
> >

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message