throw and catch in a thread

bridged with qdn.public.qnxrtp.devtools
Post Reply
Mike Schneider

throw and catch in a thread

Post by Mike Schneider » Fri Oct 17, 2003 6:55 pm

Using Qnx6.2.1A.
A coworker is having problems with throwing/catching an exception in a
thread.
The throw/catch works fine in the main of the parent, but when done in a
child thread, the entire process terminates.
He is in the process of rewriting it to remove the use of the
try/throw/catch. But I thought I would ask if anyone has seen this and
knows of a fix for it. It may be just a compiler option, or something
like that.
Thanks,
ms...

Lisa Scanlan

Re: throw and catch in a thread

Post by Lisa Scanlan » Fri Oct 17, 2003 8:04 pm

Something similar was happening to me. In my case, it was a linker problem.
The problem only occured if I was linking with a static library (I was using
socket). QNX tech support gave me a workaround: add '-Bdynamic' to the end
of the last 'LIBS +=' line in common.mk. This cleared up my problem.

I was told this was fixed in 6.2.1B, but all of my common.mk files still
have the workaround text, so I haven't verified that the fix is in there. I
didn't see anything about it in the release notes.

-Lisa

"Mike Schneider" <mike.schneider@heidelberg.nospam.com> wrote in message
news:bmpdus$5al$1@tiger.openqnx.com...
Using Qnx6.2.1A.
A coworker is having problems with throwing/catching an exception in a
thread.
The throw/catch works fine in the main of the parent, but when done in a
child thread, the entire process terminates.
He is in the process of rewriting it to remove the use of the
try/throw/catch. But I thought I would ask if anyone has seen this and
knows of a fix for it. It may be just a compiler option, or something
like that.
Thanks,
ms...

Mike Schneider

Re: throw and catch in a thread

Post by Mike Schneider » Mon Oct 20, 2003 12:39 pm

He has already tried both static and dynamic with no change in the
results.
ms...

Lisa Scanlan wrote:
Something similar was happening to me. In my case, it was a linker problem.
The problem only occured if I was linking with a static library (I was using
socket). QNX tech support gave me a workaround: add '-Bdynamic' to the end
of the last 'LIBS +=' line in common.mk. This cleared up my problem.

I was told this was fixed in 6.2.1B, but all of my common.mk files still
have the workaround text, so I haven't verified that the fix is in there. I
didn't see anything about it in the release notes.

-Lisa

"Mike Schneider" <mike.schneider@heidelberg.nospam.com> wrote in message
news:bmpdus$5al$1@tiger.openqnx.com...

Using Qnx6.2.1A.
A coworker is having problems with throwing/catching an exception in a
thread.
The throw/catch works fine in the main of the parent, but when done in a
child thread, the entire process terminates.
He is in the process of rewriting it to remove the use of the
try/throw/catch. But I thought I would ask if anyone has seen this and
knows of a fix for it. It may be just a compiler option, or something
like that.
Thanks,
ms...

Post Reply

Return to “qdn.public.qnxrtp.devtools”