 
  Sun, 09/28/2014 - 21:00
Hello,
i have converted my project to OCC 6.7.1. It has worked well with OCC 6.5.5
Now i have a crash if my program is closed.
Here is the Call Stack:
>	TKDraw.dll!Tcl_ExternalToUtfDString(Tcl_Encoding_ * encoding, const char * src, int srcLen, Tcl_DString * dstPtr)  Line 1128 + 0xd bytes	C
 	TKDraw.dll!TclpFindVariable(const char * name, int * lengthPtr)  Line 677 + 0x17 bytes	C
 	TKDraw.dll!TclGetEnv(const char * name, Tcl_DString * valuePtr)  Line 479 + 0x12 bytes	C
 	TKDraw.dll!TclFullFinalizationRequested()  Line 733 + 0x11 bytes	C
 	TKDraw.dll!Tcl_Exit(int status)  Line 957 + 0x5 bytes	C
 	TKDraw.dll!Draw_Interpretor::Destroy()  Line 643 + 0x7 bytes	C++
 	TKDraw.dll!Draw_Interpretor::~Draw_Interpretor()  Line 125 + 0xa bytes	C++
 	TKDraw.dll!`dynamic atexit destructor for 'theCommands''()  + 0x21 bytes	C++
 	TKDraw.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 415	C
 	TKDraw.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 526 + 0x13 bytes	C
 	TKDraw.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 477	C
encoding and systemEncoding are NULL. src is "ADVISOR_XE_2013_DIR=C:\Program Files (x86)\Intel\Advisor XE 2013\"
I have tried different Tcl versions and i have compiled Tcl by my own. But there is always the same crash.
It crashes in release and debug mode.
How can i avoid this crash?
I am using windows 7 64-bit + VS2010.
Thanks in advance
 
        
Tue, 01/13/2015 - 15:03
Exactly the same problem here.. did you succeed in finding something?
Win7 64bit VS2008
thanks
Daniel
Mon, 02/09/2015 - 11:01
Same problem exists in OCC 6.8 also
Fri, 08/14/2015 - 10:22
Has anybody found a solution yet?
Thanks
Sat, 07/02/2016 - 20:52
Has anybody found a solution for this problem? I am facing the same problem with OCCT 7.0.0. before upgrade to the new version everything worked fine with OCCT 6.9.0.
Thanks,
Joachim
Mon, 07/04/2016 - 18:24
The problem is solved when I compile OCCT 7.0.0. by using tcl 8.5!
Wed, 03/04/2020 - 11:12
I have changed Tcl_Exit(0) to Tcl_Finalize() in 552 line of Draw_Interpretor.cxx and it resolved the problem.
Wed, 03/04/2020 - 11:55
From 5 years old attempt to replace Tcl_Exit() with Tcl_Finalize():
> It does not look like a patch fixes the problem - the application still crashes somewhere in tcl.dll at exit (can be seen only with attached debugger),
> thus it just postpones the place/time when the problem occurs.
Don't know if this is the same in your case / has been improved with newer version of Tcl.
Fri, 06/26/2020 - 10:40
I replaced Tcl_Exit() with Tcl_Finalize(),but it doesn't work,Is there any way to solve it
Wed, 03/04/2020 - 12:03
I have OCCT 7.4.0 and Tcl 8.6. This solution has resolved my problem with the crashes. Debugger doesn't show it any more.
Wed, 03/04/2020 - 12:07
I remember when I compiled OCCT without the DRAW module I had similar problem somewhere else but with the module it's been resolved.
Tue, 04/14/2020 - 06:28
1、replace Tcl_Exit(0) with Tcl_Finalize() in Draw_Interpretor.cxx line 551
2、ignore tcl86.dll exception in visual studio ide
Wed, 12/06/2023 - 11:17
OCCT 7.4.0 with Tcl 8.6 here, and the problem persisted even by using Tcl_Finalize() all over.
I finally found a definitive fix by replacing the OCCT third party tcl/tk with IronTcl