.
D 2001-07-10T03:54:20
J assignee nobody
J cmimetype text/plain
J comment WinNT-5.\n\nEmbedding\sTcl\sinto\sa\swindows\sGUI\sapplication\shas\sa\s\nproblem\swith\sTcl_Exit().\s\sTcl_Finalize()\sis\scalled\s\ntwice.\s\sOnce\sin\sTcl_Exit()\sand\sa\ssecond\stime\sduring\s\nthe\sunloading\sof\stcl84.dll\sfrom\sits\sDllMain().\s\sIn\sthe\s\nsecond\scall\sto\sTcl_Finalize(),\sTclpInitLock()\stries\sto\s\nadd\sa\snew\ssyncobject\sto\skeyRecord.list[],\sbut\sthe\s\nallocation\sof\sthat\sonce\svalid\smemory\slocation\shas\s\ndisappeared\scausing\sthe\s"Invalid\smemory\saccess"\s\ndialogbox\sof\sdeath\sto\spopup.\n\nI\sdon't\shave\sa\sclear\ssolution\sto\sthis\sproblem\sat\sthis\s\ntime.\s\sI\swould\sprefer\sa\sdifferent\scodepath\sfor\smy\sown\s\nexit,\sbut\sI\sdon't\ssee\sa\sdirect\sway\sof\ssetting\sone,\s\nlike\show\syou\scan\sset\san\sapp-specific\sTcl_PanicProc.\s\sA\s\nTcl_SetExitProc()\swould\sbe\sa\shandy\sAPI\sto\sadd.\s\sI\s\nwould\suse\sit!\s\sI\sknow\sfor\sa\sfact,\sif\sI\scan\spost\sa\s\nWM_CLOSE\sto\sthe\sGUI,\severything\scomes\sdown\sfine.\s\sI\s\nwould\sprefer\snot\sto\suse\sExitProccess()\s[that's\swhat\s\nexit()\sfrom\smsvcrt\sis\sdoing\son\sthe\sinside,\sbtw].\n\nI\sguess\sI\scould\swrite\san\sextension\scommand\sfor\s\n[exit]...\s\sIs\sit\sa\svalid\sconcern\sabout\sit\sgetting\sit\s\nrename'd\sat\sthe\sTcl\slevel\sand\sbreak\swhat\sI'm\strying\sto\s\nfix?\n\nint\nMyExit(ClientData\sc,\sTcl_Interp\s*i,\sint\sobj\sc....)\n{\n\s\s\s\sPostMessage(mainHWnd,\sWM_CLOSE,\s0,\s0);\n\s\s\s\sreturn\sTCL_OK;\n}\nTcl_CreateObjCommand(interp,\s"::exit",\sMyExit,\s0L,\s0L);\n\nWill\sthat\swork\sOk\sor\sdo\sparts\sof\sthe\score\scall\sTcl_Exit\n()\sdirectly?\s\sI\smust\sbe\sable\sto\shave\sthe\scurrent\s\ninterpreter\sexecution\sunwind\sfully\sso\sI\scan\sdelete\s\nthat\sinterpreter,\sbut\sto\sdo\sit,\sI'll\shave\sto\shave\s\n[exit]\sreturn\sto\sunwind\sthe\scurrent\sTcl_Eval().
J foundin obsolete:\s8.4a3
J priority 5\sMedium
J resolution None
J status Open
J submitter davygrvy
J subsystem 50.\sEmbedding\sSupport
J title RememberSyncObject()\sloses\sthe\sheap
J type Bug
K 439941ffffffffffffffffffffffffffffffffff
U davygrvy
Z 4947c7502b6dff99e828a7609efdcba9