WinMail/OE crash after using my plugin

Add-in Express™ Support Service
That's what is more important than anything else

WinMail/OE crash after using my plugin
 
Andrey Yemelyanov




Posts: 70
Joined: 2009-04-21
Hi:

After I have used my plugin in either WinMail or OE and I close the app it crashes. The event log contains the following message:

Fault bucket 551480182, type 5

Event Name: CLR20r3

Response: None

Cab Id: 0



Problem signature:

P1: winmail.exe

P2: 6.0.6001.18000

P3: 47918ed8

P4: mscorlib

P5: 2.0.0.0

P6: 48ead7c2

P7: 31ce

P8: 20

P9: System.ArgumentException

P10:



Attached files:

C:\Users\freddyboy\AppData\Local\Temp\WER4807.tmp.version.txt

Judging by mscorlib and CLR20r3 being present, I figure it has to do with the .NET framework running my plugin in the email client. Please note that after uninstalling the plugin, the error disappeared and an email client could terminate normally.

Please help me out on this one.

Andrey
Posted 30 Apr, 2009 04:40:26 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hi Andrey,

Please check that you release all class instances that provide the ReleaseOEObject method. Also, you can use System.Diagnostics.Debug and the DebugView utility (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) to try finding the cause of the issue.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Apr, 2009 05:04:03 Top
Andrey Yemelyanov




Posts: 70
Joined: 2009-04-21
Hi:

This is the exception detail that I get from the debugger.

System.ArgumentException was unhandled
Message: The object's type must be __ComObject or derived from __ComObject.
Stack trace: " at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o)\r\n at OEWO.AppendStamp.Finalize()"

It looks like this piece of code causes an exception.

Protected Overrides Sub Finalize()//finalize method on a win form
Try
MyBase.Finalize()
If Not IsNothing(_myItem) Then Marshal.ReleaseComObject(_myItem)

Catch ex As Exception
End Try
End Sub

where _myItem is of type AddinExpress.OE.ADXOEItem.


/Andrey
Posted 30 Apr, 2009 05:56:09 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hi Andrey,

It looks like you apply Marshal.ReleaseComObject to a non-COM object.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Apr, 2009 08:11:23 Top
Andrey Yemelyanov




Posts: 70
Joined: 2009-04-21
But isn't the addinexpress.oe.adxoeitem a COM object? Could you please suggest then how I can dispose of it? It does not have method ReleaseOEObject. Do I need to dispose of it at all when I close my win form inside WinMail/OE?
Posted 30 Apr, 2009 09:24:46 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Andrey,

It isn't a COM object and you don't need to dispose it.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Apr, 2009 10:49:39 Top
Andrey Yemelyanov




Posts: 70
Joined: 2009-04-21
Hi Andrei:

Now I do not dispose of this object. But when I close OE its process is not killed by Windows. Any ideas?

/Andrey
Posted 30 Apr, 2009 11:11:25 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hi Andrey,

Please send your project (or any other project reproducing the same behavior) to the support e-mail address (see readme.txt).


Andrei Smolin
Add-in Express Team Leader
Posted 30 Apr, 2009 11:34:02 Top
Andrey Yemelyanov




Posts: 70
Joined: 2009-04-21
Hi Andrei:

It is the OEWO project I sent you a while ago.

/Andrey
Posted 30 Apr, 2009 11:34:52 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hi Andrey,

Mmm, I can't reproduce the issue in my Windows Mail. I assume it can relate to other code branches: I don't have your profiles, accounts, etc and I don't login to your system.


Andrei Smolin
Add-in Express Team Leader
Posted 04 May, 2009 16:13:24 Top