Jump to content
  • Advertisement
Sign in to follow this  
Wavewash

How to stop "Break called from code".

This topic is 5175 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Apparently somewhere a break is being called in my code. I have no clue when or where it is set but it's there everytime I run. The funny thing is that it doesn't stop on a code line, it stops on some assembly line. I'm not even sure if it's invoked by me since my only code that called for a break is commented out. Does anyone know how to find such a line? I'm using VC++ 6.0. Thanks. ~Wave

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Yes, use debugger and walk the stack, duh...

Share this post


Link to post
Share on other sites
I tried that AP, and ended up at a line in the code that really didn't help much. The problem is that breaks called from code from a line such as: _crtsetbreakalloc(321); don't really tell you exactly where the break is coming from since they are set at run time.

~Wave

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
_crtsetbreakalloc(321);
is that line is in your code?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
And I apologize for being tasty

Share this post


Link to post
Share on other sites
Quote:
Original post by Wavewash
I tried that AP, and ended up at a line in the code that really didn't help much. The problem is that breaks called from code from a line such as: _crtsetbreakalloc(321); don't really tell you exactly where the break is coming from since they are set at run time.

~Wave


The stack didn't lead up to a line of your own code? Is it happening at start-up/close or something? And when you say break, do you mean an actual breakpoint?

Matt Hughson

Share this post


Link to post
Share on other sites
I meant to say that it's breaking in a system dll. NTDLL seems to be the culprit. I have no idea why it is doing that though. At this site they mention how to handle system dll breakpoint issues. I don't understand it or if it applies to my problem.

Quote:
Original post by Anonymous Poster
And I apologize for being tasty


It's cool, I'm just happy to get a reply.

~Wave

Share this post


Link to post
Share on other sites
Quote:
Original post by matthughson

The stack didn't lead up to a line of your own code? Is it happening at start-up/close or something? And when you say break, do you mean an actual breakpoint?

Matt Hughson


If I move back up the stack far enough it comes to my code where I deleted an array. The breakpoint called from code acts just as a regular breakpoint would but since it is called from code no stop sign is there. It just stops on whatever line. If I keep running through it by pressing f5 I get no issues and it completes executing with no issues.

~Wave

Share this post


Link to post
Share on other sites
I got a similar error just last night, in my case it was simply because I released memory that contained data that was overflowing the memory. Then the _crt.. functions crashed when checking for memoryleaks (kind of funny since that is what they are for, MS bug perhaps?) In any case, I allocated correct amount of memory for the data (I just happened to *know* which one, in your case it might be more difficult) and the problem went away. I don't know if this is of any help for you though.

Share this post


Link to post
Share on other sites
Thanks MichealT, this is my first time encountering this sort of thing. I'm looking through my code, I think it's probably something the compiler is getting picky about. Thanks for the tip though.

~Wave

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!