Giter Club home page Giter Club logo

Comments (1)

jcarius-nv avatar jcarius-nv commented on June 28, 2024 1

Hi @shelomentsev

thank you for reporting this issue and providing a set of patch file for reproducing the problem. I'm sorry it took a while to get back to you but at least here are good news:

I have applied your patches to the newest version of the PhysX SDK (to be updated here on Github soon) and I could not reproduce the issue anymore (*). In the meantime, we have independently discovered and fixed a problem that had most likely the same root cause: In Sc::Scene::islandGen the task dependencies were incorrectly configured. They should be processNarrowPhaseTouchEventsStage2(&mUpdateDynamics); instead of processNarrowPhaseTouchEventsStage2(&mPostSolver);, i.e., the updateDynamics task (which runs the solver) needs to wait for processing the touch events, otherwise the solver writes the post-solve velocities into the bodies while the contact callbacks are still extracting information from the same location. You can apply this hotfix to the code right now and then upgrade to the new release once it's out.

(*) Meaning the printouts from your __CheckContacts function never appear. Note that your mutex-based detector is not quite correct and kept showing up false positives for me because for multiple islands, there may be multiple concurrent instances of the PxsSolverStartTask which operate on independent data. The tryLock() check kept triggering for me with multiple threads being in PxsSolverStartTask. Instead, I used an improved check where I redefined the mutex variable as a counter volatile int __shapeInterationLock;. Then in InteractionNewTouchTask replacae the lock/unlock with PxAtomicIncrement(&mNphaseCore->getScene().getSimulationController()->__shapeInterationLock); and PxAtomicDecrement(&mNphaseCore->getScene().getSimulationController()->__shapeInterationLock);.

and instead of the tryLock() check in PxsSolverStartTask I only did
if(mContext.mSimulationController->__shapeInterationLock > 0) PxDebugBreak();

from physx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.