Skip to content
Tcl Source Code History Of Ticket 218361
Login

History Of Ticket 218361

Artifacts Associated With Ticket 218361

  1. Ticket change [2e0cb49dce] (rid 119158) by nobody on 2000-10-26 00:56:42:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 4180 Bug
      Version: 8.3
      SubmitDate: '2000-02-15'
      LastModified: '2000-04-03'
      Severity: CRIT
      Status: Closed
      Submitter: techsupp
      ChangedBy: hobbs
      OS: BSD
      FixedDate: '2000-10-25'
      ClosedDate: '2000-04-03'
      
      
      Name:
      Petasis George
      
      ReproducibleScript:
      I have written this little function for converting between external->UTF:(Strdup duplicates a UTF-8 string...)
      
      char *ExternalToUtf(char *encoding, char *str) {
        Tcl_DString Text;
        Tcl_Encoding enc;
        char *result;
      
        //My_Interp is a global that contains a pointer to the only interp my app uses...
        //Tcl_ResetResult(My_Interp); //If you add this the abort is gone...
        enc = Tcl_GetEncoding(CDM_Interp, encoding);
        if (encoding == NULL) return NULL; // Tcl_GetEncoding has left an error...
        Tcl_DStringInit(&Text);
        result = Strdup(Tcl_ExternalToUtfDString(enc, str, -1, &Text));
        Tcl_DStringFree(&Text);
        Tcl_FreeEncoding(enc);
        return result;
      }
      
      If you set the system encoding (example) to cp1253 and you keep
      calling this function to convert strings to iso8859-7
      (like: ExternalToUtf("iso8859-7", "some-greek-string in iso8859-7 enc");)
      Then you will get an abort after a few iterations...
      
      ObservedBehavior:
      When calling Tcl_GetEncoding and Tcl_FreeEncoding many times (i.e. in a loop) and you
      always request the same encoding( but a different one than the system encoding), then
      wish crashes under windows with a message about Tcl_SetObjLength modifing a shared
      object. I think that one of these functions tries to modify the given interpreter without
      checking if its object is shared or not. If I put Tcl_ResetResult just before calling these
      functions, all work ok. This problem is much easier to reproduce it under windows than 
      unix...
      
      
      
      This look suspiciously like an app that doesn't have the
      Tcl_FindExecutable call that is necessary for 8.1+ apps
      that use encodings.  Is this the case?  We need to see the
      startup code to know more. 
      -- 04/03/2000 hobbs
      
    4. foundin initialized to: "obsolete: 8.3"
    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: "69. Other"
    10. title initialized to: "Tcl_GetEncoding modifing a shared object..."
    11. type initialized to: "Bug"
  2. Ticket change [f86580cd1d] (rid 91528) by welch on 2000-10-26 08:20:08:

    1. closedate changed to: "2000-10-26T01:20:08"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [ddc04ae6da] (rid 114727) by dgp on 2001-04-20 01:48:11:

    1. closedate changed to: "2001-04-19T18:48:11"
    2. closer changed to: "dgp"
    3. subsystem changed to: "10. Objects"