Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Miscellaneous Errors

Kilian edited this page Mar 18, 2020 · 1 revision
  • 10 : E_BMP_PARSE

In our graphical output, we use external ressources such as Windows Bitmaps (.bmp) to get a nicer result. We use our own BMP Parser to load these files into memory and several errors can occur during this process. If data can't be retrieved through bmp_to_array() a non-zero value is returned this way we know that the requested asset wasn't loaded and can't be accessed afterwards.

  • 11 : E_BKGD

Our program handles few resolutions (1280x720p, 1366x768p, 1440x900p and 1920x1080p), the original trigger of this error was if the background asset from the main menu couldn't be loaded, since we changed the way we loaded assets during the development, it is now triggered if the requested resolution isn't supported by our program.

  • 12 : E_MALLOC

malloc() can fail to allocate requested space in memory, due to this fact we must check that the returned address isn't NULL. If so, the program integrity can't be ensured and accessing this memory can lead to segmentation faults.

  • 28 : E_THREAD

To get a higher frame-rate, our program uses libpthread to parallelize graphic and audio computations. As stated by the man page of pthread_create(), which is the function to create a new thread, this process can fail. If so, the thread isn't created and can't be used afterwards.

Clone this wiki locally