Windows error 0x0000002A, 42

Detailed Error Information

INCONSISTENT_IRP[1]

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

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 Code42 (0x002a)

Possible solutions

22

Append NSInteger to NSMutableData

objective-c

Pass the address of the integer, not the integer itself. appendBytes:length: expects a pointer to a data buffer and the size of the data buffer. In this case, the "data buffer" is the integer.

[myData appendBytes:&myInteger length:sizeof(myInteger)];

Keep in mind, though, that this will use your computer's endianness to encode it. If you plan on writing the data to a file or sending it across the network, you should use a known endianness instead. For example, to convert from host (your machine) to network endianness, use htonl():

uint32_t theInt = htonl((uint32_t)myInteger);
[myData appendBytes:&theInt length:sizeof(theInt)];
answered on Stack Overflow Apr 4, 2009 by Adam Rosenfield • edited Apr 4, 2009 by Adam Rosenfield
3

Embedded C compile size is bigger with int16's than with int32's. Why?

c
build
firmware

Your compiler probably emits code for int32's just fine; it's probably the natural int size for your architectiure (is this true? Is sizeof(int)==4?). I am guessing that the size increase is from three places:

  1. Making alignment work

    32-bit ints probably align naturally on the stack and other places, so typically code would not have to be emitted to make sure "the stack is 4 byte aligned". If you sprinkle a bunch of 16 bit ints in your code, it may have to add padding (extra adds to frame pointer as a fix-up?) Usually one add instruction covers the frame/stack maintenance, but maybe extra instructions are emitted to guarantee alignment.

  2. Translating between 16-bit and 32-bit ints

    With 32-bit ints, most instructions naturally work. With smaller ints, sometimes the compiler has to emit code that chops/slices up bits so that it preserves the semantics of the smaller. (Maybe doing an extra AND instruction to mask off some high-order bits or an OR instruction to set some bits).

  3. Going back and forth to memory

    Standard LOADS and STORES are for 32-bit ints (which is probably natural size of your machine). It's possible, that when it has to store only 2 bytes instead of 4, that the architecture has to emit extra instructions to store a non-standard int (either by chopping up the int, using a strange instruction that has a longer encoding, or using bit instructions to chop up the instruction).

These are all guesses. The best way to see is to look at the assembly code and see what's going on!

answered on Stack Overflow Jun 23, 2015 by rts1
1

Can unmanaged first chance exception cause a crash/restart?

vb.net
windbg
heap-corruption
first-chance-exception
adplus

This MSDN article about exception dispatching explains the process:

When an exception occurs in user-mode code, the system uses the following search order to find an exception handler:

  1. If the process is being debugged, the system notifies the debugger. For more information, see Debugger Exception Handling.
  2. If the process is not being debugged, or if the associated debugger does not handle the exception, the system attempts to locate a frame-based exception handler by searching the stack frames of the thread in which the exception occurred. The system searches the current stack frame first, then searches through preceding stack frames in reverse order.
  3. If no frame-based handler can be found, or no frame-based handler handles the exception, but the process is being debugged, the system notifies the debugger a second time.
  4. If the process is not being debugged, or if the associated debugger does not handle the exception, the system provides default handling based on the exception type. For most exceptions, the default action is to call the ExitProcess function.

In step 1 the exception is called a first chance exception, because it's the first chance anyone can catch and handle the exception.

In step 3 the same exception is called a second chance exception, because it's the second time, the debugger gets the chance to catch and handle the exception.

Only if the process continues to step 4 the program will crash or exit. Therefore yes, only second chance exceptions can crash a process.

Can unmanaged first chance exception cause a crash/restart?

No. See before.

When investigating a crash, should I only investigate second chance exceptions?

Basically yes. That's what everyone (>90%) does when analyzing crashes.

What are the cases when I also need to investigate a first chance exception dump?

Case 1:

That second chance exception might be a result of a previous first chance exception. Due to that first chance exception, a value might not be initialized and cause a different second chance exception.

Example code for such a scenario:

SomeObject o = null;
try {
    throw new Exception("First chance"); // consider this in some method
    o = new SomeObject();
}
catch (Exception)
{
    // make sure that the exception does not become a second chance exception
}
o.DoSomething(); // causes NullReferenceException first chance and second chance if uncaught

The application crashes because of a NullReferenceException but the real cause is the Exception before. However, such cases are typically easy to identify without having a look at first chance exceptions.

Case 2:

Exceptions have a high overhead, i.e. they cost CPU cycles and thus performance. If you have really many first chance exceptions, you might want to get rid of them.

