thebigsleepjoe / TTT-Bots-2

Player bots for Garry's Mod TTT
Creative Commons Attribution Share Alike 4.0 International
10 stars 3 forks source link

[BUG] stackoverflow analyzing mesh #16

Closed EntranceJew closed 9 months ago

EntranceJew commented 9 months ago

Game version/server type

Describe the bug

Error on map load srcds64

Stack trace/error

[ttt-bots-2] stack overflow
  1. GetAdjacentAreas - [C]:-1
   2. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:444
    3. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
     4. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
      5. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
       6. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
        7. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
         8. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
          9. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
           10. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
            11. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
             12. AddAdjacentsToRegion - addons/ttt-bots-2/lua/tttbots2/lib/sh_botlib.lua:446
   Timer Failed! [Simple][@addons/ttt-bots-2/lua/tttbots2/sh_tttbots2.lua (line 211)]

Reproducing the bug

  1. Play game
  2. Map change
  3. Error occurs before first client finishes connecting.

Expected behavior

This shouldn't happen.

Screenshots

image

Additional context

Map is nt_vtol, navmesh existed, TTT2 spawn entities were manually placed in this map.

thebigsleepjoe commented 9 months ago

Could you please send me a copy of your navmesh? I'll try to replicate the error independently, but since I haven't seen this issue before, I might not be able to.

EntranceJew commented 9 months ago

the navmesh I'm using comes with the map I believe, should just be this one here

] whereis "maps/graphs/nt_vtol.ain"
File not found.
] whereis "maps/graphs/nt_vtol.nav"
File not found.
] whereis "maps/nt_vtol.ain"
File not found.
] whereis "maps/nt_vtol.nav"
File not found.
thebigsleepjoe commented 9 months ago

Gotcha! I'll test that workshop map on my SRCDS tonight.

thebigsleepjoe commented 9 months ago

Unfortunately, I could not replicate the issue on the latest build (v0.9.2). However, I will work on making the navmesh analysis algorithm safer.

thebigsleepjoe commented 9 months ago

I changed the code to be iterative instead of recursive.

Please try again and let me know if the issue persists