Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by aitzolmuelas » Tue Aug 18, 2015 11:02 am
There is a bug in platforms where the default stack size is not large enough: worker threads are OK, but the dgWorld is itself a dgMutexThread which is constructed thusly:
- Code: Select all
dgMutexThread::dgMutexThread(const char* const name, dgInt32 id)
:dgThread(name, id)
,m_isBusy(0)
,m_myMutex()
,m_callerMutex()
{
Init ( );
}
Since no value is passed to Init() it uses 0, and the stack is inited at the default system size. I was having crashes with this since I added dynamic rigidbodies to a scene: the dgWorld thread does not seem to do a lot of stack use unless there is a dynamic phase update. I set it to 1MiB locally
- Code: Select all
dgMutexThread::dgMutexThread(const char* const name, dgInt32 id)
:dgThread(name, id)
,m_isBusy(0)
,m_myMutex()
,m_callerMutex()
{
Init ( 1024 * 1024 );
}
but then again this may not be an appropriate value (but it cannot be left to default)
-
aitzolmuelas
-
- Posts: 78
- Joined: Wed Mar 25, 2015 1:10 pm
by aitzolmuelas » Tue Aug 18, 2015 11:03 am
As a clarification, setting it to 1MiB fixed the problem, but I am not too sure if it's too much or maybe not enough under certain cases (I just chose the default windows stack size, if I am not mistaken)
-
aitzolmuelas
-
- Posts: 78
- Joined: Wed Mar 25, 2015 1:10 pm
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 5 guests