answered on Stack Overflow Apr 18, 2018 by Thomas Weller
1

JBoss / HotSpot JVM crashing

jboss
jvm
crash-reports

Are the crash reports always the same? Do you have the stack traces? i.e. the bit in the crash dump headed by

--------------- P R O C E S S ---------------

It's a v vague dump tbh. One possibility is dodgy RAM as it seems to have died while at a safepoint reached in order to collect garbage. Have you done any hardware diagnostics on the box?

answered on Stack Overflow May 13, 2011 by Matt
1

JBoss / HotSpot JVM crashing

jboss
jvm
crash-reports

I agree with Matt, it does sound like hardware problems. I've seen your three crash reports and they are all failing in different parts. One, mostly when executing VM code. The second, in native code. And the third (in the question you should have not opened, but added here), in standard Java code.

Of course, if you have several production machines and the issue is happening in different ones, then I would seriously consider to buy subscriptions and get real support.

answered on Stack Overflow May 15, 2011 by jpkrohling
1

BitLocker USB Drive removed while accessing, filesystem is corrupt, can it be fixed?

windows-7
windows-8
bitlocker
ubuntu-14.04

I guess this isn't really an answer. However, I hope it will nevertheless be helpful to others.

Sadly, I think you've learned a rather harsh lesson regarding the use of encrypted drives, especially removable ones.

All encrypted drives whether removable or not are more sensitive to corruption issues. This makes it even more important to ensure that you have the data backed up. Clearly, the backup also needs to be encrypted and again this means that you should keep several copies of backups. The realistic minimum for backups is THREE. These should be kept in different locations.

For home use, I keep data on local PC's, copied on the NAS (the NAS drive data is duplicated within the NAS, not really a robust backup but convenient if a local disk fails) and copied to a secure cloud backup such as CrashPlan.

No form of removable media can be considered robust. Flash based memory sticks are as liable to faile as any other removable media. I don't know what the exact stats are but my own experience is that a memory stick is just as likely to fail as a hard drive, rather less than an old-fashioned floppy disk. CD's and DVD's are very variable in their reliability with some failing after a couple of years of storage, others lasting a decade or more.

Sorry about the lack of a real answer but I think this is always worth repeating so that more people understand the need for good backup processes.

answered on Super User May 4, 2014 by Julian Knight
1

I got segmentation fault in c inline assembly when I called jmp

c
segmentation-fault
inline-assembly
jmp

I don't think the segmentation fault is caused by the jmp L instruction.

Look at what I did here:

(gdb) b main
Breakpoint 1 at 0x80483be: file test.c, line 3.
(gdb) run
Starting program: /home/cad/a.out 

