From: astewart@catfish.megatek.com (Al Stewart)
Subject: Text widget fails under X11R5...HELP!
Organization: Megatek Corporation, San Diego, California
Date: Fri, 6 Nov 1992 00:55:49 GMT



Hello all,

  I am hoping that someone out there might know of a temporary fix for
my dilemma. 

  I am developing on SunOS 4.1.1, using X11R5, Motif 1.1.4.

  I have been writing an application that uses both Motif and PEX, hence
I need X11R5. I have used the Motif toolkit since this is the one I 
was familiar with, I thought this would be the most efficient use of 
my time. Also, although I have no experience with the Athena widgets, 
I have been told that they are not as robust or full featured as Motif.

  The early development went fine. I can open a control window which can
create Phigs Workstation windows, open structures, do simple structure
editing, post structures, handle redraws, updates, exposure events, all
using a variety of widgets. No problem so far. I ran into a problem
with text widgets however. 

  With the version we have I get SEGV whenever I focus on a text widget 
(no problems with compile, link, or run-time..until I click on one).
I typed in a the simple_text.c program from the O'Reilly X series
volume 6 by Dan Heller (p. 466) and I get the same results. Note that
this example does NOT add any callbacks.

dbx reports:
  signal SEGV (no mapping at the fault address) in _XtAddCallback at 0xf7650470
  _XtAddCallback+4:       ld      [%i0], %i5
  (dbx) w
  _XtAddCallback() at 0xf7650470
  `Selection`GetPropList() at 0xf77117d8
  `Selection`NewContext() at 0xf7711afc
  `Selection`FindCtx() at 0xf7711bc4
  `Selection`OwnSelection() at 0xf7712b98
  XtOwnSelection() at 0xf7712ee8
  _XmTextSetDestinationSelection() at 0xf771d060
  `TextIn`StartPrimary() at 0xf77209f4
  DoGrabFocus() at 0xf772110c
  HandleActions() at 0xf767660c
  HandleSimpleState() at 0xf7676c1c
  _XtTranslateEvent() at 0xf76771ac
  DispatchEvent() at 0xf7659dfc
  DecideToDispatch() at 0xf765a560
  XtDispatchEvent() at 0xf765a644
  XtAppMainLoop() at 0xf765a968
  main(argc = 1, argv = 0xf7fff9ac), line 17 in "/x/X11R5c/work/astewart/test/simple.c"
  (dbx) q


Upon further investigation it appears that
our version of the Motif libraries are not comatible with X11R5. $*&#% !

  My options are as I see it:

   - Upgrade our Motif to current version. This would be my preference.
     Other Motif users here will have the same problems as I do, eventually.

   - Port my code over to Athena widgets (or OLIT (yuck)). OK, the port of
     what I've done so far shouldn't be too bad, but I sure feel more
     comfortable using a toolkit that I am familiar with. 

   - Other ?

  So I tracked down the guy here who is responsible for Motif. We have
a source license from OSF. We have had 1.2 on order for 6 weeks now and
have not received it yet. (HE is trying to track it down)

  I am hoping that some kind soul ou there may have a work around until we
get Motif 1.2 (whenever OSF gets around to shipping it). Meanwhile
I've put myself way out on a limb...and I can hear the sound of chainsaws.

  I would appreciate any input on this problem, or any referrals to anyone
who could help.

Thanks,
Allan
astewart@megatek.com
(619 455-5590