468,242 Members | 1,601 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,242 developers. It's quick & easy.

Passing by reference / "Unhandled exception: User breakpoint"

Hi,

I'm doing a nested pass by reference of a vector. I'm in Vis Studio 2003.

Example:

vector <unsigned long long> vect;
func1(vect);

where func1 calls func2(vect);

which calls ONLY "vect.push_back(0);"

where func1 is defined as func1(vector <unsigned long long> & vect)
and func2 is defined as func2(vector <unsigned long long> & vect).

The first two times I call func2(vect), it works fine, and on the third
time, I get an exception right on the push_back( ) call, but only when I'm
in Debug mode. Else, it works fine.

The exception is: "Unhandled exception: User breakpoint."

I can keep stepping through, and it keeps going. I get another exception of
the same type right after the last call of a function returning void. I have
breakpoints in both these spots. I can step through to the end, and the
results are fine.

Why is it throwing exceptions? What's this mean?

Thanks,
Andy


Oct 6 '05 #1
4 4270
Andy wrote:
I'm doing a nested pass by reference of a vector. I'm in Vis Studio 2003.

Example:

vector <unsigned long long> vect;
[...]


This is OT. 'unsigned long long' is not a standard type, you're apparently
using some MS language extensions. "User breakpoint" has nothing to do
with standard C++ either. Ask in 'microsoft.public.vc.language'.

V
Oct 6 '05 #2
"Andy" <no*******@nohost.orgo> wrote in
news:di**********@news01.intel.com:
Hi,

I'm doing a nested pass by reference of a vector. I'm in Vis Studio
2003.

Example:

vector <unsigned long long> vect;
func1(vect);

where func1 calls func2(vect);

which calls ONLY "vect.push_back(0);"

where func1 is defined as func1(vector <unsigned long long> & vect)
and func2 is defined as func2(vector <unsigned long long> & vect).

The first two times I call func2(vect), it works fine, and on the
third time, I get an exception right on the push_back( ) call, but
only when I'm in Debug mode. Else, it works fine.

The exception is: "Unhandled exception: User breakpoint."

I can keep stepping through, and it keeps going. I get another
exception of the same type right after the last call of a function
returning void. I have breakpoints in both these spots. I can step
through to the end, and the results are fine.

Why is it throwing exceptions? What's this mean?


Not enough information. You need to post the smallest compilable code that
shows the problem. Otherwise we're left with guessing what else you're
doing that may be causing the crash. You're probably doing something else
in func1() to cause this problem....
Oct 6 '05 #3
Victor Bazarov wrote:

This is OT. 'unsigned long long' is not a standard type,


Well, yes, but it's about to be. Should be voted in tomorrow. Besides,
just about every compiler in existence supports it.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Oct 7 '05 #4
This is OT. 'unsigned long long' is not a standard type, you're apparently
using some MS language extensions.
Pretend I used unsigned int, as it still happens.

"User breakpoint" has nothing to do with standard C++ either. Ask in 'microsoft.public.vc.language'.

V


Good to know, thanks.

Oct 7 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Paul Steele | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.