FROM : Jim Crafton
DATE : Fri Jul 04 20:52:56 2008
I have found stuff on the internet about issues with throwing C++
exceptions, and I've run into something which I think is what these
articles are talking about but I'm not 100% sure so I thought I'd ask.
I have some C+ code that is being called as a result of the AppKit
framework updating a view with the message drawRect:rect:
In the C++ code I throw an exception. Outside of this, several steps
down the stack frame, I have a C++ function that has a try catch, but
the catch doesn't ever seem to be called, instead the program just
exits. in Xcode the stack looks like:
#0 0x957a2b9e in __kill
#1 0x957a2b91 in kill$UNIX2003
#2 0x95819ec2 in raise
#3 0x9582947f in abort
#4 0x95123005 in __gnu_cxx::__verbose_terminate_handler
#5 0x9512110c in __gxx_personality_v0
#6 0x9512114b in std::terminate
#7 0x95121261 in __cxa_throw
#8 0x003786fe in VCF::FoundationKit::assertCondition at FoundationKit.cpp:205
#9 0x000067b4 in test1Window::paint at main.cpp:78
#10 0x009a9dfe in VCF::OSXWindow::internal_paint at OSXWindow.cpp:1029
#11 0x009a9eac in -[VCFWindowContentView drawRect:] at OSXWindow.cpp:147
#12 0x93c4b984 in -[NSView _drawRect:clip:]
//rest omitted for clarity
#22 0x93c08772 in -[NSWindow makeKeyAndOrderFront:]
#23 0x009a9614 in VCF::OSXWindow::setVisible at OSXWindow.cpp:371
#24 0x008d038f in VCF::Control::setVisible at Control.cpp:598
#25 0x0091eff9 in VCF::Frame::show at Frame.cpp:167
#26 0x00006f6d in test1Window::test1Window at main.cpp:70
#27 0x0000701d in test1Window::test1Window at main.cpp:71
#28 0x00007055 in test1Application::initRunningApplication at main.cpp:99
#29 0x0084ce97 in VCF::Application::internal_main at Application.cpp:162
#30 0x0084d9d9 in VCF::Application::main at Application.cpp:341
#31 0x00002237 in main at main.cpp:128
VCF::FoundationKit::assertCondition calls "throw".
VCF::Application::internal_main has a try/catch block, but I never end
up there. Is this the expected behaviour that people are talking about
when they refer to issues with ObjectiveC++ and C++ exceptions?
Thanks
Jim
DATE : Fri Jul 04 20:52:56 2008
I have found stuff on the internet about issues with throwing C++
exceptions, and I've run into something which I think is what these
articles are talking about but I'm not 100% sure so I thought I'd ask.
I have some C+ code that is being called as a result of the AppKit
framework updating a view with the message drawRect:rect:
In the C++ code I throw an exception. Outside of this, several steps
down the stack frame, I have a C++ function that has a try catch, but
the catch doesn't ever seem to be called, instead the program just
exits. in Xcode the stack looks like:
#0 0x957a2b9e in __kill
#1 0x957a2b91 in kill$UNIX2003
#2 0x95819ec2 in raise
#3 0x9582947f in abort
#4 0x95123005 in __gnu_cxx::__verbose_terminate_handler
#5 0x9512110c in __gxx_personality_v0
#6 0x9512114b in std::terminate
#7 0x95121261 in __cxa_throw
#8 0x003786fe in VCF::FoundationKit::assertCondition at FoundationKit.cpp:205
#9 0x000067b4 in test1Window::paint at main.cpp:78
#10 0x009a9dfe in VCF::OSXWindow::internal_paint at OSXWindow.cpp:1029
#11 0x009a9eac in -[VCFWindowContentView drawRect:] at OSXWindow.cpp:147
#12 0x93c4b984 in -[NSView _drawRect:clip:]
//rest omitted for clarity
#22 0x93c08772 in -[NSWindow makeKeyAndOrderFront:]
#23 0x009a9614 in VCF::OSXWindow::setVisible at OSXWindow.cpp:371
#24 0x008d038f in VCF::Control::setVisible at Control.cpp:598
#25 0x0091eff9 in VCF::Frame::show at Frame.cpp:167
#26 0x00006f6d in test1Window::test1Window at main.cpp:70
#27 0x0000701d in test1Window::test1Window at main.cpp:71
#28 0x00007055 in test1Application::initRunningApplication at main.cpp:99
#29 0x0084ce97 in VCF::Application::internal_main at Application.cpp:162
#30 0x0084d9d9 in VCF::Application::main at Application.cpp:341
#31 0x00002237 in main at main.cpp:128
VCF::FoundationKit::assertCondition calls "throw".
VCF::Application::internal_main has a try/catch block, but I never end
up there. Is this the expected behaviour that people are talking about
when they refer to issues with ObjectiveC++ and C++ exceptions?
Thanks
Jim
| Related mails | Author | Date |
|---|---|---|
| Jim Crafton | Jul 4, 20:52 | |
| Bill Bumgarner | Jul 4, 21:45 | |
| Jim Crafton | Jul 4, 22:03 | |
| Uli Kusterer | Jul 4, 22:19 | |
| Jim Crafton | Jul 4, 22:34 | |
| Scott Ribe | Jul 4, 22:50 | |
| Jim Crafton | Jul 5, 17:01 | |
| Scott Ribe | Jul 5, 18:05 | |
| Uli Kusterer | Jul 5, 19:11 | |
| Clark Cox | Jul 5, 19:52 | |
| Uli Kusterer | Jul 5, 20:21 |






Cocoa mail archive

