Question: Program crashs without reaching the breakpoint set at the beginning of main()?

W

wenjie wang

Greetings,

I'd like to know is there any situation where your program could crash
without reaching the breakpoint which you set at the beginning of
main().
 
A

Artie Gold

wenjie said:
Greetings,

I'd like to know is there any situation where your program could crash
without reaching the breakpoint which you set at the beginning of
main().

In initialization of static variables perhaps?

HTH,
--ag
 
M

Mike Wahler

wenjie wang said:
Greetings,

I'd like to know is there any situation where your program could crash
without reaching the breakpoint which you set at the beginning of
main().

Yes, there are several. One possibility is during
the constructor of a file-scope object. If you can
put together a small compilable example that gives
the problem behavior, we can take a look.

-Mike
 
S

Stuart Gerchick

Greetings,

I'd like to know is there any situation where your program could crash
without reaching the breakpoint which you set at the beginning of
main().


There are many reasons for this. Much can be done before the first
line of the program. Static variables and things with a file scope
are all set up. Construtors could be called. Pls look at what you
have a that scope or anything static
 
P

puppet_sock

Greetings,

I'd like to know is there any situation where your program could crash
without reaching the breakpoint which you set at the beginning of
main().

In addition to the fine advice others have given:
A breakpoint implies a debugger. If the debugger, together with
the prog, and anything else that may be running, runs out of memory,
then you could FUBAR before the program gets to any actual action.
Though, you *should* get appropriate diagnostics if that happens.
Socks
 
W

wenjie wang

Thanks you all the replies. I wish I have had the code and then I
have some kind of idea what might be the problem;-)

I was asked about the question and I have got no clue about it;-(
That's why I turn into this group for help.

Thanks again for the replies
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top