godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.33k stars 21.24k forks source link

Octree collision broken? #64116

Open SeanRamey opened 2 years ago

SeanRamey commented 2 years ago

Godot version

3.5.stable.arch_linux

System information

Operating System: EndeavourOS KDE Plasma Version: 5.25.4 KDE Frameworks Version: 5.96.0 Qt Version: 5.15.5 Kernel Version: 5.18.16-arch1-1 (64-bit) Graphics Platform: X11 Processors: 6 × Intel® Core™ i5-8400 CPU @ 2.80GHz Memory: 15.6 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 1070/PCIe/SSE2 Manufacturer: Gigabyte Technology Co., Ltd. Product Name: Z370 AORUS Gaming WIFI

Issue description

Disabling BVH collision will cause the game to crash with an error after moving character:

E 0:00:04.714   ~List: Condition "_first != nullptr" is true.
  <C++ Source>  ./core/self_list.h:108 @ ~List()

Steps to reproduce

  1. Turn off Project Settings->General->Physics->3D->Godot Physics->Use BVH
  2. Start game
  3. Move character around for a bit until it crashes with the error above.

Minimal reproduction project

Note: rename to FPS-test.tar.lzma after download. FPS-test.zip

Calinou commented 2 years ago

The MRP isn't available:

The transfer you requested has been deleted.

Please upload attachments directly to GitHub, so that they remain available in the future (without relying on third-party file hosts still working by then).

PS: Out of curiosity, why did you disable the BVH? This option will be removed in 4.0 if I'm not mistaken.

SeanRamey commented 2 years ago

I disabled BVH out of curiosity, lmao. But if it's going to be removed anyways, then this is probably not worth fixing. Also, the project I uploaded is too large to fit on github, but I didn't expect the file hosting site to delete my upload less than an hour later...

SeanRamey commented 2 years ago

I got the project small enough to upload. There was a lot of extra files in the .import directory. I still had to use lzma compression, which means I had to rename it with .zip in order for github to accept it, so you might need to rename the file to FPS-test.tar.lzma in order to extract it. FPS-test.zip

Calinou commented 2 years ago

There was a lot of extra files in the .import directory

You don't need to include this folder as it'll be created by Godot when opening the project in the editor for the first time :slightly_smiling_face:

luketrenaman commented 2 years ago

Able to reproduce on Ubuntu 22.04.1 LTS in Regolith. Processor is i7-1260p on Iris Xe Integrated graphics.

E 0:00:10.896   ~List: Condition "_first != nullptr" is true.
  <C++ Source>  ./core/self_list.h:108 @ ~List()
luketrenaman commented 2 years ago

Same error can be found on Windows 11 build 22000.795 with i7-1260p on Irix Xe Integrated graphics.

E 0:00:06.264   ~List: Condition "_first != nullptr" is true.
  <C++ Source>  ./core/self_list.h:108 @ ~List()
lawnjelly commented 2 years ago

No idea on the crash, but we are probably intending to remove octree from 3.x now we've had a decent amount of testing with BVH. Octree still has some bugs and was there for compatibility purposes during the rollout.

It has already been removed entirely from 4.x.

EDIT : It looks like there some invalid children in octants. But this is not worth debugging imo.