RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1k stars 175 forks source link

Heavy objects floating in water can cause RoR to crash #2814

Open TheDude53 opened 2 years ago

TheDude53 commented 2 years ago

Steps to reproduce

  1. Open RoR
  2. Select a map with water (e.g. Simple Test Terrain Water)
  3. Spawn an M/V Nordia Express
  4. Using Ctrl+Period, spawn another one every 5 seconds
  5. RoR will eventually crash without a trace in RoR.log

Expected behavior

RoR shouldn't crash. If it must, it should give a reason.

Actual behavior

RoR crashed and RoR.log did not provide any reason (as shown below)

System configuration

OS: Windows 10 21H1 64bit Renderer used: DirectX 9 CPU: 11th Gen Intel® Core™ i5-1135G7 GPU: Intel® Iris® Xe Graphics (driver version 30.0.100.9955)

Additional information, logs and screenshots (optional)

The end of RoR.log
21:08:38:  ===== LOADING VEHICLE: 
21:08:38:  == Spawning vehicle: M/V Nordia Express
21:08:38: [RoR|Actor|Warning] M/V Nordia Express: vehicle uses no GUID, skinning will be impossible
21:08:38: TOTAL VEHICLE MASS: 23425200 kg
21:08:38: SoundScriptInstance: instance created: defaults.soundscript-5-38
21:08:38: SoundScriptManager: Reached MAX_INSTANCES_PER_GROUP limit (256)
21:08:38: SoundScriptInstance: instance created: defaults.soundscript-5-39
21:08:38: SoundScriptInstance: instance created: defaults.soundscript-5-40
21:08:38: SoundScriptInstance: instance created: defaults.soundscript-5-41
21:08:38: SoundScriptInstance: instance created: defaults.soundscript-5-42
21:08:38:  ===== DONE LOADING VEHICLE
tritonas00 commented 2 years ago

screenshot_2021-10-28_16-17-40_1

Probably your hardware cant keep up

TheDude53 commented 2 years ago

Possibly. What are your GPU specs (for comparison)?

tritonas00 commented 2 years ago

intel i7 4770, its intergraded intel hd 4600 and 8gb ram

CuriousMike56 commented 1 year ago

I've been managing to reproduce this issue consistently by spawning multiple (two or three) USS Gerald R. Ford ships. On a Release build it crashes a couple seconds after spawning in he second/third ship, however on Debug I get an assert the moment I hit Enter at the selector. Back trace, hopefully it helps: image

>   RoR.exe!std::vector<RoR::PointColDetector::kdnode_t,std::allocator<RoR::PointColDetector::kdnode_t>>::operator[](const unsigned __int64 _Pos) Line 1747 C++
    RoR.exe!RoR::PointColDetector::queryrec(int kdindex, int axis) Line 153 C++
    RoR.exe!RoR::PointColDetector::queryrec(int kdindex, int axis) Line 191 C++
    RoR.exe!RoR::PointColDetector::query(const Ogre::Vector<3,float> & vec1, const Ogre::Vector<3,float> & vec2, const Ogre::Vector<3,float> & vec3, const float enlargeBB) Line 147    C++
    RoR.exe!RoR::ResolveIntraActorCollisions(const float dt, RoR::PointColDetector & intraPointCD, const int free_collcab, int * collcabs, int * cabs, RoR::collcab_rate_t * intra_collcabrate, RoR::node_t * nodes, const float collrange, RoR::ground_model_t & submesh_ground_model) Line 229    C++
    RoR.exe!RoR::Actor::CalcCabCollisions() Line 2418   C++
    RoR.exe!RoR::Actor::CalcForcesEulerCompute(bool doUpdate, int num_steps) Line 62    C++
    RoR.exe!RoR::ActorManager::UpdatePhysicsSimulation::__l16::<lambda_1>::operator()() Line 1092   C++
    [External Code] 
    RoR.exe!RoR::ThreadPool::{ctor}::__l2::<lambda_1>::operator()() Line 157    C++
    [External Code]