Click here to Skip to main content
15,896,278 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
Hello all,

I am programming using C# and I am also running Vista. I am running Visual C# 2010 Express.

I am working on some code which is basically a minimalist clone of the Visual Studio environment itself I wrote using a hodgepodge of 14 or so projects all rolled into one Solution -- the application is a Java IDE patterned to look and feel like Visual Studio express. I developed it in Visual C# 2008 Express. Since moving it over to VC# 2010 Express, I have updated each project (in Project -> Properties) to use .NET Framework 4 and then I also went in and changed around all the references to the .NET 4 versions of System, System.Drawing etc etc.

What is puzzling is that, at seemingly random times and not every time I run the program, it crashes seemingly randomly with the 'FatalExecutionEngineError was detected' exception box, which elaborates:

The runtime has encountered a fatal error. The address of the error was at 0xf20f4298, on thread 0xc3c. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.


It's funny, though, that there doesn't seem to be a pattern for which lines it crashes on. It says something about P-Invoke and COM-Interop, and I am using some projects and libraries which may depend on this, in particular:


  • ICSharpCode.TextEditor
  • The FileBrowser library at here[^]
  • The UISwitchBoard library at here[^]
  • The ProcessCaller library at here[^]


That's all I can think of. Perhaps there are some issues with the UI Switchboard library in particular, since it runs timers and other threads.

Thanks in advance for any insights!

Brian

Posted
Updated 30-Jul-10 21:08pm
v2
Comments
Sandeep Mewara 31-Jul-10 3:08am    
Reason for my vote of 5
Well presented and nicely written.
pokakhoaitay 22-Feb-13 8:06am    
Hi, I have same problem. Any one help us !? Thanks so much.

1 solution

I don't have a solution but I'm sure it is the ICSharpCode.TextEditor because its wreaking this same havoc on my project since it was added to the form. It is also random. I'm still trying to figure out how to solve it.
 
Share this answer
 
Comments
Richard C Bishop 23-Apr-13 16:19pm    
Please do not post pointless comments as solutions on threads that are three years old.
Felipe R. Machado 24-Apr-13 10:10am    
I's impressive how you went to all the trouble of replying only to show how impolite you are. The upbringing of people is not what it used to be these days... And that coming from a neophyte of CodeProject...

How come my comment is pointless? Why did it induce such anger on you? I've stumbled on this exact same problem. I did a google for: "ICSharpCode.TextEditor FatalExecutionEngineError" and this was the only pertinent question I've found.

I've shown in my comment that I've isolated the error: it is the ICSharpCode.TextEditor that is not playing well within the form (I don't know if it only happens in .NET 4, since the original ICSharpCode was in a 3.5 project...) All I know is that if anyone is on a hurry/deadline and is facing this exact same problem, all he/she needs to do (if he/she can live without the ICSharpCode.TextEditor for the time being) is to simply remove it from the form.

How that is pointless still fails me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900