Click here to Skip to main content
15,916,379 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: abababab() - what to do? Pin
dennisV26-Nov-03 21:40
dennisV26-Nov-03 21:40 
GeneralRe: abababab() - what to do? Pin
Prakash Nadar26-Nov-03 23:53
Prakash Nadar26-Nov-03 23:53 
GeneralRe: abababab() - what to do? Pin
dennisV26-Nov-03 23:58
dennisV26-Nov-03 23:58 
GeneralRe: abababab() - what to do? Pin
Prakash Nadar27-Nov-03 0:58
Prakash Nadar27-Nov-03 0:58 
GeneralRe: abababab() - what to do? Pin
dennisV27-Nov-03 1:17
dennisV27-Nov-03 1:17 
GeneralRe: abababab() - what to do? Pin
фил27-Nov-03 3:07
фил27-Nov-03 3:07 
GeneralRe: abababab() - what to do? Pin
dennisV27-Nov-03 12:18
dennisV27-Nov-03 12:18 
AnswerRe: abababab() - what to do? Pin
Mike Dimmick27-Nov-03 2:29
Mike Dimmick27-Nov-03 2:29 
You need the debugging symbols for your platform.

NTDLL and many other system DLLs are compiled with an option called Frame Pointer Omission turned on. When compiling a function, the compiler normally uses the EBP register to point to the beginning of the function's local registers on the stack (the frame), storing the old value of EBP at the top of the stack first. However, if this optimisation is turned on, the compiler can decide to omit the set-up and tear-down of EBP - this also allows it to use EBP for other purposes. When it does this, it notes the fact in the debugging information, if any is generated.

The debugger takes one of two approaches in walking a stack. If it has debugging information, it consults to see if FPO data is available for the function - this tells it where to find the beginning of the frame and therefore where the return address is stored (and what the return address is). Otherwise, if there is no FPO data or no debugging information, it looks for the return address in a memory location near the value of EBP. In this case, EBP is pointing somewhere other than at the stack.

To fix this, get the OS debug symbols. You have two options: you can either download a full symbol pack[^], or you can use Microsoft's symbol server[^] to download only the required symbols. If you have Visual C++ .NET (2002 or 2003), you can use the symbol server; see Using a Symbol Server[^] in the VS.NET documentation.

If you're using VC6, you'll have to use the full symbol package or download the Debugging Tools for Windows[^], and use WinDBG to debug instead.

Symbol packages have the unfortunate disadvantage that they're only updated for each OS service pack. They're not updated for individual hotfix or security patch releases - hotfix packages used to contain updated symbols for that hotfix, but this seems to have been dropped recently.

I suspect that you're stopped inside the Windows heap management code because a heap block has become corrupted (which is the message you got in the output window). If an executable is marked as Debug, Windows checks heap allocations and deallocations more thoroughly, and breaks into the debugger if there's a problem. To pinpoint the problem, it can help to enable the Page Heap mode.

In this mode, the Windows heap manager code allocates every block on its own memory page, with an extra page set to no access straight afterwards. It allocates the actual block at the end of the read/write page, so that if you overrun the allocated block, you get an access violation immediately.

You can enable Page Heap mode using the gflags tool, but it's easier to use along with other useful application testing tools as part of the Windows Application Compatibility Toolkit[^].
GeneralRe: abababab() - what to do? Pin
dennisV27-Nov-03 12:08
dennisV27-Nov-03 12:08 
QuestionHow to Restrict floating of Dockable window Pin
Kashish Kumar26-Nov-03 18:16
Kashish Kumar26-Nov-03 18:16 
Generalexec output Pin
marouane miftah el kheir26-Nov-03 17:33
marouane miftah el kheir26-Nov-03 17:33 
GeneralRe: exec output Pin
Johnny ²26-Nov-03 21:44
Johnny ²26-Nov-03 21:44 
GeneralMFC DialogBar problem Pin
Member 98943626-Nov-03 17:12
Member 98943626-Nov-03 17:12 
GeneralPassword Keeper Pin
kpatry26-Nov-03 16:49
kpatry26-Nov-03 16:49 
GeneralRe: Password Keeper Pin
Prakash Nadar26-Nov-03 21:30
Prakash Nadar26-Nov-03 21:30 
GeneralPageFile Size Pin
matrixprogrammer26-Nov-03 15:08
matrixprogrammer26-Nov-03 15:08 
GeneralRe: PageFile Size Pin
Joe Woodbury26-Nov-03 16:40
professionalJoe Woodbury26-Nov-03 16:40 
GeneralRe: PageFile Size Pin
matrixprogrammer26-Nov-03 16:55
matrixprogrammer26-Nov-03 16:55 
GeneralTreeview control for BOM Pin
mmcsherr26-Nov-03 15:02
mmcsherr26-Nov-03 15:02 
Generalabout C++ Pin
Chau Ngoc Vo26-Nov-03 14:35
Chau Ngoc Vo26-Nov-03 14:35 
GeneralRe: about C++ Pin
Christian Graus26-Nov-03 15:24
protectorChristian Graus26-Nov-03 15:24 
GeneralRe: about C++ Pin
Joe Woodbury26-Nov-03 16:39
professionalJoe Woodbury26-Nov-03 16:39 
GeneralRe: about C++ Pin
Phil Hamer26-Nov-03 18:35
Phil Hamer26-Nov-03 18:35 
GeneralRe: about C++ Pin
Prakash Nadar26-Nov-03 21:25
Prakash Nadar26-Nov-03 21:25 
GeneralCryptoApi CryptEncrypt returning a smaller size Pin
(Steven Hicks)n+126-Nov-03 14:32
(Steven Hicks)n+126-Nov-03 14:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.