Bob, that is what what I observe. Here is what I believe is happening: VS.Not has a 'thunking' layer between its excution layer aka 'the CLR(Common Language Runtime)' aka 'virtual machine' aka 'Managed Code' and UniObjects, which is a dll that is compiled into machine code. For some reason this 'Interop Com Service' as Microsoft calls it, spawns off multiple threads that manipulate the UniDynArray. Those threads cross and mangle the array.
I wonder if there is a way to make sure that one thread completes before the next one is started. A way to protect the UniArray from multiple access. Martin Scholl President HIPAAsuite 18910 New Hampshire Ave Brinklow, MD 20862 301-924-5537 Phone 301-570-0139 Fax 301-613-9572 Cell -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of BobJ Sent: Monday, January 24, 2005 5:47 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] UniObjects and VB.Net The words "thread safe" leap to mind. If there are multiple threads and no locks then mangling could be expected if a later launched thread assaults part of the array before the earlier launched thread writes it back. Just a thought. BobJ ----- Original Message ----- From: "Martin Scholl" <[EMAIL PROTECTED]> To: <u2-users@listserver.u2ug.org> Sent: Sunday, January 23, 2005 9:31 PM Subject: [U2] UniObjects and VB.Net >I am using UniObjects ( the pre .Net version) in a VB.Net ASP.Net > application. > > I am populating a UniDynArray with a file parser. The Array is large, > more > then 300 attributes. > When I run this parser, my array is mangled. Attribute contents are mixed > with each other, attribute counts don't match with what I wrote in the > code. > > When I run the code in the debugger, nice and slowly, I don't see a > problem, > only that sometimes it takes a second or to, for the UniDynArray to come > back from a call. But when I run full speed, the mangling happens. > > It looks like VB.NET starts several threads to deal with UniObjects, does > not wait until the thread is finished and then mangles the different > pieces. > Sometimes I get System.Runtime.InterOp.COMExceptions. > > Has anybody had similar problems? Found Work-arounds? > > I can't move over to Uodotnet yet. THere is too much code. I though of > parsing my file into a Uodotnet.UniDynArray but then I saw that I can't > even > initialize a .Net UniDynArray with a session object. > Martin Scholl > President HIPAAsuite > 18910 New Hampshire Ave > Brinklow, MD 20862 > 301-924-5537 Phone > 301-570-0139 Fax > 301-613-9572 Cell > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/