Windows error 0x000000FC, 252

Detailed Error Information

ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY[1]

This is a Blue Screen of Death stop code. More information is available in the Knowledge Base article Bug Check 0xFC: ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY.

HRESULT analysis[2]

This is probably not the correct interpretation of this error. The Win32 error above is more likely to indicate the actual problem.
FlagsSeveritySuccess

This code indicates success, rather than an error. This may not be the correct interpretation of this code, or possibly the program is handling errors incorrectly.

Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode0 (0x000)
NameFACILITY_NULL[2][3]
DescriptionThe default facility code.[2][3]
Error Code252 (0x00fc)

Possible solutions

2

How to decipher 4 short vars from a long var using bit manipulations in C++?

c++
bit-manipulation
long-integer
short

You need to shift the bits down.

w= (wxyz & 0xFF800000) >> 23;
x= (wxyz & 0x007FC000) >> 14;
y= (wxyz & 0x00003F00) >> 8;
z= (wxyz & 0x000000FC) >> 2;
answered on Stack Overflow Jan 17, 2011 by Benjamin Lindley • edited Jan 17, 2011 by Benjamin Lindley
1

How to decipher 4 short vars from a long var using bit manipulations in C++?

c++
bit-manipulation
long-integer
short

You should do the following to get the highest byte from the 4 bytes int w = (wxyz & 0xFF000000) >> 24. First apply bit mask and then shift bits to the lowest byte.

Or you can do it other way around - shift, apply bitmask:

w = (wxyz >> 24) & 0xFF
x = (wxyz >> 16) & 0xFF
y = (wxyz >> 8) & 0xFF
z = wxyz & 0xFF

But isn't it easier to use unions?

answered on Stack Overflow Jan 17, 2011 by Elalfer
1

How to decipher 4 short vars from a long var using bit manipulations in C++?

c++
bit-manipulation
long-integer
short
w =  wxyz & 0x000001ff;
x = (wxyz & 0x0003fe00) >> 9;
y = (wxyz & 0x00fc0000) >> 17;
z = (wxyz & 0x3f000000) >> 23;

Edit: need to cast long to short to avoid compiler warning:

w = (short) wxyz & 0x000001ff;
x = (short) ((wxyz & 0x0003fe00) >> 9);
y = (short) ((wxyz & 0x00fc0000) >> 17);
z = (short) ((wxyz & 0x3f000000) >> 23);
answered on Stack Overflow Jan 17, 2011 by ThomasMcLeod • edited Jan 17, 2011 by ThomasMcLeod
1

Why iPhone app crash on device, not on simulator?

iphone
ios-simulator

This could be due to the fact that while the simulator is case insensitive, the device is case sensitive. Googling can help you to find other Q&A related to your issue.

For example, if you have a viewController called AppViewController and a NIB file called AppView, this code works on the simulator, but not on the device:

AppViewController *appViewController = [[AppViewController alloc] initWithNibName:@"appView" bundle:nil];

(note appView instead of AppView)

Try to check any file access in your app.

answered on Stack Overflow Feb 4, 2012 by Beppe • edited Feb 4, 2012 by Beppe
1

Why iPhone app crash on device, not on simulator?

iphone
ios-simulator

I have encountered the same problem but manged to solve it by just removing all OpenEars files from X-code (not only references but files in the project folder as well ) and re-adding them again.

In my case, the problem was my application could not recognize the MDEF file in my project folder, because my mdef file was corrupted or wrongly registered. I got this solution from here. Problem during mdef reading (model definition)

answered on Stack Overflow Mar 22, 2012 by yuta • edited Mar 22, 2012 by Parth Bhatt
0

How to decipher 4 short vars from a long var using bit manipulations in C++?

c++
bit-manipulation
long-integer
short

Hold on -- what do you mean by bits 0-8? This usually means the nine least significant bits, in which case you've grasped the wrong end of the int.

answered on Stack Overflow Jan 17, 2011 by TonyK
0

How to decipher 4 short vars from a long var using bit manipulations in C++?

c++
bit-manipulation
long-integer
short

This is the way I prefer to handle this, by "inching". It just makes more sense in my head. Also, unlike a mask and then shift, there is no problem of a >> being sign-extending (C/C++ isn't Java or C# in well-definedness there). I am going with the assumption that 0 is the MSB (and there are 32bits total, although a long can be more), as stated in the question.

long wxyz = ...; //(w = bits 0-8, x = bits 9-17 , y = bits 18-23, z =  bits 24-29)

wxyz >>= 2; // discard 30-31 (or, really, "least two insignificant")

z = wzyz & 0x3f; // easy to see this is "6 bits", no?
wzyz >>= 6; // throw them out

y = wzyz & 0x3f;
wzyz >>= 6;

x = wzyz & 0x1ff;
wzyz >>= 9;

w = wzyz & 0x1ff;
wzyz >>= 9; // for fun, but nothing consumes after

P.S. Adjusting for types is left as an exercise to the reader.

answered on Stack Overflow Jan 17, 2011 by (unknown user) • edited Jan 17, 2011 by (unknown user)
0

How to decipher 4 short vars from a long var using bit manipulations in C++?

c++
bit-manipulation
long-integer
short

Here's a different solution you can use.

long wxyz;
short w, x, y, z;
char* buf = new char[sizeof(long)];
buf = (char*)long; // cast long as byte array
w = (short)buf[0]; // The way you sort depends on endianness
x = (short)buf[1];
y = (short)buf[2];
z = (short)buf[3];
delete[] buf;
answered on Stack Overflow Jan 18, 2011 by Charles Ray
-1

How to decipher 4 short vars from a long var using bit manipulations in C++?

c++
bit-manipulation
long-integer
short

Partially correct. You'll have to shift them to the right if you want the values of each segment.

short w = (short)((wxyz & 0xFF800000) >> 23);
short x = (short)((wxyz & 0x007FC000) >> 14);
short y = (short)((wxyz & 0x00003F00) >> 8);
short z = (short)((wxyz & 0x000000FC) >> 2);

These are correct values.

answered on Stack Overflow Jan 17, 2011 by Michael Smith • edited Jan 17, 2011 by Michael Smith

Comments

Leave a comment

(plain text only)

Sources

  1. https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-code-reference2
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0