Bug 98839 - Exceptions made from callbacks from Motif widgets not cought
Exceptions made from callbacks from Motif widgets not cought
Status: CLOSED DUPLICATE of bug 98988
Product: Red Hat Linux
Classification: Retired
Component: openmotif (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
Brian Brock
:
Depends On: 98988
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-09 10:14 EDT by David Juran
Modified: 2007-04-18 12:55 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:56:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test case (1.30 KB, text/plain)
2003-07-09 10:15 EDT, David Juran
no flags Details

  None (edit)
Description David Juran 2003-07-09 10:14:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

Description of problem:
If a callback function attached to a Motif widget throws an exception
the program is aborted even if the call occurs from within a try-clause.

Compile attached program and run it on a X11 display.
Click the "Thrower" button.
The program is expected to catch the exception and end normally.
The program works on Solaris, HPUX and AIX. It fails on Linux.
Do note that the same problem exists on redhat 9 as well.

Version-Release number of selected component (if applicable):
openmotif-2.2.2-12
XFree86-libs-4.2.1-21
gcc-c++-3.2-7

How reproducible:
Always

Steps to Reproduce:
1.g++ ex11.cc -L/usr/X11R6/lib -lXm 
2.a.out
3.press the button in the widget

    

Actual Results:  Exceptption was not cought and prgram aborted

Expected Results:  The exception should have been cought.

Additional info:
Comment 1 David Juran 2003-07-09 10:15:55 EDT
Created attachment 92831 [details]
test case
Comment 2 David Juran 2003-07-11 08:54:57 EDT
No, this is actually a bug in openMotif or more specifically in the way
openMotif is being built and not in the compiler.
In order for exceptions to be able to propagate throgh functions registered as
motif callbacks, the -fexceptions flag has to be used while building the motif
library.

Adding 
-fexceptions
to the definition of CFLAGS on line 46 in the openmotif.spec remedies the
problem. Then the same has to be done to libXt as well )-:
Comment 3 Thomas Woerner 2003-08-18 04:43:51 EDT

*** This bug has been marked as a duplicate of 98988 ***
Comment 4 Mike A. Harris 2003-08-18 05:06:14 EDT
For the record, I agree with Thomas, and with XFree86.org on this issue.
Xlib et al were not designed to be built in this fashion, and were developed
before C++ existed.

Full details at:  http://bugs.xfree86.org/show_bug.cgi?id=503
Comment 5 Red Hat Bugzilla 2006-02-21 13:56:59 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.