I have an ASP.NET app with pages that put data into a
Hashtable. Other pages get data out of the Hashtable.
The Hashtable is actually inside a seperate AppDomain,
and a "gateway" object is instanced/used to get data
from the Hashtable.
When one page is getting something in the Hashtable,
the following problem happens:
Type : System.OutOfMemoryException
Message :
Exception of type System.OutOfMemoryException was thrown.
Method that threw exception :
HandleReturnMessage
Source :
mscorlib
Stack Trace :
Exception rethrown at [2]:
at System.Runtime.Remoting.Proxies.RealProxy.
HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.
PrivateInvoke(MessageData& msgData, Int32 type)
at testdomain.StorageGateway.
GetItem(Object objectKey) in .....storagegateway.cs:line 43
I don't know what is happening there. I need a
way to debug or at least get better Exception reporting. How can I do
that?
Thanks.
.NET Framework 1.1-SP1 on WinXP and Win2003
[MSFT] - 27 Apr 2005 04:27 GMT
Did the "gateway" object get data from HashTable through remoting? Have you
added some exception handling code like try..catch statement in your code?
With them you may locate the exact line which cause the exception.
Luke
Aleksandr Sliborsky - 30 Apr 2005 07:20 GMT
I don't know exactly what's the problem. But MemoryOverflowException often
occures if You use recursive call, implicitily or explicitly.
So, for example if You override operator == for some object and wrote there
something similar to
if (myObj == null)
runtime can call operator == for Your object again. So we've got a
recursion...
Hashtable may call GetHashCode method and if hash values are equal than
runtime can call operaor == or Equal method and recursive method could be
called.
(P.S. What code is written in line 43?)