473,856 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Catch ReleaseComObjec t exception

Hi,

on shutdown I receive the exception ReleaseComObjec t. Following the call
stack when the exception occures.

mscorlib.dll!Sy stem.Runtime.In teropServices.M arshal.ReleaseC omObject(System .Object o = <Nicht definierter Wert>) + 0x18 Bytes
system.manageme nt.dll!System.M anagement.Instr umentation.Meta DataInfo.Dispos e() + 0x15 Bytes
system.manageme nt.dll!System.M anagement.Instr umentation.Meta DataInfo.Finali ze() + 0x1b Bytes

I already added exception handler for the exception types:
-Application.Thr eadException
-AppDomain.Unhan dledException

When the ReleaseComObjec t exception is thrown, both handlers are not called.
How can I find out which COM object is ment and how can I fix this bug?
Thanks
Christian

Feb 14 '06 #1
1 1534

"Christian Havel" <Ch************ @discussions.mi crosoft.com> wrote in
message news:09******** *************** ***********@mic rosoft.com...
| Hi,
|
| on shutdown I receive the exception ReleaseComObjec t. Following the call
| stack when the exception occures.
|
|
mscorlib.dll!Sy stem.Runtime.In teropServices.M arshal.ReleaseC omObject(System .Object
o = <Nicht definierter Wert>) + 0x18 Bytes
|
system.manageme nt.dll!System.M anagement.Instr umentation.Meta DataInfo.Dispos e()
+ 0x15 Bytes
|
system.manageme nt.dll!System.M anagement.Instr umentation.Meta DataInfo.Finali ze()
+ 0x1b Bytes
|
| I already added exception handler for the exception types:
| -Application.Thr eadException
| -AppDomain.Unhan dledException
|
| When the ReleaseComObjec t exception is thrown, both handlers are not
called.
| How can I find out which COM object is ment and how can I fix this bug?
| Thanks
| Christian
|

Your problem is due to a missing Dispose call in your code (or not applying
the using idiom). The finalizer is called at CLR shutdown time, long after
the object is already gone with a previous GC sweep (Object o = null).
This would be an indication that you have blocked the finalizer thread
somehow, therefore it would be great to post a "complete sample" that
illustrates the problem.

Willy.
Feb 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
30347
by: Gary.Hu | last post by:
I was trying to catch the Arithmetic exception, unsuccessfully. try{ int a = 0, b = 9; b = b / a; }catch(...){ cout << "arithmetic exception was catched!" << endl; } After ran the program, it quitted with core dumped. %test
5
4023
by: ahmadzia673 | last post by:
I am using a COM component in my ASP.Net application. When i try to release it from memory by using Marshal.ReleaseComObject, its not working. The memory is still leaks. What to do? Is there any other way to prevent from this leakage? Please help me!
11
3499
by: Pohihihi | last post by:
I was wondering what is the ill effect of using try catch in the code, both nested and simple big one. e.g. try { \\ whole app code goes here } catch (Exception ee) {}
23
3094
by: VB Programmer | last post by:
Variable scope doesn't make sense to me when it comes to Try Catch Finally. Example: In order to close/dispose a db connection you have to dim the connection outside of the Try Catch Finally block. But, I prefer to dim them "on the fly" only if needed (save as much resources as possible). A little further... I may wish to create a sqlcommand and datareader object ONLY if certain conditions are met. But, if I want to clean these up in the...
0
1162
by: Christian Havel | last post by:
Hi, we are using a framework which is based on the Enterprise Library June 2005. When I am locking a object (successfull) and let the application run further I receive a NullReferenceException (Problem with: System.Runtime.InteropServices.Marshal.ReleaseComObject). In the eventview I see a error "Failed to fire the WMI Event DataConnectionOpenedEvent" Exception: System.Exception: The scheme for the assembly was not registered with WMI.
1
1335
by: Christian Havel | last post by:
Hi, we are using a framework (which is based on the Microsoft Enterprise Library) and retrieve a ReleaseCOMObject Exception. When I try to debug I can find out any information about the COM object. How can I find out which COM object is responsible for the exception? Thanks
1
1903
by: Christian Havel | last post by:
Hi, I have the problem, that I receive a ReleaseComObject exception from a used framework which is based on the Microsoft Enterprise Library. How can I find out, from whom this exception is thrown? Thanks Christian
32
6149
by: cj | last post by:
Another wish of mine. I wish there was a way in the Try Catch structure to say if there wasn't an error to do something. Like an else statement. Try Catch Else Finally. Also because I understand Finally runs whether an error was caught or not, I haven't found a use for finally yet.
0
2746
by: xrxst32 | last post by:
Hello there, I have some doubts about the best practice for using COM automation, the Runtime Callable Wrapper (RCW) and Marshal.ReleaseComObject. So the question is/are: Do I need to release each COM object explicit by a call to Marshal.ReleaseComObject, does the RCW take care of that or does it leaks unmanaged resources?
0
9920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11063
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10699
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10790
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9535
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7098
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5762
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4580
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.