Menu

#2 XmtAskForBoolean() causes X protocol error on Blade 150

open
nobody
Library (3)
5
2004-02-24
2004-02-24
Anonymous
No

XmtAskForBoolean() causes X protocol error on Blade
150 with following error message:
X Error of failed request:
BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 14 (X_GetGeometry)
Resource id in failed request: 0x2
Serial number of failed request: 308
Current serial number in output stream: 308

Please refer to attached test program.

Discussion

  • Nobody/Anonymous

    XmtAskForBoolean() Test Program

     
  • Nobody/Anonymous

    Logged In: NO

    It turns out that the program couldn't locate the bit map
    xm_warning in /usr/dt/share/include/bitmaps. This is not a
    bug on Xmt. Nevertheless, I don't know which environment
    variables need to be set so the Xmt program can locate the
    bitmap. Setting XPMLANGPATH, XBMLANGPATH,
    XFILESEARCHPATH, and XUSERFILESEARCHPATH doesn't help.
    Regards.

     
  • Nobody/Anonymous

    Logged In: NO

    This is not a bug in Xmt. The environment is not set up
    correctly to locate the bitmap
    in /usr/dt/share/include/bitmaps/xm_warning. Setting the
    usual variables MOTIFHOME, XBMLANGPATH, XPMLANGPATH,
    XFILESEARCHPATH, and XUSERFILESEARCHPATH doesn't
    help. However, the program runs fine after creating
    ~/bitmaps (soft)linking to /usr/dt/share/include/bitmaps.
    Thanks for any pointer to resolve this problem the right way
    instead of using the above workaround.

     
  • Nobody/Anonymous

    Logged In: NO

    If you have a more recent Motif version, the proper vars to
    set are XMICONSEARCHPATH and XMICONBMSEARCHPATH. At
    least this is true on Solaris 8 running CDE (don't know which
    motif version it has). Both env vars serve the same purpose,
    but are for different displays (color vs monochrome, I
    believe), So you could probably not set the "XMICONBM" one
    if you have a modern monitor. XBMLANGPATH will work as
    well, but has been superceded by the others.

    Also, the XmGetPixmap calls don't just look into a specified
    directory. You must specify the exact filename pattern in the
    path!!! In this case, make sure you have "%B" at the end,
    which means to look for the filename exactly as the
    image_name param in the XmGetPixmapByDepth() call (which
    Xmt uses in AskForBool.c). For example, mine is set to:

    XMICONSEARCHPATH=/usr/dt/share/include/bitmaps/%B
    XMICONBMSEARCHPATH=/usr/dt/share/include/bitmaps/%B

    'man XmGetPixmapByDepth' for more details on specifying
    other patterns, if necessary.

    ==> Ken Scoggins

     
  • Nobody/Anonymous

    Logged In: NO

    BTW, XmtAskForBoolean isn't the only call affected by this.
    Any of the "AskFor" calls that cause a popup window with the
    standard question mark, exclamation mark, etc., icons on the
    popup.

    And technically, this *IS* and Xmt bug!!! The source code
    assumes the pixmap is found and uses the returned value,
    causing the crash. It should check to see if the value equals
    XmUNSPECIFIED_PIXMAP prior to using it, print an error msg
    if it does, and simply not display an icon on the popup.

    For example, the following change should be made
    to "AskForBool.c" line 391:

    icon_pixmap = GetPixmap(info->boolean_dialog,
    data.icon_type);
    if( icon_pixmap != XmUNSPECIFIED_PIXMAP ) {
    XtVaSetValues(info->boolean_internals.icon,
    XmtNpixmap, icon_pixmap,
    NULL);
    } else {
    /* print error/warning message. */
    }

    ==> Ken Scoggins

     
  • Nobody/Anonymous

    Logged In: NO

    BTW, XmtAskForBoolean isn't the only call affected by this.
    Any of the "AskFor" calls that cause a popup window with the
    standard question mark, exclamation mark, etc., icons on the
    popup.

    And technically, this *IS* and Xmt bug!!! The source code
    assumes the pixmap is found and uses the returned value,
    causing the crash. It should check to see if the value equals
    XmUNSPECIFIED_PIXMAP prior to using it, print an error msg
    if it does, and simply not display an icon on the popup.

    For example, the following change should be made
    to "AskForBool.c" line 391:

    icon_pixmap = GetPixmap(info->boolean_dialog,
    data.icon_type);
    if( icon_pixmap != XmUNSPECIFIED_PIXMAP ) {
    XtVaSetValues(info->boolean_internals.icon,
    XmtNpixmap, icon_pixmap,
    NULL);
    } else {
    /* print error/warning message. */
    }

    ==> Ken Scoggins

     

Log in to post a comment.