Bug 98839

Summary: Exceptions made from callbacks from Motif widgets not cought
Product: [Retired] Red Hat Linux Reporter: David Juran <djuran>
Component: openmotifAssignee: Thomas Woerner <twoerner>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:56:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 98988    
Bug Blocks:    
Attachments:
Description Flags
test case none

Description David Juran 2003-07-09 14:14:25 UTC
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 14:15:55 UTC
Created attachment 92831 [details]
test case

Comment 2 David Juran 2003-07-11 12:54:57 UTC
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 08:43:51 UTC

*** This bug has been marked as a duplicate of 98988 ***

Comment 4 Mike A. Harris 2003-08-18 09:06:14 UTC
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 18:56:59 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.