godotengine / godot

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

Problem with 3d Physic engines #35549

Closed SinaZK closed 4 years ago

SinaZK commented 4 years ago

Godot version: 3.2 rc3

OS/device including version: Macbook Pro macOS Mojave 10.14.6

Issue description: I'm working on a 3D Physic base game and I'm using vehicle body node. It runs ok on 3.2 Beta5 but when i switch to RC3 the Bullet Engine freezes at start and Default and Godot physic engine act wierdly. Currently i switched back to 3.2 beta5.

akien-mga commented 4 years ago

Can you share a project that triggers the issue?

Alternatively, can you test intermediate versions between 3.2 beta 5 and RC 3 to find which one introduced the bug?

SinaZK commented 4 years ago

I check all rc3, 2 and 1. All of them have the problem. And I checked the beta6 and it has the problem too. I checked the Changelog for beta6 and i think it should be the bullet merge that cause the problem.

akien-mga commented 4 years ago

Thanks, it's likely indeed that the Bullet update could have impacted this.

We'd really need a test project to debug with and confirm if it's a regression or a project-specific issue.

SinaZK commented 4 years ago

Today i checked my project in My linux system with godot 3.2 rc4 and rc3 and it was alright and OK. I think the problem is in OSX build of Godot. I test a new minimal project on macOS when i have time and check if the problem is from my procedural terrain generated collisions or i can generate the crash on normal plane and vehicle body and share it here.

SinaZK commented 4 years ago

Hi Just got back home and tested this on my MacBook pro. First I tested the build from rc4 and it works perfect and fine!! So it shows that the problem was from my custom build! I pull the rc4 code (commit 9daaa12bae) and recompile the engine. This is my build command: scons -j 12 platform=osx Then i run my compiled engine and started the project and there was same problem and my game crashed!! This is the stacktrace:

handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] 1   libsystem_platform.dylib            0x00007fff62f6ab5d _sigtramp + 29 Assimp::StdOStreamLogStream::~StdOStreamLogStream() (in godot.osx.tools.64) (hash_map.h:66

[3] btCollisionPairCallback::processOverlap(btBroadphasePair&) (in godot.osx.tools.64) (btCollisionDispatcher.cpp:211)

[4] btHashedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback*, btDispatcher*) (in godot.osx.tools.64) (btOverlappingPairCache.cpp:341)

[5] btHashedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback*, btDispatcher*, btDispatcherInfo const&) (in godot.osx.tools.64) (btOverlappingPairCache.cpp:414)

[6] btCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache*, btDispatcherInfo const&, btDispatcher*) (in godot.osx.tools.64) (btCollisionDispatcher.cpp:224)

[7] btCollisionWorld::performDiscreteCollisionDetection() (in godot.osx.tools.64) (btCollisionWorld.cpp:235)

[8] btDiscreteDynamicsWorld::internalSingleStepSimulation(float) (in godot.osx.tools.64) (btDiscreteDynamicsWorld.cpp:473)

[9] btSoftRigidDynamicsWorld::internalSingleStepSimulation(float) (in godot.osx.tools.64) (btSoftRigidDynamicsWorld.cpp:91)

[10] btDiscreteDynamicsWorld::stepSimulation(float, int, float) (in godot.osx.tools.64) (btDiscreteDynamicsWorld.cpp:434)

[11] SpaceBullet::step(float) (in godot.osx.tools.64) (space_bullet.cpp:366)

[12] BulletPhysicsServer::step(float) (in godot.osx.tools.64) (bullet_physics_server.cpp:1565)

[13] Main::iteration() (in godot.osx.tools.64) (main.cpp:2014)

[14] OS_OSX::run() (in godot.osx.tools.64) (os_osx.mm:2916)

[15] main (in godot.osx.tools.64) (godot_main_osx.mm:71)

[16] 16  libdyld.dylib                       0x00007fff62d7f3d5 start + 1
-- END OF BACKTRACE --

Now that i know the problem is with my custom build i want you to help me fix this issue because i have spine module in modules folder and need that in my project (and some other c++ modules in future). When i type git status, I just got modules/spine and two android platform files (AndroidManifest.xml and PaymentManager.java). All of this three do nothing on bullet and physics and from stacktrace it seems there is a problem from bullet. What am i missing here?

akien-mga commented 4 years ago

Try to remove all build objects to build from scratch (scons p=osx -c or git clean -fxd -- note that the latter will remove all files not tracked by Git).

SinaZK commented 4 years ago

scons p=osx -c and rebuilding the editor fixed the issue, Thanks.

akien-mga commented 4 years ago

Great, thanks was the same issue as #34931 then.