world-of-might-and-magic icon indicating copy to clipboard operation
world-of-might-and-magic copied to clipboard

Assertion in CollideSphereWithFace failed

Open Nik-RE-dev opened this issue 9 months ago • 2 comments

Describe the bug Collision assert in CollideSphereWithFace function.

To Reproduce

  • Load save from #416
  • Exit the cave
  • Walk a little to the right of the cave entry to the slope
  • Wait few seconds while dragons shoot you

Expected behavior No assert

Environment (please complete the following information):

  • Ubuntu 22.04 WSL

Saved game file Can use same save from the #416

Additional context

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737335253056) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140737335253056) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140737335253056, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff78f5476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff78db7f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff78db71b in __assert_fail_base (fmt=0x7ffff7a90130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x555555f91178 "fuzzyIsNull(face->facePlane.signedDistanceTo(projected_pos), COLLISIONS_EPS)",
    file=0x555555f91110 "/home/nik/OE/OpenEnroth/src/Engine/Graphics/Collisions.cpp", line=141, function=<optimized out>) at ./assert/assert.c:92
#6  0x00007ffff78ece96 in __GI___assert_fail (assertion=0x555555f91178 "fuzzyIsNull(face->facePlane.signedDistanceTo(projected_pos), COLLISIONS_EPS)", file=0x555555f91110 "/home/nik/OE/OpenEnroth/src/Engine/Graphics/Collisions.cpp",
    line=141, function=0x555555f910a8 "bool CollideSphereWithFace(BLVFace*, const Vec3f&, float, const Vec3f&, float*, Vec3f*, bool, int)") at ./assert/assert.c:101
#7  0x000055555579bc59 in CollideSphereWithFace (face=0x7fffffffda00, pos=..., radius=650, dir=..., out_move_distance=0x7fffffffd914, out_collision_point=0x7fffffffd920, ignore_ethereal=true, model_idx=16)
    at /home/nik/OE/OpenEnroth/src/Engine/Graphics/Collisions.cpp:141
#8  0x000055555579c54b in operator() (__closure=0x7fffffffd960, old_pos=..., new_pos=..., dir=..., radius=650) at /home/nik/OE/OpenEnroth/src/Engine/Graphics/Collisions.cpp:279
#9  0x000055555579c6ea in CollideBodyWithFace (face=0x7fffffffda00, face_pid=..., ignore_ethereal=true, model_idx=16) at /home/nik/OE/OpenEnroth/src/Engine/Graphics/Collisions.cpp:298
#10 0x000055555579d49d in CollideOutdoorWithModels (ignore_ethereal=true) at /home/nik/OE/OpenEnroth/src/Engine/Graphics/Collisions.cpp:462
#11 0x000055555579ec2d in ProcessActorCollisionsODM (actor=..., isFlying=true) at /home/nik/OE/OpenEnroth/src/Engine/Graphics/Collisions.cpp:733
#12 0x000055555577ad19 in UpdateActors_ODM () at /home/nik/OE/OpenEnroth/src/Engine/Graphics/Outdoor.cpp:2394
#13 0x0000555555776703 in ODM_UpdateUserInputAndOther () at /home/nik/OE/OpenEnroth/src/Engine/Graphics/Outdoor.cpp:1579
#14 0x00005555556fad73 in UpdateUserInput_and_MapSpecificStuff () at /home/nik/OE/OpenEnroth/src/Engine/Engine.cpp:528
#15 0x000055555568f567 in Game::gameLoop (this=0x55555a70a2c0) at /home/nik/OE/OpenEnroth/src/Application/Game.cpp:1770
#16 0x000055555568942a in Game::loop (this=0x55555a70a2c0) at /home/nik/OE/OpenEnroth/src/Application/Game.cpp:183
#17 0x0000555555689333 in Game::run (this=0x55555a70a2c0) at /home/nik/OE/OpenEnroth/src/Application/Game.cpp:166
#18 0x00005555556616ed in GameStarter::run (this=0x7fffffffdea0) at /home/nik/OE/OpenEnroth/src/Application/GameStarter.cpp:218
#19 0x00005555555d32ed in runOpenEnroth (options=...) at /home/nik/OE/OpenEnroth/src/Bin/OpenEnroth/OpenEnroth.cpp:125
#20 0x00005555555d3440 in openEnrothMain (argc=1, argv=0x7fffffffe238) at /home/nik/OE/OpenEnroth/src/Bin/OpenEnroth/OpenEnroth.cpp:139
#21 0x00005555555d363c in platformMain (argc=1, argv=0x7fffffffe238) at /home/nik/OE/OpenEnroth/src/Bin/OpenEnroth/OpenEnroth.cpp:150
#22 0x000055555565ed82 in main (argc=1, argv=0x7fffffffe238) at /home/nik/OE/OpenEnroth/src/Library/Platform/Sdl/SdlMain.cpp:7

Nik-RE-dev avatar May 22 '24 09:05 Nik-RE-dev