---
name: "SDL_GetAssertionReport"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetAssertionReport"
---

# SDL\_GetAssertionReport(3)

Get a list of all assertion failures.

## NAME

SDL\_GetAssertionReport - Get a list of all assertion failures.

## HEADER FILE

Defined in SDL3/SDL\_assert.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**const SDL\_AssertData \* SDL\_GetAssertionReport(void);**

## DESCRIPTION

This function gets all assertions triggered since the last call to

**SDL\_ResetAssertionReport** (), or the start of the program.

The proper way to examine this data looks something like this:

-

  ```
  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;
  }
  ```

## RETURN VALUE

(const  **SDL\_AssertData**\
  \*) Returns a list of all failed assertions or NULL if the list is empty. This memory should not be modified or freed by the application. This pointer remains valid until the next call to  **SDL\_Quit** () or

**SDL\_ResetAssertionReport** ().

## THREAD SAFETY

This function is not thread safe. Other threads calling

**SDL\_ResetAssertionReport** () simultaneously, may render the returned pointer invalid.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_ResetAssertionReport**(3)](/SDL_ResetAssertionReport/3.md)
