After migrating to 3.4 without changing anything else I now get an infinite loop randomly inside fetch results. All threads are waiting but one is stuck in a loop here inside BPBroadphaseSap.cpp starting on line 1490
// Max is moving left:
do
{
BpHandle CurrentData = BaseEPDatas[CurrentIndex];
const BpHandle IsMax = isMax(CurrentData);
#if PERFORM_COMPARISONS
if(!IsMax)
{
// Our max passed a min => stop overlap
const BpHandle ownerId=getOwner(CurrentData);
#if 1
if(
#if BP_SAP_USE_OVERLAP_TEST_ON_REMOVES
Intersect2D_Handle(boxMinMax0[handle].mMinMax[0], boxMinMax0[handle].mMinMax[1], boxMinMax1[handle].mMinMax[0], boxMinMax1[handle].mMinMax[1],
boxMinMax0[ownerId].mMinMax[0],boxMinMax0[ownerId].mMinMax[1],boxMinMax1[ownerId].mMinMax[0],boxMinMax1[ownerId].mMinMax[1])
#endif
#if BP_SAP_TEST_GROUP_ID_CREATEUPDATE
&& (group!=asapBoxGroupIds[ownerId])
#else
&& Object!=id1
#endif
)
#endif
{
if(numPairs==maxNumPairs)
{
const PxU32 newMaxNumPairs=maxNumPairs*2;
pairs = reinterpret_cast<BroadPhasePair*>(resizeBroadPhasePairArray(maxNumPairs, newMaxNumPairs, mScratchAllocator, pairs));
maxNumPairs=newMaxNumPairs;
}
PX_ASSERT(numPairs<maxNumPairs);
pairs[numPairs].mVolA=BpHandle(PxMin(handle, ownerId));
pairs[numPairs].mVolB=BpHandle(PxMax(handle, ownerId));
numPairs++;
//RemovePair(handle, getOwner(*CurrentMaxData), mPairs, mData, mDataSize, mDataCapacity);
}
}
#endif
startIndex--;
CurrentIndex = mListPrev[CurrentIndex];
CurrentValue = BaseEPValues[CurrentIndex];
}
while(ThisValue < CurrentValue);
It only happens in release builds so I can’t really dig into it much. If anyone with more knowledge of PhysX has any idea why or what could be causing it I would appreciate any insight.
Thanks,
David