Artifacts Associated With Ticket 648022ffffffffff
Ticket change [5459af51c2] (rid 93934) by speedboat on 2002-12-03 20:36:07:
- assignee initialized to: "kennykb"
- cmimetype initialized to: "text/plain"
- comment initialized 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.
- foundin initialized to: "obsolete: 8.4.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "speedboat"
- subsystem initialized to: "28. dde Package"
- title initialized to: "Dde package crashing under Windows 98"
- type initialized to: "Bug"
Ticket change [80d103c563] (rid 116938) by speedboat on 2002-12-04 03:36:08:
- icomment:
File Added - 36754: tclWinDde.c
- login: "speedboat"
- mimetype: "text/plain"
- username: "speedboat"
- icomment:
Add attachment "tclWinDde.c" [b9c0328d27] (rid 129211) by speedboat on 2002-12-04 03:36:08.
Ticket change [6c58a21d5b] (rid 128490) by kennykb on 2003-01-29 07:12:15:
- icomment:
Logged In: YES user_id=99768 Converted changes to a patch so that they can be applied more readily.
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Add attachment "tclWinDde.patch" [c5ed560e9c] (rid 121670) by kennykb on 2003-01-29 07:12:16.
Ticket change [b873e85f0f] (rid 128970) by kennykb on 2003-01-29 07:12:16:
- icomment:
File Added - 40905: tclWinDde.patch
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [2102991260] (rid 130509) by kennykb on 2003-02-02 00:26:11:
- icomment:
Logged In: YES user_id=99768 I'm using this bug as a place-holder for several apparent issues with handle mismanagement in tclWinDde.c. Observations so far with tracking data handles in DDESpy don't indicate obvious double-frees (which is NOT to say they aren't there!) but DO indicate that several tests leak handles, calling into question the whole approach to handle management. Tests in question are: winDde-1.1 - leaks one reference to "TclEval" winDde-2.1 - leaks one reference to "TclEval" and one to "self" winDde-2.3 - leaks one reference to "TclEval" and one to "self" winDde-4.1 - leaks one reference to "TclEval" winDde-4.2 - leaks one reference to "TclEval" winDde-4.3 - leaks one reference to "TclEval" winDde-4.4 - leaks one reference to "TclEval" In addition, I've observed, intemittently, a failure in winDde-4.2, "remote interpreter did not respond." DDESpy showed some corrupt data, but its output was lost and I haven't reproduced the problem since.
- login: "kennykb"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "kennykb"
- icomment:
Ticket change [be26fff836] (rid 102025) by kennykb on 2003-02-02 00:39:37:
- icomment:
Logged In: YES user_id=99768 The patch as submitted appears not to change the behavior where winDde.test leaks handles, for better or for worse. Precisely the same seven references to "TclEval" and two to "self" leak by the end of the test.
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [931b185de4] (rid 105758) by kennykb on 2003-03-22 06:58:08:
- assignee changed to: "patthoyts"
Ticket change [2f2e89bdca] (rid 147821) by dkf on 2016-07-10 08:10:13:
- closedate changed to: "2457579.84043471"
- closer changed to: "dkf"
- 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.
- icomment:
Win98 not supported any more; open a new bug if the problems are observable on a currently supported OS.
- login: "dkf"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Out of Date"
- severity changed to: "Minor"
- status changed to: "Closed"