Breakpoint 1, main () at test.c:3
3       __asm__("jmp L\n"
(gdb) display/i $pc
1: x/i $pc
=> 0x80483be <main+3>:  jmp    0x80483ec <main+49>
(gdb) si
0x080483ec      3       __asm__("jmp L\n"
1: x/i $pc
=> 0x80483ec <main+49>: call   0x80483c0 <main+5>
(gdb) si
0x080483c0      3       __asm__("jmp L\n"
1: x/i $pc
=> 0x80483c0 <main+5>:  pop    %esi
(gdb) si
0x080483c1      3       __asm__("jmp L\n"
1: x/i $pc
=> 0x80483c1 <main+6>:  mov    %esi,0x8(%esi)
(gdb) si

Program received signal SIGSEGV, Segmentation fault.
0x080483c1 in main () at test.c:3
3       __asm__("jmp L\n"
1: x/i $pc
=> 0x80483c1 <main+6>:  mov    %esi,0x8(%esi)
(gdb)

As you see, I set a breakpoint at main and enabled disassembling of every machine instruction executed (display/i $pc). Then I stepped through the machine instructions (si). It turns out that the faulty instruction is mov %esi,0x8(%esi) at 0x80483c1.

As far as I can tell, the problem is that gdb only shows the next whole statement it executes. Since a statement ends with a semicolon, the whole __asm__("...") thing counts as one statement and gdb only prints the first line of it, i.e., __asm__("jmp L\n", as long as the debugger steps through the __asm__ statement.


So we got that cleared up, now let's figure out what's causing the segmentation fault.

When you have jumped to L, call sub is executed. This pushes the 32-bit return address onto the stack. The first instruction in sub, pop %esi, fills %esi with the return address and removes it from the stack.
When you do mov %esi,0x8(%esi) now, the CPU tries to move %esi to 0x8 bytes behind where the return address points, that is, within the code segment. And, as it seems, code is read-only on your OS, so the program faults.

answered on Stack Overflow Sep 25, 2016 by cadaniluk • edited Sep 25, 2016 by cadaniluk
0

How can I set up launch.json in Visual Code to debbug C

python
c++
debugging
gdb
visual-studio-code

I think you are mixing up variables and strings ${...} indicates a variable used within visual code. Directory paths don't need the encompassing ${}.

Your Python3 configuration should look like this:

{
    "name": "Python3",
    "type": "python",
    "request": "launch",
    "stopOnEntry": true,
    "pythonPath": "${config:python.pythonPath}",
    "program": "/Users/bpk/Documents/Study/Python3/study.py",
    "cwd": "/Users/bpk/Documents/Study/Python3",
    "env": {},
    "envFile": "/Users/bpk/Documents/Study/Python3/.env",
    "debugOptions": [
        "RedirectOutput"
    ]
},

Changes to your C debug configuration are much the same as Python and should look like this:

 {
     "name": "(gdb) Launch",
     "type": "cppdbg",
     "request": "launch",
     "program": "/Users/bpk/Documents/Study/C/Study/study",
     "args": [],
     "stopAtEntry": false,
     "cwd": "/Users/bpk/Documents/Study/C/Study",
     "environment": [],
     "externalConsole": false,
     "MIMode": "gdb",
     "setupCommands": [
         {
             "description": "Enable pretty-printing for gdb",
             "text": "-enable-pretty-printing",
             "ignoreFailures": true
         }
     ]
 },
answered on Stack Overflow Feb 6, 2018 by ScottB • edited Feb 6, 2018 by ScottB
0

fobs4jmf.dll Error in Java Swing playing .avi videos

java
swing
jmf
avi

such error generally occurs when system don't have dll file support, so try to check dll support for your corresponding player or

download any application which fills the necessary dll files in your system try

answered on Stack Overflow May 13, 2012 by Pavan Gomladu
0

Embedded C compile size is bigger with int16's than with int32's. Why?

c
build
firmware

To save space I tried replacing the relevant variables with int16's. When I built it, the size of the build went up by about 60 bytes.

This doesn't make much sense to me. Using a smaller data type doesn't necessary translate to fewer instructions. It could reduce memory use when running the software but not necessarily build size.

So, for example, the reason using smaller data types here could be increasing the size of your binaries could be due to the fact that using smaller types requires more instructions or longer instructions. For example, for non-word/dword aligned memory, the compiler may have to use more instructions for unaligned moves. It may have to use special instructions to extract lower/upper words if all the general-purpose registers are larger. In that case, you might also get a slight performance hit in addition to the increased binary size using those smaller types (but less memory use when the code is running).

There may be a number of scenarios and it's specific to both the exact compiler you are using and architecture (the assembly code will reveal the exact cause), but in short, using smaller types for variables does not necessarily mean smaller-sized builds/fewer instructions, and could easily mean the opposite.

answered on Stack Overflow Jun 23, 2015 by Team Upvote • edited Jun 23, 2015 by Team Upvote
0

I got segmentation fault in c inline assembly when I called jmp

c
segmentation-fault
inline-assembly
jmp

Had more time to look at this:

I think you're trying to do a sys_write but everything seems to be getting initialised via the esi register which is being "initialised" as top value on the stack. I'm guessing the programmer is assuming GNU calling standard so the for main(argc, argv): but you don't need to do this; esi on a 32bit system will have the argv argument. But why the pop? Why not declare main explicitly with the arguments as well. I think this is where the confusion is coming in.

answered on Stack Overflow Sep 25, 2016 by cdcdcd • edited Sep 25, 2016 by cdcdcd
0

I got segmentation fault in c inline assembly when I called jmp

c
segmentation-fault
inline-assembly
jmp

To do the jmp without using additional flag use

jmp . + 42

42 is the number of bytes. It could be written in hex too 0x2c.

answered on Stack Overflow May 22, 2018 by Abdullah Samarkandi
0

unhandled MPU fault on Cortex-M3 with uclinux and uclibc

arm
cortex-m3
uclibc
uclinux
mpu

What I actually did - disabled CONFIG_MPU in kernel and it started to work. After that I found that my u-boot is custom fork and probably doesn't setup MPU well. Without CONFIG_MPU everything started to work great. As I said it's Cortex-M3 related issue and what I found is that kernel debug not properly describes the fault (0x00000000 instead of real fault address etc).

answered on Stack Overflow Nov 6, 2014 by pulse

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