Describe the bug
The game instantly crashes with a segment fault when using the long distance debug teleport. This isn't game breaking and will probably never happen during a normal play session. But not being able to teleport around in Debug Mode is pretty inconvenient.
To Reproduce
Steps to reproduce the behavior:
Screenshots

Versions and configuration(please complete the following information):
Probably a duplicate of #29049 (see @Ilysen comment here which is also about a crash while teleporting).
I was going to make a post about this later today until I saw this this. Getting a mostly similar crash report (see the crash log attached), but its not just from teleporting around for me. This crash occurs when attempting to open the (m)ap and moving around for a few turns as well with the long teleport. I somehow found a work around yesterday in-game and thought nothing else about this crash after that. Only now when loading my save does attempting to do of the listed actions will end up making the game have the same crash log after a few seconds of play. If this is different enough from this issue then I can make a separate post and go over it in more detail.
@Zachert45 If it involves a crash while (or just after) opening the map then it might be related to #29472.
@neitsa I think you are right about that, I never thought to test (m)ap until the middle of writing my original post, I think my issue is more along that issue line than this one, sorry for the confusion and thanks for the clarification for on my end.
Did a quick review of the binary for this crash using the crash log provided in the OP. I can't really explain the bug though. Also note that I haven't triggered the bug on my side, it is just an analysis of the root cause.
Here how the stack trace goes (read from bottom to top);

If you look at the last cata function (in red) you can see that the address of this last function call is 0x66738E (note: stack traces always point after the problematic call).
Here is the assembly version:
.text:0000000000667378 mov rcx, cs:qword_187C168
.text:000000000066737F lea rdx, aBoth ; "both"
.text:0000000000667386 mov r12, rax
.text:0000000000667389 call std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(char const*) // CRASH HERE!!!
.text:000000000066738E test eax, eax
The bug happens in game::place_player(game *this) :
On this line:
const bool forage_everything = forage_type == "both";
The stack trace leads to memcmp() (called from std::string::compare() so I guess a pointer is either bogus or null.
@Substance455 : can you please upload your config folder (zipped)? (if you haven't changed anything since the teleport crash). You can zip it and drag and drop it while answering.
If not, can you tell me if, in the game options (General), you have:
TrueAuto Foraging option?Also, did you use Teleport Short or Long range?
Many thanks :)
Here ya go. I'm sorry it took me so long. I toggle the auto features frequently and I have a pretty large auto-pickup list.
No problem @Substance455! Thanks a lot for your help , this will be helpful.