About Store Forum Documentation Contact

Post Reply 
Need insight finding crash from World.Update, Physic.StopSimulate
Author Message
KrysleQuinsen Offline

Post: #1
Need insight finding crash from World.Update, Physic.StopSimulate
This may be a bit specified on my end but I'm having this rare dread crash for weeks and I can't seem to find what caused it. And the debugger always point to this physx::Cm::DelegateTask<class physx::Sc::Scene,&physx::Sc::Scene::unregisterInteractions which I'm not sure what it do.

Crash thread
>    Xecryst Remains.exe!physx::Cm::DelegateTask<class physx::Sc::Scene,&physx::Sc::Scene::unregisterInteractions(class physx::PxBaseTask *)>::runInternal(void)    C++
    Xecryst Remains.exe!physx::Cm::Task::run(void)    C++
    Xecryst Remains.exe!EE::CpuDispatcherClass::ProcessTask(class physx::PxBaseTask &,void *,int)    C++
    Xecryst Remains.exe!EE::SetThreadName(struct EE::Str8 const &,unsigned __int64)    C++
    Xecryst Remains.exe!EE::SetThreadName(struct EE::Str8 const &,unsigned __int64)    C++
    Xecryst Remains.exe!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97    C++
    kernel32.dll!00007ff8cc2e7034()    Unknown
    ntdll.dll!00007ff8ccc42651()    Unknown
Main Thread

    ntdll.dll!00007ff8ccc8cda4()    Unknown
    KernelBase.dll!00007ff8ca97165e()    Unknown
    Xecryst Remains.exe!physx::shdfnd::SyncImpl::wait(unsigned int)    C++
    Xecryst Remains.exe!physx::NpScene::fetchResults(bool,unsigned int *)    C++
    Xecryst Remains.exe!EE::PhysicsClass::stopSimulation(void)    C++
    Xecryst Remains.exe!EE::Game::WorldManager::update(struct EE::Vec2 const &)    C++
    Xecryst Remains.exe!EE::Game::WorldManager::update(const EE::Vec & pos) Line 197    C++
    Xecryst Remains.exe!GameUpdate() Line 180    C++
    Xecryst Remains.exe!EE::UpdateState(void)    C++
    Xecryst Remains.exe!EE::Application::update(void)    C++
    Xecryst Remains.exe!EE::Application::loop(void)    C++
    Xecryst Remains.exe!wWinMain()    C++

It is very rare but seems to happen when the Actor being removed?
I let the game ran for an hour, letting its AI attack each other and it might crash once, so I would like some insight into what can possibly cause this World.Update and Physic.stopSimulation so I can narrow it down.

Any insight would greatly be appreciated.
05-01-2021 10:11 AM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Bronze Supporter

Post: #2
RE: Need insight finding crash from World.Update, Physic.StopSimulate
not sure never had this issue but:
How are you deleting the actor might be the issue

for example you can see in the function

virtual Bool hit(ActorInfo &actor_info)=NULL; // you should override this method, it will receive information about the contacts, you should return false if you no longer want to check any more contacts, and true to continue checking, creating or deleting physical objects inside callbacks is forbidden, instead you should record information about contacts, and perform operations on them outside of the callback, contacts are not listed in any specific order

you are not allowed to delete physical objects inside those callbacks.
way to go around this is to get a flt health, do your health -= hit;
update the NPC after the world.update to check for health<= 0, then delete
(This post was last modified: 05-02-2021 12:24 AM by RedcrowProd.)
05-02-2021 12:23 AM
Find all posts by this user Quote this message in a reply
KrysleQuinsen Offline

Post: #3
RE: Need insight finding crash from World.Update, Physic.StopSimulate
Not sure if the Actor from the attack detector counts (I used both Actor and Shape as a detector with custom PhysCutsCallback called via Physics.cuts and Physics.sweep) but I'll put some delay delete and extra check to make sure it won't get deleted in that frame.

Will see if it improve.
(This post was last modified: 05-02-2021 07:03 AM by KrysleQuinsen.)
05-02-2021 07:00 AM
Find all posts by this user Quote this message in a reply
Post Reply