HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1771 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 1771.


Report 1771 Actions


    Problem Report Number 1771
    Submitter's Classification Specification problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0217
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1998-01-20 08:00
    Product Standard Window System Application Interface V2
    Certification Program The Open Brand certification program
    Test Suite VSW version 5.0.0
    Test Identification Xt11/tcstfset 11
    Specification Window Management (X11R5): X Toolkit Intrinsics
    Location in Spec See Problem Text
    Problem Summary PIN4W.00020 This test may fail because the spec is ambiguous about what happens if a bad font name is specified.
    Problem Text
    The X Toolket Intrinsics does not specify what
    return value XtCvtStringToFontSet returns if the font name
    is not found. The sample implementation X11 R6.3
    uses the default font "-*-*-*-R-*-*-*-120-*-*-*-*"
    and returns True.
    See Converters.c:XtCvtStringToFontSet
    This can be seen with the gdb trace below
    Please note the statement:
    1035 return False;
    is not called; gdb has problems with define over more than one line
    in fact it returns True; see line 119 below

    --- gdb trace ---
    $ gdb testprog
    GDB is free software and you are welcome to distribute copies of it
    under certain conditions; type "show copying" to see the conditions.
    There is absolutely no warranty for GDB; type "show warranty" for details.
    GDB 4.13 (mips-sni-sysv4), Copyright 1994 Free Software Foundation, Inc...
    (gdb) b main
    Breakpoint 1 at 0x4009c4: file testprog.c, line 85.
    (gdb) r
    Starting program: /home/shu/PROB/Branding/test13/testprog

    Breakpoint 1, main (argc=1, argv=0x7ffefb5c) at testprog.c:85
    85 toplevel = XtVaAppInitialize(&app, "Time",
    (gdb) b XtCvtStringToFontSet
    Breakpoint 2 at 0x83d821c: file Converters.c, line 951.
    (gdb) c
    Continuing.

    Breakpoint 2, XtCvtStringToFontSet (dpy=0x44aad0, args=0x440d98, num_args=0x440d
    74,
    fromVal=0x440d90, toVal=0x440d88, closure_ret=0x0) at Converters.c:951
    Source file is more recent than executable.
    951 if (*num_args != 2) {
    (gdb) n
    959 display = *(Display**)args[0].addr;
    (gdb) n
    961 if (CompareISOLatin1((String)fromVal->addr, XtDefaultFontSet) != 0)
    {
    (gdb) n
    962 f = XCreateFontSet(display, (char *)fromVal->addr,
    (gdb) n
    965 if (missing_charset_count) {
    (gdb) n
    966 XtAppWarningMsg(XtDisplayToApplicationContext(dpy),
    (gdb) n
    Warning: Missing charsets in String to FontSet conversion
    970 XFreeStringList(missing_charset_list);
    (gdb) n
    972 if (f != NULL) {
    (gdb) n
    975 XtDisplayStringConversionWarning(dpy, (char *)fromVal->addr, XtRFo
    ntSet);
    (gdb) n
    Warning: Cannot convert string "-1" to type FontSet
    985 xrm_name[0] = XrmPermStringToQuark ("xtDefaultFontSet");
    (gdb) n
    986 xrm_name[1] = 0;
    (gdb) n
    987 xrm_class[0] = XrmPermStringToQuark ("XtDefaultFontSet");
    (gdb) n
    988 xrm_class[1] = 0;
    (gdb) n
    989 if (XrmQGetResource(XtDatabase(display), xrm_name, xrm_class,
    (gdb) n
    1017 f = XCreateFontSet(display, "-*-*-*-R-*-*-*-120-*-*-*-*",
    (gdb) n
    1020 if (missing_charset_count) {
    (gdb) n
    1027 if (f != NULL)
    (gdb) n
    1028 goto Done;
    (gdb) n
    973 Done: done( XFontSet, f );
    (gdb) n
    0x83d8704 1035 return False;
    (gdb) n
    main (argc=1, argv=0x7ffefb5c) at testprog.c:119
    119 (void) printf("status = %d \n",status);
    (gdb) n
    status = 1

    Test Output
    SECTION: Xt11

    TEST CASE: XtCvtStringToFontSet

    TEST PURPOSE #11
    Assertion XtCvtStringToFontSet-11.(C)
    If the implementation is X11R5 or later: A call to Boolean
    XtCvtStringToFontSet(display, args, num_args, from, to,
    converter_data) when the conversion is not performed due to
    an improper value specified in from shall issue a warning
    message and return False.
    PREP: Initialize toolkit, Open display and Create topLevel root widget
    PREP: Create windows for widgets and map them
    PREP: Get display
    PREP: Set up required conversion args
    TEST: Check conversion fails
    ERROR: Expected XtCvtStringToFontSet return value of 0, Received 1
    TEST: Warning handler is called
    FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    A permanent interpretation is recommended.

    The spec should be modified to reflect the proper behavior when a
    bad font name is specified. Returning a default font appears to
    be the current behavior. We recommend this go out for review.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    This is being sent for a 14 day review.

    Review Type Expert Group Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    The review group response was that they agreed with the
    consultant and a Permanent Interpretation should be
    granted.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Permanent Interpretation (PIN)
    Review Conclusion
    A Permanent Interpretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority