I am using the SecureBlackBox class to create a new X509 certificate.
SBX509.TElX509Certificate certUsr = new SBX509.TElX509Certificate();
certUser.LoadFromBuffer(certData);
This works fine in some areas of my code but all of a sudden, a certain
part of my code is throwing a System.ExecutionEngineException on that
line. I debugged it and went over my code line by line and this is the
exception info.
I have no idea what to do. Funny thing is that my try-catch doesn't
catch this.
Any suggestions????
Cheers.
Sushant Bhatia
- System.Exception {"Exception of type System.ExecutionEngineException
was thrown." } System.Exception
System.Object {System.ExecutionEngineException} System.Object
_className "System.ExecutionEngineException" string
_COMPlusExceptionCode -532459699 int
_exceptionMethod <undefined value> System.Reflection.MethodBase
_exceptionMethodString null string
_helpURL null string
_HResult -2146233082 int
_innerException { } System.Exception
_message null string
_remoteStackIndex 0 int
_remoteStackTraceString null string
_source null string
_stackTrace <undefined value> System.Object
_stackTraceString null string
_xcode -532459699 int
_xptrs 0 int
HelpLink null string
HResult -2146233082 int
InnerException { } System.Exception
Message "Exception of type System.ExecutionEngineException was
thrown." string
Source null string
StackTrace null string
TargetSite <undefined value> System.Reflection.MethodBase
"Execution engine errors are fatal errors that should never occur. Such
errors occur mainly when the execution engine has been corrupted or data is
missing. The system can throw this exception at any time. When possible, the
system throws an exception that provides more information than the
ExecutionEngineException exception"
:)
I think it is a bug. You should submit it !!
--
Thanks,
Yunus Emre ALPÖZEN
BSc, MCAD.NET
"Sushant Bhatia" <sushant...@gmail.com> wrote in message
news:1115051710....@g14g2000cwa.googlegroups.com...
Joe K.
"Yunus Emre ALPÖZEN [MCAD.NET]" <ye...@msakademik.net> wrote in message
news:u59QAG0T...@TK2MSFTNGP15.phx.gbl...
I don't think its a SecureBlackBox issue because I am using the very
same call throughout my application in different functions. Its only
this specific call to object creation that is throwing the exception.
If I comment it out, no exception is thrown. The application is a
Client/Server chat program and the exception is being thrown in one
chat client. I used the very same object creation call in the server
right before I send the data to see if its an issue with SecureBlackBox
and it worked fine.
I don't think the CLR is corrupted because it runs all the application
I have as normal.
2 follow up questions:-
-A friend of mine suggested that I compile the code above for release
instead of debug as I am doing now because the CLR for release is
"different" to the debug CLR. Is this true? Is there "really" a
different CLR for release and debug?
-Another friend suggested I look at the stack size to see if there were
any issues in there. Can the ExecutionEngineException be thrown because
of Stack "miscalculations"?
I will try this on another machine to see if it still throws the
exception. I'll post a bit later with the results of that.
Thanks for your replies.
Sushant Bhatia
Changing to a release build might help with the problem (l've seen that
before personally), but that does not bode well that the problem is solved.
Still, it is worth a shot.
If stack SIZE was an issue, you would probably have gotten a
StackOverflowException like you get from infinite recursion and such. I'm
still betting on some kind of corruption that happened due to some unmanaged
code doing something to memory that it should not have.
The classic way to debug this would be to use a lower level debugger like
windbg with the SOS extension loaded, but there is steep learning curve
there if you are not already skilled. I can't be of any assistance with
that. You might consider posting on the dotnet.framework.clr newsgroup to
see if they have any suggestions as a lot of the more hard core CLR guys
hang out there.
Best of luck,
Joe K.
"Sushant Bhatia" <sushant...@gmail.com> wrote in message
news:1115082517.7...@z14g2000cwz.googlegroups.com...
For some reason, when the same code at home (without recompiling) I get
errors for the initialization. I posted the errors caught at
http://temphome.mine.nu/blogs/ankh_morporks_finest_coder_ii/archive/2005/05/03/208.aspx
Its wierd that my school machine thrown the ExecutionEngineException
but my home machine is able to catch the specific cause.
I still have no idea what the exception actually "means". I know the
cctor() function is a class constructor function but why should a
constructor which takes no parameters throw a
TypeInitializationException->NullReferenceException unless something
internal was being initalized. And why won't this error be thrown
everytime the constructor is called?
My guess is that it is still memory corruption do to some bad pointer stuff.
NullReferenceExceptions in unmanaged code sometimes indicate other types of
pointer problems than a simple null reference.
I'd go to the vendor, especially if you can create a repro. Sending them a
crash dump of the process should help.
Joe K.
"Sushant Bhatia" <sushant...@gmail.com> wrote in message
news:1115157800.7...@o13g2000cwo.googlegroups.com...