Hi all,
While running my application I sporadically get this exception:
First-chance exception at 0x7c81eb33 in UT2004.exe: Microsoft C++ exception: unsigned short @ 0x0012b27c.
This is a very curious description of an exception, and the disassembly doesn't give me any clues either:
esi = 0x00128C28 and esp = 0x00128B94. The call stack only shows me that it happens in kernel32.dll. But when I trace into that call, there's a sysenter instruction that fails somehow. When the error doesn't occur, the application runs just as expected so I don't have any other indications of anything going wrong.
So, I'm clueless where to start looking or how to analyze this better. Normally I at least know why the assembly instruction throws an exception.
Thanks for any ideas...
While running my application I sporadically get this exception:
First-chance exception at 0x7c81eb33 in UT2004.exe: Microsoft C++ exception: unsigned short @ 0x0012b27c.
This is a very curious description of an exception, and the disassembly doesn't give me any clues either:
7C81EB2D call dword ptr ds:[7C801504h]
7C81EB33 pop esi
7C81EB34 leave
esi = 0x00128C28 and esp = 0x00128B94. The call stack only shows me that it happens in kernel32.dll. But when I trace into that call, there's a sysenter instruction that fails somehow. When the error doesn't occur, the application runs just as expected so I don't have any other indications of anything going wrong.
So, I'm clueless where to start looking or how to analyze this better. Normally I at least know why the assembly instruction throws an exception.
Thanks for any ideas...
Try scrolling down from the current ESP until you find the address of an instruction in your program. That should help you pinpoint the problem.
Sysenter "calls the kernel", and can't be traced with a ring3 debugger. I think even softice has trouble tracing this transition.
You might want to disassemble your kernel32.dll and see where this address is - and perhaps with the additional assistance of debug symbols from microsoft.
You're probably passing some invalid arguments somewhere, or forgetting some register preservation, or have corrupted or misaligned stack?
You might want to disassemble your kernel32.dll and see where this address is - and perhaps with the additional assistance of debug symbols from microsoft.
You're probably passing some invalid arguments somewhere, or forgetting some register preservation, or have corrupted or misaligned stack?
You're probably passing some invalid arguments somewhere, or forgetting some register preservation, or have corrupted or misaligned stack?
I wish it were that easy. :cry: The situation is quite complicated. I have a graphics library, which is used by a closed-source application. The error occurs without any of my functions on the stack. So whatever it is that causes the problem, it's very subtle.
Anyway, thanks for the ideas!
Are you saying the error is intermittent - occuring under exact/similar conditions where the error does not occur? If this is so, then I would suspect hardware and refine the debugging process to ensure consistency in the environment of the error. Some bad RAM gave me a similar problem, but this error should be accompanied by others.
Can you provide any greater details?
Can you provide any greater details?
Hi bitRAKE,
The application is Unreal Tournament 2004, which I render with my own software Direct3D implementation swShader, as a d3d9.dll file.
I've been able to reporduce the error consistently by loading a certain map. I don't fully support the Direct3D interface yet, but I'd like to figure out why this error happens. Mostly I get a clear exception in these situations but now I don't have a clue at all since the call stack contains none of my functions.
SoftICE might provide some answers but I can't seem to configure it correctly to catch excpetions...
Thanks for any help!
The application is Unreal Tournament 2004, which I render with my own software Direct3D implementation swShader, as a d3d9.dll file.
I've been able to reporduce the error consistently by loading a certain map. I don't fully support the Direct3D interface yet, but I'd like to figure out why this error happens. Mostly I get a clear exception in these situations but now I don't have a clue at all since the call stack contains none of my functions.
SoftICE might provide some answers but I can't seem to configure it correctly to catch excpetions...
Thanks for any help!
"faults on" in softice - dunno if that works if UT catches exceptions itself (which I believe it does). Isn't there a way to get UT to bring up it's regular ugly exception-with-load-of-stack-trace errorbox?
"faults on" in softice - dunno if that works if UT catches exceptions itself (which I believe it does). Isn't there a way to get UT to bring up it's regular ugly exception-with-load-of-stack-trace errorbox?
I tried that, but it seems like my SoftICE installation is broken. It doesn't even catch the breakpoints in my own code. Maybe some other debugger is messing things up, I already uninstalled WinDBG though...
Sounds pretty funky - and you *can* call up the softice window? If you have a recent version, you might need... what was it again... "breakinsharedmodules on" or something similar. Also, older versions of softice don't play very well with XP...
Yes, I can access the SoftICE window with Crtl-D. I have version 4.2.7, it's a fresh install and I tried the SP2 patch but it still doesn't catch any exception or breakpoint. Very weird...
Hm, is that a DriverStudio release? That's the only softice versions that really work with XP, and I think you need 3.x before it works really well.
Hm, is that a DriverStudio release? That's the only softice versions that really work with XP, and I think you need 3.x before it works really well.
Indeed, it's DriverStudio 2.7, but it doesn't seem to work all that great with Windows XP SP2. :evil:
I think I solved the SoftICE problem. Now I can have a deeper look at the bug I hope...