Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Windows has triggered a breakpoint in bgi.exe.

This may be due to a corruption of the heap, which indicates a bug in bgi.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while bgi.exe has focus.

The output window may have more diagnostic information.


please help me for solving this error .
Posted
Updated 24-Oct-15 23:03pm
Comments
George Jonsson 25-Oct-15 5:18am    
No one can solve your problem with the little information you have provided.
Is bgi.exe your compilation? If so, have you used the debugger?

We can't help you - we don't have access to your code, your data, or even your PC!

So, it's going to be up to you.
Put a breakpoint on the first line in the function, and run your code through the debugger. Then look at your code, and at your data and work out what should happen manually. Then single step each line checking that what you expected to happen is exactly what did. When it isn't, that's when you have a problem, and you can back-track (or run it again and look more closely) to find out why.

Sorry, but we can't do that for you - time for you to learn a new (and very, very useful) skill: debugging!
 
Share this answer
 
You must debug your program.

1. Build it in debug mode and run it til an error is happening.
2. Maybe you can see what code is executed when the errors happens.
3. If not: he error must also have a memory address where it ist happening. Dont stop the program but copy that value and look with the memory viewer what memory or objects are there. It may give you a hint what is wrong.

Most times memory is written which isnt allocated for that use. Example: a string in a too short buffer.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900