Skip to content
Tcl Source Code History Of Ticket 733911ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 733911ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 733911ffffffffffffffffffffffffffffffffff

  1. Ticket change [e12c99c610] (rid 87404) by nobody on 2003-05-07 14:33:45:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Hi,
      
      there is a bug in tkCanvPoly.c:PolygonToPostscript in 
      recent Tk Versions (tested 8.3.5, 8.4.2).
      
      
      Create a polygon with two identical points and no
      outline color (I know this seems to be nonsense,
      but in my case it was absolutely needed).
      Do a postscript command on the canvas and you get the
      core dump (a color
      NULL pointer is passed on from PolygonToPostscript to
      Tk_PostscriptColor, where it is referenced)
      
      
      15:09[wilm@rubin:ConStruct3]$ wish
      .wishrc .wishrc .wishrc ...
      % canvas .c
      .c
      % pack .c
      % .c create polygon 10 20 10 20
      1
      % .c postscript
      Segmentation fault
      
      
      
      
      Setting the outline sets the color pointer to non-NULL:
      
      15:41[wilm@rubin:ConStruct3]$  wish
      .wishrc .wishrc .wishrc ...
      %  canvas .c
      .c
      % pack .c
      % .c create polygon 10 20 10 20 -outline black
      1
      % .c postscript
      %!PS-Adobe-3.0 EPSF-3.0
      ...
      
      
      
      To avoid this create a polygon with 3 points (using two
      different points
      activates expansion to three points and cirumvents the
      faulty if-clause as well):
      
      16:04[wilm@rubin:ConStruct3]$ wish
      .wishrc .wishrc .wishrc ...
      % canvas .c
      .c
      % pack .c
      % .c create polygon 10 20 10 20 10 20 
      1
      % .c postscript
      %!PS-Adobe-3.0 EPSF-3.0
      ...
      
      
      The reason for this bu is the following:
      If only two points exist, special case code is used to
      create a line and the color
      is not verfified to be valid.
      
      To patch this just check if color==NULL in case
      polyPtr->numPoints==2 and return TCL_OK
      See attachment.
      
      Andreas
      
    4. foundin initialized to: "final: 8.3.5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "18. Commands M-Z"
    10. title initialized to:
      canvas postscript command core dumps on special polygon
      
    11. type initialized to: "Bug"
  2. Add attachment "tkCanvPoly.diff" [9c8e39187b] (rid 96163) by nobody on 2003-05-07 21:33:46.

  3. Ticket change [4512b7d24f] (rid 116820) by nobody on 2003-05-07 21:33:46:

    1. icomment:
      
      
      File Added - 49795: tkCanvPoly.diff
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  4. Ticket change [f9cd56f4d7] (rid 91760) by dkf on 2003-05-07 21:50:26:

    1. status changed to: "Closed"
  5. Ticket change [8277c40b5f] (rid 117241) by dkf on 2003-05-07 21:50:27:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      While serious, this is not a bug in Tcl.  Please resubmit to
      the tktoolkit project.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. resolution changed to: "Invalid"
    5. username: "dkf"
  6. Ticket change [a2a5e15096] (rid 109933) by dkf on 2003-05-07 21:50:28:

    1. closedate changed to: "2003-05-07T14:50:28"
    2. closer changed to: "dkf"