Closed andreasdr closed 5 years ago
Hi,
Strange. This is the assertion I hit when starting the game with assertions enabled.
Everything from frame 13 is broken but frame 14 gives a hint. Seems like there is some corruption or something.
frame #13: 0x0000000000a6eead ASWServer
tdme::engine::subsystems::framebuffer::FrameBufferRenderShader::initialize(this=0x0000000000000000) at FrameBufferRenderShader.cpp:58
frame #14: 0x0000000000654c22 ASWServerreactphysics3d::CollisionWorld::testOverlap(this=0x0000000803d7d000, body=0x000000083b3c9e40, overlapCallback=0x00007fffdfbf6a98, categoryMaskBits=17) at CollisionWorld.h:255 frame #15: 0x00000000006511e0 ASWServer
tdme::engine::physics::World::doesCollideWith(this=0x0000000803d7d000, collisionTypeIds=17, body=0x000000080b10d000, rigidBodies=0x00007fffdfbf6cb0) at World.cpp:374
frame #16: 0x00000000006513f3 ASWServertdme::engine::physics::World::doesCollideWith(this=0x0000000803d7d000, collisionTypeIds=17, transformations=0x00007fffdfbf6cd8, boundingVolumes=vector<tdme::engine::primitives::BoundingVolume *, std::__1::allocator<tdme::engine::primitives::BoundingVolume *> > @ 0x00007fffdfbf6c98, rigidBodies=0x00007fffdfbf6cb0) at World.cpp:382 frame #17: 0x0000000000485bf6 ASWServer
asw::logics::PlayerLogic::canSpawn(context=0x0000000803d6c1c8, spawnPoint=const tdme::math::Vector3 @ 0x00007fffdfbf6f80) at PlayerLogic.cpp:899
frame #18: 0x0000000000469c56 ASWServerasw::logics::NewLogic::handleNewClient(this=0x0000000803ce0040, clientId=0x00007fffdfbf7eb0) at NewLogic.cpp:70 frame #19: 0x000000000044acb1 ASWServer
asw::ASWServerGameLogicThread::run(this=0x0000000803d91070) at ASWServerGameLogicThread.cpp:203
frame #20: 0x0000000000862f04 ASWServerasw::ASWClientGameLogicThread::run(this=0x0000000000000000) at ASWClientGameLogicThread.cpp:0 frame #21: 0x00000008016d5776 libthr.so.3
___lldb_unnamed_symbol1$$libthr.so.3 + 326`
Related involved tdme2 logic(frame 16) of this first assertion:
https://github.com/andreasdr/tdme2/blob/master/src/tdme/engine/physics/World.cpp#L380
Hmm. Strange. Seems to be a optimization level issue: If I buld like so it seems to work. I will investigate i bit further.
+
+OFLAGS :=
+
CPPFLAGS := $(INCLUDES)
-CFLAGS := -g $(OFLAGS) -pipe -MMD -MP -DNDEBUG
+CFLAGS := -g $(OFLAGS) -pipe -MMD -MP
#CFLAGS := $(OFLAGS) -pipe -MMD -MP -DNDEBUG
-CFLAGS_EXT_RP3D := $(OFLAGS) -pipe -MMD -MP -DNDEBUG
+CFLAGS_EXT_RP3D := $(OFLAGS) -g -pipe -MMD -MP
Hi,
Ok. I switched from -O3 to -O2 on FreeBSD/MacOSX(both use clang). This leads to no assertions and ray tracing seem to work in all cases.
Sorry for the noise. You can delete this issue.
Many thanx and
Best regards Andreas
Hi,
I am glad that you found the issue. If I remember correctly you already had issues with this level of optimizations with ReactPhysics3D in the past. I will need to try to understand what is going on at some point.
Best regards
Hi,
yes I switched to -O2 for GCC a while ago! But -O3 was working good with clang. Now we started using ray tracing and this does not seem to work reliable with -O3 on clang.
Thank you!
Hi,
We use ray tracing to determine interaction objects in our game. For some reason it only works in like 75% of all cases. I tried to enable assertions but the game crashes then early so I cant test if a assertion is hit when doing ray casting. How can I help to track down the issue?
E.g. I can provide videos or provide backtraces of assertions.
Its also possible that you already fixed this?
Any help is highly appreciated.
Many thanx and
Best regards Andeas