Skip to content

fix: Welcome text fmt crash - #27

Merged
Helias merged 1 commit into
azerothcore:masterfrom
sogladev:fix-crash
Apr 3, 2026
Merged

fix: Welcome text fmt crash#27
Helias merged 1 commit into
azerothcore:masterfrom
sogladev:fix-crash

Conversation

@sogladev

@sogladev sogladev commented Apr 3, 2026

Copy link
Copy Markdown
Member

Changes Proposed:

The previous PR didn't solve the crash

TLDR: rvalue was being passed that goes out of scope immediately

The crash occurs because fmt::arg() is receiving temporary string values that are destroyed before the fmt::format() call completes. When player->GetGuildName() and player->GetPlayerName() return temporary strings, the fmt::arg() creates references to them, but they go out of scope immediately.

crash stack: https://gist.github.com/sogladev/7f7e238d673759d1dc4ce4474a303e7c

Issues Addressed:

  • Closes

SOURCE:

Tests Performed:

How to Test the Changes:

The crash occurs because fmt::arg() is receiving temporary string values
that are destroyed before the fmt::format() call completes. When
player->GetGuildName() and player->GetPlayerName() return temporary
strings, the fmt::arg() creates references to them, but they go out of
scope immediately.
@Helias
Helias merged commit 53aeea0 into azerothcore:master Apr 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants