Menu

#2438 disable send -> X error on exit

obsolete: 8.5.2
closed-duplicate
5
2008-04-11
2008-04-09
Don Porter
No

dgp Has something changed from Tk 8.4 -> Tk 8.5 when the [send] command is deleted?
dgp I have a "big wish" program.
dgp When I build it with Tcl/Tk 8.4.18, I can [rename send {}], and things work fine
dgp When I build with core-8-5-branch, and enter [rename send {}; exit] at the interactive prompt, I get an X error....

dgp $ ./omfsh
X Error of failed request: RenderBadPicture (invalid Picture parameter)
Major opcode of failed request: 155 (RENDER)
Minor opcode of failed request: 7 (RenderFreePicture)
Picture id in failed request: 0x260003f
Serial number of failed request: 1525
Current serial number in output stream: 1582
dgp look familiar to any Tk experts?

Discussion

  • Don Porter

    Don Porter - 2008-04-09

    Logged In: YES
    user_id=80530
    Originator: YES

    This appears to be the same issue:

    http://objectmix.com/tcl/250971-bug-8-5b1.html

     
  • Don Porter

    Don Porter - 2008-04-09

    Logged In: YES
    user_id=80530
    Originator: YES

    Haven't fully tracked it down yet, but
    the saga of 1712081 is involved somehow.

     
  • Don Porter

    Don Porter - 2008-04-10
    • labels: 318677 --> 318689
    • assigned_to: caflick --> kennykb
     
  • Don Porter

    Don Porter - 2008-04-10

    Logged In: YES
    user_id=80530
    Originator: YES

    Ok, now I think 1712081 has nothing to
    do with it, so withdraw that claim first.

    The trouble first arises with
    Kevin Kenny's 2006-11-27 commit to
    unix/configure(.in).

    All that change really does, though, is
    to change from a --disable-xft default
    build to a --enable-xft default build
    in my current test environment.

    Sure enough if I force a --disable-xft
    build of Tk 8.5-HEAD, and use that, the
    problem goes away.

     
  • Kevin B KENNY

    Kevin B KENNY - 2008-04-11

    Logged In: YES
    user_id=99768
    Originator: NO

    While I committed the change that makes --enable-xft the default, that was on the basis of (a) it's now nearly-universal in Linux distros, and (b) Tk looks like hell without it. Beyond those two factoids, I'm extremely ignorant of what goes on inside. (If it were the *non*-Xft build failing, I'd feel more competent to have a look.)

    Referring to someone who might have a clue how to approach debugging this.

     
  • Kevin B KENNY

    Kevin B KENNY - 2008-04-11
    • assigned_to: kennykb --> jenglish
     
  • Joe English

    Joe English - 2008-04-11

    Logged In: YES
    user_id=68433
    Originator: NO

    Duplicate of #1821174.

    Cause of the problem: Tk's teardown sequence sets tsdPtr->displayList to NULL before calling TkpCloseDisplay on each member of the list, so if any X errors occur during the final XSync(), ErrorProc is not able to dispatch them to the correct TkErrorHandler.

    The RenderBadPicture error is raised in response to XftDrawDestroy() when the Drawable associated with the XftDraw has been destroyed before the XftDraw itself is. This call (in FinishedWithFont, in tkUnixRFont.c) is bracketed by Tk_CreateErrorHandler / Tk_DeleteErrorHandler, so would not be a fatal error, except for the problem above.

    Removing the [send] command causes (among other things) an XSync() to occur; this normally occurs at a point in Tk's teardown sequence where it happens to mask the above two problems. If the application removes [send] itself earlier, this doesn't happen, and the problem manifests.

     
  • Don Porter

    Don Porter - 2008-04-11
    • labels: 318689 --> 67. Unix Window Operations
    • status: open --> closed-duplicate