B3 genre kit hangs on exit
by deepscratch · in Torque 3D Professional · 06/24/2009 (4:48 pm) · 66 replies
bug?
About the author
email me at medan121@gmail.com
Recent Threads
#62
07/16/2009 (2:00 pm)
This is what you get when it deadlocks. Note it was showing 8 threads before so all of those threads are being created then cleaned up.> pytgea.pyd!Semaphore::acquire(bool block=true) Line 46 C++ pytgea.pyd!Thread::join() Line 126 C++ pytgea.pyd!ThreadPool::shutdown() Line 369 C++ pytgea.pyd!ThreadPool::~ThreadPool() Line 346 C++ pytgea.pyd!SFXInternal::`dynamic atexit destructor for 'gStreamThreadPool''() + 0x13 bytes C++ pytgea.pyd!_CRT_INIT(void * hDllHandle=0x02a6f2ac, unsigned long dwReason=44492344, void * lpreserved=0x02a6e638) Line 449 C pytgea.pyd!__DllMainCRTStartup(void * hDllHandle=0x02ac0000, unsigned long dwReason=0, void * lpreserved=0x00000000) Line 560 + 0x8 bytes C pytgea.pyd!_DllMainCRTStartup(void * hDllHandle=0x02ac0000, unsigned long dwReason=0, void * lpreserved=0x00000001) Line 510 + 0xe bytes C ntdll.dll!77aefcc0() ntdll.dll!77b09e5b() ntdll.dll!77b09e3c() kernel32.dll!761087e4() msvcr71.dll!7c348d04() msvcr71.dll!7c3476c9() msvcr71.dll!7c348d11() python.exe!1d0011b9() kernel32.dll!7617e4a5() ntdll.dll!77b3cfed() ntdll.dll!77b3d1ff()
#63
Am I understanding you correctly that at the time ThreadPool::shutdown() is entered, only the main thread is left? If so, it should not do any Thread::join()s. If it does, it looks like the worker threads have been killed off before without getting a chance to clean up.
You could set a breakpoint in the if-conditional "if( checkForStop() )" in ThreadPool::WorkerThread::run() and see if and where that triggers. This should lead to the semaphore being released.
ATM, I can't think of how the semaphore should lead to a race condition but that's not meaning much. There's been some changes for B4 but nothing crosses my mind that could tie into this (except the aforementioned deadlock with Platform::forceShutdown).
07/16/2009 (2:18 pm)
Am I understanding you correctly that at the time ThreadPool::shutdown() is entered, only the main thread is left? If so, it should not do any Thread::join()s. If it does, it looks like the worker threads have been killed off before without getting a chance to clean up.
You could set a breakpoint in the if-conditional "if( checkForStop() )" in ThreadPool::WorkerThread::run() and see if and where that triggers. This should lead to the semaphore being released.
ATM, I can't think of how the semaphore should lead to a race condition but that's not meaning much. There's been some changes for B4 but nothing crosses my mind that could tie into this (except the aforementioned deadlock with Platform::forceShutdown).
#64
Yes, you need to do a build. In your project directory, there's a "generateProjects.bat" file. Run this and then open the solution file in "buildFiles/Visual Studio 2008/" and do a build. This should solve the problem.
I just tried this and no changes. still freezes and no sound.
is there something I am missing in how to recompile.
07/16/2009 (7:31 pm)
RE //FIXME Yes, you need to do a build. In your project directory, there's a "generateProjects.bat" file. Run this and then open the solution file in "buildFiles/Visual Studio 2008/" and do a build. This should solve the problem.
I just tried this and no changes. still freezes and no sound.
is there something I am missing in how to recompile.
#65
Hmm, if you applied the code change, run the batch file, and then compiled your project, it should work. Are you running the correct executable? The project will come out in debug build by default, so you have to run <projectName>_DEBUG.exe rather than r<yourProjectName>.exe.
B4 is round the corner, though.
07/16/2009 (11:24 pm)
@DonaldHmm, if you applied the code change, run the batch file, and then compiled your project, it should work. Are you running the correct executable? The project will come out in debug build by default, so you have to run <projectName>_DEBUG.exe rather than r<yourProjectName>.exe.
B4 is round the corner, though.
#66
05/10/2010 (2:21 pm)
how can i fix this problem if I have the binary version of T3d 1.0.1 ?
Torque 3D Owner Joshua Halls (Xerves)
Only thread is [5304] Main Thread at that point.