From: felix@laas.fr (Francois Felix INGRAND)
Newsgroups: comp.windows.x.intrinsics
Subject: Motif 1.2 widgets with non-Motif parents
Date: 4 Jan 93 17:06:25 GMT
Distribution: comp
Organization: LAAS-CNRS France


I am posting because I cannot reach the author by e-mail. Moreover, is probably
of general interest so... 

   From: chrisl@joplin.wri.com (Chris LaReau)
   Newsgroups: comp.windows.x.motif
   Summary: They dump core
   Date: 11 Dec 92 22:52:14 GMT
   Organization: Wolfram Research, Inc.
   Lines: 48
   Nntp-Posting-Host: joplin.wri.com

   My programs now dump core in _XmUnitTypeDefault while creating the menubar;
   it seems from the Motif source that the menubar RowColumn does an
   _XmIsFastSubclass macro on its parent (not a Motif widget), and dies
   horribly. If I am correct, Motif 1.2 widgets seem to assume that their
   parents are in fact Motif widgets as well and blithely dive into their
   data structures to do things that could certainly be done by correct Xt
   code (as was the case in 1.1, I assume, since 1.1 works), but with some
   speed penalty.

   My questions are:

     1) Is my interpretation of what is going on here correct?

I think it is... I think I have a similar problem with a widget I ported from
AW to Motif which worked fine until 1.2....

Here is the problem I am getting.:

Program received signal 11, Segmentation fault
0x2ae38 in _XmUnitTypeDefault ()
(gdb) where
#0  0x2ae38 in _XmUnitTypeDefault ()
#1  0xe3d74 in _XtCreateIndirectionTable ()
#2  0xe4294 in _XtGetResources ()
#3  0xd4504 in XtInitializeWidgetClass ()
#4  0xd4aa4 in _XtCreateWidget ()
#5  0xd4b34 in XtCreateWidget ()
#6  0x10930 in XmCreateForm ()
#7  0x3844 in Initialize (request=0xf7fff280, new=0x1953a0) at Info.c:365
#8  0xd4330 in XtInitializeWidgetClass ()
#9  0xd4620 in XtInitializeWidgetClass ()
#10 0xd4aa4 in _XtCreateWidget ()
#11 0xd4b34 in XtCreateWidget ()
#12 0xd4b58 in XtCreateManagedWidget ()
#13 0x2c9c in main (argc=1, argv=0xf7fff85c) at xinfo.c:118
(gdb) 

     2) Is there anything I can do to get around this _besides_ subclassing
	my widgets off XmManager? I don't want to do that; I don't want
	the added complexity, I don't want the maintenance headache, I don't
	want the extra overhead (I have plenty without Motif adding its
	two cents), and I certainly don't want to do something for Motif
	that I don't have to do for Athena or OLIT.

I agree... 

	I realize I could fix the Motif 1.2 source and link statically. I
	don't want to do that either, because it's a big lose, especially
	on systems where vendor shared libraries actually work.

   Email preferred; I will summarise to the net if interest is sufficient.

Well, my response , was not really a response... It was more of the "me too"
type... But I am interested in the other (hopefully more knowledgable) reponse
you will get.

Note that I posted a similar news 2 month ago... without any reponse. The only
solution I have been considering is  subclassing form XmManager... But waht a
pain... 

Cheers,
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Francois Felix INGRAND                   "Read my Lisp... No new syntax" (nil)
LAAS/CNRS: felix@laas.fr      "La guerre, qu'on voit danser le long des golfes
ACS Tech.: felix@acs.dialexis.fr     clairs, a des reflets d'argent" (Anonyme)
Newsgroups: comp.windows.x.intrinsics