Bug 98839 - Exceptions made from callbacks from Motif widgets not cought
Summary: Exceptions made from callbacks from Motif widgets not cought
Keywords:
Status: CLOSED DUPLICATE of bug 98988
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: openmotif
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On: 98988
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-09 14:14 UTC by David Juran
Modified: 2007-04-18 16:55 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:56:59 UTC
Embargoed:


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

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.


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