Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fatal excecution engine error

Status
Not open for further replies.

seanbo

Programmer
Jun 6, 2003
407
GB
i am getting a "Fatal execution engine error.
The program '[2772] Statex.exe: Statex' has exited with code 0 (0x0)." error on compile. it doesn't say where the bad code is, but i have it tracked down to this line:

ratios = new float[25] {-1f, 4f/3f, 16f/9f, 1.85f, 2.35f, -1f, -1f, 1f/(float)Math.Sqrt(2), (float)Math.Sqrt(2), (float)Math.Sqrt(2)/3f, 246f/140f, -1f, -1f, 468f/60f, 234f/60f, 120f/240f, 1f, 120f/600f, 160f/600f, -1f, -1f, 3f/2f, 3f/2f, 16f/9f, 3f};


why am i getting this error?

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
ratios = new float[25] {-1f, 4f/3f, 16f/9f, 1.85f, 2.35f, -1f, -1f, 1f/(float)Math.Sqrt(2), (float)Math.Sqrt(2), (float)Math.Sqrt(2)/3f, 246f/140f, -1f, -1f, 468f/60f, 234f/60f, 120f/240f, 1f, 120f/600f, 160f/600f, -1f, -1f, 3f/2f, 3f/2f, 16f/9f, 3f};

Try splitting the list in half. That will tell you if the error is from the front half or the back half. Then repeat until you find the problem.

My guess would be that you're making calls to the Math class (a runtime call) in a predefined list of values (a compile time event). Try replacing the Math.Sqrt(2) with hard-coded 1.414213562f values and see what happens.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
The following
Code:
float [] ratios = new float[25] {-1f, 4f/3f, 16f/9f, 1.85f, 2.35f, -1f, -1f, 1f/(float)Math.Sqrt(2), (float)Math.Sqrt(2), (float)Math.Sqrt(2)/3f, 246f/140f, -1f,    -1f, 468f/60f, 234f/60f, 120f/240f, 1f, 120f/600f, 160f/600f, -1f, -1f, 3f/2f, 3f/2f, 16f/9f, 3f};
is a valid declaration and initialization.
The error should be in another place.
Which compiler and platform are you using ?
-obislavu-
 
it's not happening elsewhere. i know it's valid.

i'm using vs2k3

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
I just only declared above array locally in a method and there is no problem.
Okay,what you do with this array after you declar it as above ?
-obislavu-
 
at the point of writing, i did nothing to it expect declare and initialize it.

i know initialize it like this:

float [] ratios = new float[25];
ratios[0] = -1f;
ratios[1] =...


and it's fine. it's declare at the top of the class, and initalized in the constructor.

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top