Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Debugging Problems (FatalExecutionEngineError)

 
 
Old 06-06-2006   #1 (permalink)
Thomas Krause


 
 

Debugging Problems (FatalExecutionEngineError)

Hi,

I'm using VS2005 on the Vista Beta 2 Release to write a little Avalon
Application. My problem is that each time there is a (markup) error in my
application I get an FatalExecutionEngineError exception instead of a real
exception with a useful description of the problem. My 'Main' function looks
like this:
MyApplication.App app = new MyApplication.App();

app.InitializeComponent();

app.Run(); //Error occurs during this call

However, if I put a try...catch arround that block it catches an
System.Windows.Markup.XamlParseException (instead of the
FatalExecutionEngineError), which seems to be the "real" exception and which
also includes a helpful error message. But I don't want to use a try...catch
block just to get a useful exception message.

The FatalExecutionEngineErrors seem to occur only during the app.Run() call,
exceptions thrown in other places work as expected.

I installed the latest Windows SDK and WinFX extensions for VS, so this
should not be a probkem, too.

Do you have any ideas on what the problem might be?

Thank you very much,
Thomas Krause


My System SpecsSystem Spec
Old 06-06-2006   #2 (permalink)
Vipin


 
 

Re: Debugging Problems (FatalExecutionEngineError)

Out of curiosity, how does your xaml look like?

--
Vipin Aravind
http://www.explorewindows.com


"Thomas Krause" <Forum.Thomas.Krause-NoSpam-@gmx.de> wrote in message
news:740BC249-0AE0-4580-8253-674F2E71FBD3@microsoft.com...
> Hi,
>
> I'm using VS2005 on the Vista Beta 2 Release to write a little Avalon
> Application. My problem is that each time there is a (markup) error in my
> application I get an FatalExecutionEngineError exception instead of a real
> exception with a useful description of the problem. My 'Main' function
> looks like this:
> MyApplication.App app = new MyApplication.App();
>
> app.InitializeComponent();
>
> app.Run(); //Error occurs during this call
>
> However, if I put a try...catch arround that block it catches an
> System.Windows.Markup.XamlParseException (instead of the
> FatalExecutionEngineError), which seems to be the "real" exception and
> which also includes a helpful error message. But I don't want to use a
> try...catch block just to get a useful exception message.
>
> The FatalExecutionEngineErrors seem to occur only during the app.Run()
> call, exceptions thrown in other places work as expected.
>
> I installed the latest Windows SDK and WinFX extensions for VS, so this
> should not be a probkem, too.
>
> Do you have any ideas on what the problem might be?
>
> Thank you very much,
> Thomas Krause



My System SpecsSystem Spec
Old 06-06-2006   #3 (permalink)
Thomas Krause


 
 

Re: Debugging Problems (FatalExecutionEngineError)

In this case, the error was that I tried to use a non-public class with an
ObjectDataProvider for binding. But the rest of the XAML code did not
matter.
I reduced the xaml to just the ObjectDataProvider and a single Control for
Binding and it still threw this strange FatalExecutionEngineError exception.
It is really not a problem in the XAML code itself, I can make any mistake
in the XAML code and everytime it throws an ExecutionEngineError exception
instead of the XamlParseException. To give you an example, the following
code would throw an ExecutionEngineError, because the xyz resource does not
exist:

<Window x:Class="MyApplication.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>

<Button Content ="{StaticResource xyz}"></Button>
</Window>

Thomas Krause

