Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2f2e89bdcae37e8d61aae2c7825dec7766b565de
Ticket: 648022ffffffffffffffffffffffffffffffffff
Dde package crashing under Windows 98
User & Date: dkf on 2016-07-10 08:10:13
Changes

  1. closedate changed to: "2457579.84043471"
  2. closer changed to: "dkf"
  3. comment changed to:
    I use tcldde12.dll to implement Drag-n-Drop (thru send 
    command emulation) within our medical imaging 
    software. Under Windows 98, the originating half of the 
    process often (not always) crashes.
    
    I believe I have tracked this down to a possible improper 
    use of DdeCreateDataHandle(), DdeClientTransaction() 
    and DdeFreeDataHandle() in the tclWinDde.c file within 
    the tcl8.4.1 win directory.
    
    While my experience with these functions is limited to 
    this implementation and the online MSDN documents, it 
    is my interpretation that a data handle created with 
    DdeCreateDataHandle() can be used for "read only", 
    once it has been successfully passed to a client using 
    the DdeClientTransaction(). I believe that the use of 
    DdeFreeDataHandle() violates this "read only" usage 
    restriction.
    
    My workaround to this problem is to set the 
    ddeItemData variable to NULL when a successful 
    DdeClientTransaction() occurs (two places). This 
    prevents the DdeFreeDataHandle(ddeItemData) line in 
    the cleanup section of the code from crashing.
    
    I've marked the addional lines in the attached code with 
    my initials, AGL. I would hope that someone with a 
    better understanding of the Dde calls might take a look. 
    Maybe I've misinterpreted the Dde documentation and 
    just created a memory leak, but if so, I need a new 
    solution which prevents the crashes. 
    
    Thanks for your time.
    
  4. icomment:
    Win98 not supported any more; open a new bug if the problems are observable on a currently supported OS.
    
  5. login: "dkf"
  6. mimetype: "text/x-fossil-wiki"
  7. resolution changed to: "Out of Date"
  8. severity changed to: "Minor"
  9. status changed to: "Closed"