<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13321" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-12-03T04:40:54+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13321</id>

		<entry>
		<author><name><![CDATA[somboon]]></name></author>
		<updated>2021-12-03T04:40:54+00:00</updated>

		<published>2021-12-03T04:40:54+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43747#p43747</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43747#p43747"/>
		<title type="html"><![CDATA[Re: using 'setInternalGhostPairCallback' cause bullet to crash in multi thread mode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43747#p43747"><![CDATA[
I have tried using bullet version 3.17 (compile with multithreaded OpenMP/PPL/win32) and the result are the same.<br>It work as long as I dont use ghostpaircallback.<br>But when I registered the callback, It alway crashed in releaseManifold Function even when no ghost object are add to dynamic world.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=10253">somboon</a> — Fri Dec 03, 2021 4:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[somboon]]></name></author>
		<updated>2021-11-22T07:08:55+00:00</updated>

		<published>2021-11-22T07:08:55+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43715#p43715</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43715#p43715"/>
		<title type="html"><![CDATA[using 'setInternalGhostPairCallback' cause bullet to crash in multi thread mode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43715#p43715"><![CDATA[
I've tried using bullet in multi thread mode (using exactly the same initialize sequence suggest in the topic).<br><br>It work great with almost 2x performance boost.<br><br>but since my program required use of character controller and ghost object,I have to call setInternalGhostPairCallback.<br><br>this cause bullet to crash with access violation. in function <br><div class="codebox"><p>Code: </p><pre><code>void btCollisionDispatcherMt::releaseManifold(btPersistentManifold* manifold){clearManifold(manifold);//btAssert( !btThreadsAreRunning() );if (!m_batchUpdating){// batch updater will update manifold pointers array after finishing, so// only need to update array when not batch-updatingint findIndex = manifold-&gt;m_index1a;btAssert(findIndex &lt; m_manifoldsPtr.size());m_manifoldsPtr.swap(findIndex, m_manifoldsPtr.size() - 1);m_manifoldsPtr[findIndex]-&gt;m_index1a = findIndex;m_manifoldsPtr.pop_back();}manifold-&gt;~btPersistentManifold();if (m_persistentManifoldPoolAllocator-&gt;validPtr(manifold)){m_persistentManifoldPoolAllocator-&gt;freeMemory(manifold);}else{btAlignedFree(manifold);}</code></pre></div>Remove the setInternalGhostPairCallback stop the crashed but make character fall throught the ground since it need ghost object.<br><br>The Bullet I am using is version 2.89 compile with BT_THREADSAFE.<br>Character controller used are the reference one included with the source of 2.89<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=10253">somboon</a> — Mon Nov 22, 2021 7:08 am</p><hr />
]]></content>
	</entry>
	</feed>
