dbTalk Databases Forums  

DSO seems to corrupt memory in some circumstances

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss DSO seems to corrupt memory in some circumstances in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Elyo Ravuna
 
Posts: n/a

Default DSO seems to corrupt memory in some circumstances - 11-28-2003 , 04:53 AM






I use DSO objects in a VB.NET application. When the
application exists, I get the following message:

"The instruction at 0x734633a1 referenced memory at
0x122b017c. The memory could not be read."

Calling the method using GetType.InvokeMember instead of
creating a .net interop assembly does not change anything.

In newsgroups, I have seen other persons who experienced
the same problem as me:

http://groups.google.com/groups?hl=e...=UTF-8&oe=UTF-
8&threadm=%23jYRBRn6CHA.1612%40TK2MSFTNGP11.phx.gb l&rnum=4

http://groups.google.com/groups?hl=e...=UTF-8&oe=UTF-
8&selm=020401c30f46%24307d6f00%24a101280a%40phx.gb l&rnum=5

The code I have tried is below.
Sincerely.
Elyo Ravuna


Module Module1
Sub Main()
Dim dsoServer As dso.Server
dsoServer.Connect "localhost"
dsoServer.CloseServer
Console.WriteLine("An exception is not yet thrown")
'The exception will be thrown just now
End Sub
End Module

Module Module2
Sub Main()
Dim dsoServer As Object
dsoServer = CreateObject("dso.Server")
dsoServer.GetType.InvokeMember("Connect",
Reflection.BindingFlags.InvokeMethod, Nothing, dsoServer,
New String() {"localhost"})
dsoServer.GetType.InvokeMember("CloseServer",
Reflection.BindingFlags.InvokeMethod, Nothing, dsoServer,
Nothing)
Console.WriteLine("An exception is not yet thrown")
'The exception will be thrown just now
End Sub
End Module


Reply With Quote
  #2  
Old   
Michael Shao [MSFT]
 
Posts: n/a

Default RE: DSO seems to corrupt memory in some circumstances - 12-01-2003 , 03:48 AM






Hi Elyo,

Thanks for your post. Based on my research, the two codes snips you provide
do not induce the error you mentioned on my side. I would like you to
provide more information so that I can narrow down this issue.
1. What is the version of Analysis Services (Service Pack) on your side?
Please check to see the version of the file msmdsrv.exe to verify the
version of Analysis Services.
2. I performed the following codes on my side successfully and please try
to perform them on your computer to see if the error message occurs again.

Module Module1
Sub Main()
Dim dsoServer As New DSO.Server
dsoServer.Connect "localhost"
dsoServer.CloseServer
Console.WriteLine("An exception is not yet thrown")
'The exception will be thrown just now
End Sub
End Module

Module Module2
Sub Main()
Dim dsoServer As Object
dsoServer = CreateObject("dso.Server")
dsoServer.GetType.InvokeMember("Connect",
Reflection.BindingFlags.InvokeMethod, Nothing, dsoServer,
New String() {"localhost"})
dsoServer.GetType.InvokeMember("CloseServer",
Reflection.BindingFlags.InvokeMethod, Nothing, dsoServer,
Nothing)
Console.WriteLine("An exception is not yet thrown")
'The exception will be thrown just now
End Sub
End Module

3. Does the error message occur randomly? If it is possible, can you try to
perform the following tests on your side?
a. Perform the problematic codes on another computer connecting to the
local server?
b. Perform the problematic codes on another computer connecting to the same
server as the one used in the codes which induced the error.

What is the result?

If the problem is regular and can be reproduced on the other computers,
please provide the sample code and describe the reproduce steps in detail
so that I can try to reproduce this problem on my computer.

Also, such issues tend to be complex and take up extensive research time.
I'd like to set your expectations that it may take a while for us to help
you narrow down the problem and we may eventually redirect you to PSS to
continue working with a dedicated Support Professional. If this is
critical, I'd recommend contacting PSS and opening a Support incident
troubleshoot this further. If you need any help in this regard, please let
me know.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
  #3  
