SDL_GetAssertionReport(3)
π NAME π
SDL_GetAssertionReport β it gets you a list of all assertion failures π (and yes, this one lives in the SDL3 FUNCTIONS section of the manual, bestie, so you know it's the real deal).
β¨ SYNOPSIS β¨
#include <SDL3/SDL_assert.h>
const SDL_AssertData * SDL_GetAssertionReport(void);
πΈ DESCRIPTION πΈ
okay so this function grabs every single assertion that's been triggered since the last time somebody called SDL_ResetAssertionReport(), or since the program started β whichever came most recently. like, the full receipts. π
and the proper way to actually look at this data? it's giving very much this vibe:
const SDL_AssertData *item = SDL_GetAssertionReport();
while (item) {
printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
item->condition, item->function, item->filename,
item->linenum, item->trigger_count,
item->always_ignore ? "yes" : "no");
item = item->next;
}
walk the linked list, print the tea, move to item->next. iconic. π¦
π RETURN VALUE π
- *) it returns a list of all failed assertions, or
NULLif the list is empty (crying, nothing to see, everything's fine π₯²).
β οΈ bestie listen: this memory should not be modified or freed by your application. not yours. hands off. π
π and that pointer stays valid only until the next call toSDL_Quit()orSDL_ResetAssertionReport(). after that? poof. gone. don't be caught holding it. β¨
π§ THREAD SAFETY π§
ngl, this function is not thread safe. π if other threads are calling SDL_ResetAssertionReport() at the same time as you, they may render the pointer you got back invalid. it's giving chaos, it's giving undefined-vibes-adjacent energy, so like β don't. π«Ά
π AVAILABILITY π
this one's been serving since SDL 3.2.0. old enough to be trusted, young enough to still be fresh. π
π SEE ALSO π
SDL_ResetAssertionReport(3)β the other half of the duo, go read it fr fr π
k bye, this was Simple Directmedia Layer's manpage for SDL 3.4.18, SDL_GetAssertionReport(3) β stay slay, go clear your assertion report, mwah ππ
β¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms