Boost logo

Boost Users :

From: µÅÈýÂÖµÄ (tricycle_at_[hidden])
Date: 2005-09-10 07:39:06


When an "access violation" exception occurred and didn't be caught by
the program, it would be caught by debugger such like vs.net.

1: int main()
2: {
3: int *i = 0;
4: *i = 1;
5: }

If I debug this program in vs.net, program will be broken at line 4
and an exception dialog box will be displayed. So I can know the
origin of the exception.

The problem is when the exception occurred in the thread started by
boost::thread, program cannot be broken at the line from which
exception been thrown.

01: void func()
02: {
03: int *i = NULL;
04: *i = 1;
05: }

06: int _tmain(int argc, _TCHAR* argv[])
07: {
08: thread *t = new thread(func);
10: t->join();
11: delete t;
12: return 0;
13: }

The program should be broken at line 4, but it didn't. This makes the
debugging boost::thread more difficult. How can I resolve the problem?

thanks.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net