Old   
Kris Rudin
 
Posts: n/a

Default Re: DSO seems to corrupt memory in some circumstances - 12-22-2003 , 03:02 PM



Someone on another NG posted the solution:

The threading must be set to MTA, not STA, for DSO.

:-)

"Kris Rudin" <krudin (AT) nospam (DOT) com> wrote

Quote:
We are getting the same problem as Elyo. (See my post of 12/19/03 -
subject:
C# and DSO bug?)

We are executing the application on a Win XP Pro machine, which connects
to
a remote Analysis Server elsewhere in our network.

We tried it with .NET 1.0 and 1.1, and Visual Studio 2002 and 2003.
Always
got the error.

In answer to your questions below, here are our repsonses:
1. Analysis Server file version: 8.0.760.0, SP3
2. NA
3. It happens every time, from two different client machines.

Here is our code:
using System;
using System.IO;
using DSO;

namespace DSOtest
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Console.WriteLine("Starting program");
Server dsoServer = new DSO.ServerClass();
dsoServer.Connect("vmproj2003");
dsoServer.CloseServer();
dsoServer = null;
Console.WriteLine("Ending program");
}
}
}

We did see a reference to this problem in
microsoft.public.data.oledb.olap,
dated 4/3/2003 (Subject: "DSO connect error"). This poster said that he
got
the same problem when the Analysis server had SP3, but did NOT get the
error
with SP2. We are trying to confirm that now...

Any help would be GREATLY appreciated!
Thanks,
Kris Rudin, MCP, MS
Senior Software Engineer
Aurora Consulting Group, Inc.

"Michael Shao [MSFT]" <v-yshao (AT) online (DOT) microsoft.com> wrote in message
news:Xd0eTB$tDHA.1532 (AT) cpmsftngxa06 (DOT) phx.gbl...
Hi Elyo,

Thanks for your post. Based on my research, the two codes snips you
provide
do not induce the error you mentioned on my side. I would like you to
provide more information so that I can narrow down this issue.
1. What is the version of Analysis Services (Service Pack) on your side?
Please check to see the version of the file msmdsrv.exe to verify the
version of Analysis Services.
2. I performed the following codes on my side successfully and please
try
to perform them on your computer to see if the error message occurs
again.

Module Module1
Sub Main()
Dim dsoServer As New DSO.Server
dsoServer.Connect "localhost"
dsoServer.CloseServer
Console.WriteLine("An exception is not yet thrown")
'The exception will be thrown just now
End Sub
End Module

Module Module2
Sub Main()
Dim dsoServer As Object
dsoServer = CreateObject("dso.Server")
dsoServer.GetType.InvokeMember("Connect",
Reflection.BindingFlags.InvokeMethod, Nothing, dsoServer,
New String() {"localhost"})
dsoServer.GetType.InvokeMember("CloseServer",
Reflection.BindingFlags.InvokeMethod, Nothing, dsoServer,
Nothing)
Console.WriteLine("An exception is not yet thrown")
'The exception will be thrown just now
End Sub
End Module

3. Does the error message occur randomly? If it is possible, can you try
to
perform the following tests on your side?
a. Perform the problematic codes on another computer connecting to the
local server?
b. Perform the problematic codes on another computer connecting to the
same
server as the one used in the codes which induced the error.

What is the result?

If the problem is regular and can be reproduced on the other computers,
please provide the sample code and describe the reproduce steps in
detail
so that I can try to reproduce this problem on my computer.

Also, such issues tend to be complex and take up extensive research
time.
I'd like to set your expectations that it may take a while for us to
help
you narrow down the problem and we may eventually redirect you to PSS to
continue working with a dedicated Support Professional. If this is
critical, I'd recommend contacting PSS and opening a Support incident
troubleshoot this further. If you need any help in this regard, please
let
me know.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no
rights.






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.