"Vipin" <Vipin@nospam.com> wrote:
> Out of curiosity, how does your xaml look like?
>
> --
> Vipin Aravind
> http://www.explorewindows.com
>
>
> "Thomas Krause" <Forum.Thomas.Krause-NoSpam-@gmx.de> wrote in message
> news:740BC249-0AE0-4580-8253-674F2E71FBD3@microsoft.com...
>> Hi,
>>
>> I'm using VS2005 on the Vista Beta 2 Release to write a little Avalon
>> Application. My problem is that each time there is a (markup) error in my
>> application I get an FatalExecutionEngineError exception instead of a
>> real exception with a useful description of the problem. My 'Main'
>> function looks like this:
>> MyApplication.App app = new MyApplication.App();
>>
>> app.InitializeComponent();
>>
>> app.Run(); //Error occurs during this call
>>
>> However, if I put a try...catch arround that block it catches an
>> System.Windows.Markup.XamlParseException (instead of the
>> FatalExecutionEngineError), which seems to be the "real" exception and
>> which also includes a helpful error message. But I don't want to use a
>> try...catch block just to get a useful exception message.
>>
>> The FatalExecutionEngineErrors seem to occur only during the app.Run()
>> call, exceptions thrown in other places work as expected.
>>
>> I installed the latest Windows SDK and WinFX extensions for VS, so this
>> should not be a probkem, too.
>>
>> Do you have any ideas on what the problem might be?
>>
>> Thank you very much,
>> Thomas Krause

>
>


My System SpecsSystem Spec
Old 06-06-2006   #4 (permalink)
Vipin


 
 

Re: Debugging Problems (FatalExecutionEngineError)

That's something I have also been annoyed of.
xaml compiler doesn't really checks whats inside "(quotes)
until the objects are constructed from baml at runtime.

Anyone from Microsoft, why the markup compiler can't be intelligent in those
cases?

--
Vipin Aravind
http://www.explorewindows.com


"Thomas Krause" <Forum.Thomas.Krause-NoSpam-@gmx.de> wrote in message
news:uY$sAoXiGHA.3900@TK2MSFTNGP05.phx.gbl...
> In this case, the error was that I tried to use a non-public class with an
> ObjectDataProvider for binding. But the rest of the XAML code did not
> matter.
> I reduced the xaml to just the ObjectDataProvider and a single Control for
> Binding and it still threw this strange FatalExecutionEngineError
> exception. It is really not a problem in the XAML code itself, I can make
> any mistake in the XAML code and everytime it throws an
> ExecutionEngineError exception instead of the XamlParseException. To give
> you an example, the following code would throw an ExecutionEngineError,
> because the xyz resource does not exist:
>
> <Window x:Class="MyApplication.Window1"
> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>>

> <Button Content ="{StaticResource xyz}"></Button>
> </Window>
>
> Thomas Krause
>
> "Vipin" <Vipin@nospam.com> wrote:
>> Out of curiosity, how does your xaml look like?
>>
>> --
>> Vipin Aravind
>> http://www.explorewindows.com
>>
>>
>> "Thomas Krause" <Forum.Thomas.Krause-NoSpam-@gmx.de> wrote in message
>> news:740BC249-0AE0-4580-8253-674F2E71FBD3@microsoft.com...
>>> Hi,
>>>
>>> I'm using VS2005 on the Vista Beta 2 Release to write a little Avalon
>>> Application. My problem is that each time there is a (markup) error in
>>> my application I get an FatalExecutionEngineError exception instead of a
>>> real exception with a useful description of the problem. My 'Main'
>>> function looks like this:
>>> MyApplication.App app = new MyApplication.App();
>>>
>>> app.InitializeComponent();
>>>
>>> app.Run(); //Error occurs during this call
>>>
>>> However, if I put a try...catch arround that block it catches an
>>> System.Windows.Markup.XamlParseException (instead of the
>>> FatalExecutionEngineError), which seems to be the "real" exception and
>>> which also includes a helpful error message. But I don't want to use a
>>> try...catch block just to get a useful exception message.
>>>
>>> The FatalExecutionEngineErrors seem to occur only during the app.Run()
>>> call, exceptions thrown in other places work as expected.
>>>
>>> I installed the latest Windows SDK and WinFX extensions for VS, so this
>>> should not be a probkem, too.
>>>
>>> Do you have any ideas on what the problem might be?
>>>
>>> Thank you very much,
>>> Thomas Krause

>>
>>

>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
JIT debugging General Discussion
Help debugging with MSE VB Script
JIT Debugging Software
JIT Debugging Software
JIT Debugging .NET General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46