Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 61d24cf62ec1d423e0aee6d4eb17fb86f11252e2
Ticket: 218786ffffffffffffffffffffffffffffffffff
Bug in DDE 1.0 package found
User & Date: nobody on 2000-10-26 01:05:20
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2124 Bug
    Version: 8.1
    SubmitDate: '1999-05-24'
    LastModified: '1999-07-01'
    Severity: MED
    Status: Released
    Submitter: pat
    ChangedBy: foster
    OS: Windows 95
    OSVersion: NA
    Machine: NA
    FixedDate: '1999-05-28'
    FixedInVersion: 8.2b1
    ClosedDate: '2000-10-25'
    
    
    Name:  Peter Hardie
    email:  [email protected]
    Support:  None
    Severity:  3
    OperatingSystem:  Windows 95
    Extensions:  DDE 1.0
    CustomShell:  Other than my fixes to DDE 1.0 the code is the distribution version.
    Synopsis:  Bug in DDE 1.0 package found
    
    ReproducibleScript:
        I reported the bug previously in comp.lang.tcl as a followup to another
        bug report of bizarre behaviour in the DDE V1.0 package. In the example
        I posted, my script was attempting to talk to Mirc, but the first such
        message always caused netscape to be executed instead. However, now that
        I know the cause of the problem it is clear that my example script will
        not necessarily produce the same behaviour on another system because the
        bug depends upon some things in the machine that are external to TCL/Tk.
        I have included a short code segment showing the fix (I do not have
        access to diff - sorry).
    
    DesiredBehavior:
        The problem is that Tcl_DdeObjCmd in TclWinDde.c is using the
        ddeInstance variable before it has been initialized by calling the
        Initialize() function.
        See the code below. My fix may not be the most effective way to solve
        the problem but it definitely does work.
    
    Patch:
    In the Tcl_DdeObjCmd function in TclWinDde.c add the two calls to Initialize() as shown below: 
    
       if (length == 0) {
       serviceName = NULL;
       }
       else
       if (index != DDE_SERVERNAME) {
    // *******************
    // This call to Initialize() is essential so that ddeInstance is defined the
    // first time through this routine.
          Initialize();
          ddeService = DdeCreateStringHandle(ddeInstance,serviceName,CP_WINANSI);
          }
    
       if ((index != DDE_SERVERNAME) &&(index != DDE_EVAL)) {
       topicName = Tcl_GetStringFromObj(objv[firstArg + 1], &length);
          if (length == 0) {
          topicName = NULL;
          } else {
    // ***************************
    // Must also call Initialize here too.
          Initialize();
          ddeTopic = DdeCreateStringHandle(ddeInstance,topicName, CP_WINANSI);
          }
       }
    
    Comments:
        There are several other bugs in the code, but this is by far the most
        serious.
        I have also added a "dde poke" command to my version of dde 1.0 and once
        I have tidied it up and squashed the other bugs, I will submit it (using
        diff once I find it).
    
    
    
    A call to Initialize has been added at the beginning of the block.
    05/28/1999 15:53 - stanton -
    
  4. foundin changed to: "obsolete: 8.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Bug in DDE 1.0 package found"
  11. type changed to: "Bug"