Red Hat Bugzilla – Bug 98839
Exceptions made from callbacks from Motif widgets not cought
Last modified: 2007-04-18 12:55:34 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):
Steps to Reproduce:
1.g++ ex11.cc -L/usr/X11R6/lib -lXm
3.press the button in the widget
Actual Results: Exceptption was not cought and prgram aborted
Expected Results: The exception should have been cought.
Created attachment 92831 [details]
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
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 )-:
*** This bug has been marked as a duplicate of 98988 ***
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
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.