lotus



previous page: X04) Why do I get the error "clockWidgetClass: undefined" when linking my AwEnv program using the xt/v1.8 libraries?
  
page up: BETA Programming Language FAQ
  
next page: X06) How do I set font information in MotifStrings?

X05) Why do I get the error "Error: NULL ArgVal in XtGetValues" when executing my Xt program using the xt/v1.8 libraries?




Description

This article is from the FAQ, by with numerous contributions by others.

X05) Why do I get the error "Error: NULL ArgVal in XtGetValues" when executing my Xt program using the xt/v1.8 libraries?

This is due to a programming error in the Mjolner System interface to the X
toolkit. The error does not seem to influence programs linked under X11
release 5, but (at least) X11R6 on Linux encounters it.

To fix the error have your system administrator change some files:

1. In the file ~beta/Xt/v1.8/xtlib.bet, the definition of the pattern
argList should be changed to:

     argList: cStruct
       (# byteSize::< (# do 100->value #);
          max: (# exit R.range div 2 #);
          extend:
            (# size: @integer;
            enter size
            do (if size=0 then R.range->size
                else size-R.range->size;
               if);
               size->R.extend;
            #);
          set: @
            (# number: @integer;
               cStr: @integer;
               value: @integer;
            enter (number,cstr,value)
            do (* Cannot check ranges since no GC's may occur.
                * The user needs to do the bookkeeping himself
                * using 'max' and 'extend'.
                * The reason for this is that 'value' may be
                * the computed address of an integer.
                *)
               cstr->R[number*2-1];
               value->R[number*2]
            #);
          get: @
            (# number: @integer;
            enter number
            exit R[number*2]
            #);
          getName: @
            (# number: @integer;
               t: ^text;
            enter number
            do r[2*number-1]->CStringToText->t[];
            exit t[]
            #);
       #);

2. In the file ~beta/Xt/v1.8/private/xtenvbody.bet, the two fragments
IntegerResourceGet and AncestorSensitiveGet should be changed to:

        --- IntegerResourceGet: dopart ---
        do (1,resourceName, @@value)->private.wargs.set;
           (Thewidget,private.wargs[],1)->XtGetValues;

and

        --- AncestorSensitiveGet: dopart ---
        do (1,xtnancestorsensitive,@@value)->private.wargs.set;
           (Thewidget,private.wargs[],1)->XtGetValues;

respectively.
3. In the file ~beta/Xt/v1.8/private/awenvbody.bet, the fragment
FloatResourceGet should be changed to:

        --- FloatResourceGet: descriptor ---
        (# status,res: @integer
        do (1,resourceName,@@value)->private.wargs.set;
           (theWidget,private.wargs[],1)->XtGetValues;
           resolution->res;
           (@@value,res)->getQuotFromFloat->value
        #)

4. In the file ~beta/Xt/v1.8/motif/private/basicsbody.bet, the three
fragments MotifStringResourceGetText, MotifStringResourceGet, and
ProcResourceGet should be changed to:

        --- MotifStringResourceGetText: descriptor ---
        (# S: @MotifString;
        do (1,resourceName,@@S.value)->Private.Wargs.Set;
           (TheWidget,Private.Wargs[],1)->XtGetValues;
           S.getText->t[];
           S.destroy;
        #)

and

        --- MotifStringResourceGet: descriptor ---
        (#
        do (1,resourceName,@@value)->private.wargs.set;
           (thewidget,private.wargs[],1)->XtGetValues;
        #)

and

        --- ProcResourceGet: descriptor ---
        (#
        do (1,resourceName,@@p)->private.wargs.set;
           (Thewidget,private.wargs[],1)->XtGetValues;
        #)

respectively.
5. In the file ~beta/Xt/v1.8/motif/private/rowcolumnbody.bet the two
fragments RowColumnLabelStringGetText and RowColumnLabelStringGet
should be changed to:

        --- RowColumnLabelStringGetText: descriptor ---
        (# S: @MotifString;
        do (1,resourceName,@@S.value)->Private.Wargs.Set;
           (TheWidget,Private.Wargs[],1)->XtGetValues;
           S.getText->t[];
           S.destroy;
        #)

and

        --- RowColumnLabelStringGet: descriptor ---
        (#
        do (1,resourceName,@@value)->private.wargs.set;
           (thewidget,private.wargs[],1)->XtGetValues;
        #)

respectively.
6. Then have your system administrator issue the commands

cd $BETALIB/Xt/v1.8
beta -q -c private/awenvbody.bet motif/private/rowcolumnbody.bet

to get the changed files recompiled.

These changes will be incorporated in version 1.9 of the Xt libraries.

To simplify correction of the above errors, a patch for the Mjolner System,
release 3.0 and 3.1 has been supplied. It can be fetched from
ftp://ftp.mjolner.com/pub/X11R6_patch,`.

Please see the README file for details.

 

Continue to:















TOP
previous page: X04) Why do I get the error "clockWidgetClass: undefined" when linking my AwEnv program using the xt/v1.8 libraries?
  
page up: BETA Programming Language FAQ
  
next page: X06) How do I set font information in MotifStrings?