I already said it, it ends at a certain point, in a call to the sf objects, and Windows tells me it crashed. And I don't have this problem with OpenAl.
// If I declare this inside the main it never crashes, array or not
// Dynamic allocation sometimes works, sometimes not.
sf::Image IMG_PianoB[3][3];
sf::Image IMG_PianoN[3];
sf::Sprite SPR_PianoB[3][3], SPR_PianoN[3];
int main()
{
[...]
// Exemple of dynamic allocation
sf::RenderWindow * Interface;
Interface = new sf::RenderWindow;
// CHARGEMENT DES IMAGES ET ALLOCATION DANS DES SPRITES
//// Piano
if (!IMG_PianoB[0][0].LoadFromFile("IMAGES/PianoB0A.tga"))
return EXIT_FAILURE;
if (!IMG_PianoB[0][1].LoadFromFile("IMAGES/PianoB1A.tga"))
return EXIT_FAILURE;
if (!IMG_PianoB[0][2].LoadFromFile("IMAGES/PianoB2A.tga"))
return EXIT_FAILURE;
if (!IMG_PianoB[1][0].LoadFromFile("IMAGES/PianoB0B.tga"))
return EXIT_FAILURE;
if (!IMG_PianoB[1][1].LoadFromFile("IMAGES/PianoB1B.tga"))
return EXIT_FAILURE;
if (!IMG_PianoB[1][2].LoadFromFile("IMAGES/PianoB2B.tga"))
return EXIT_FAILURE;
if (!IMG_PianoN[0].LoadFromFile("IMAGES/PianoN0.tga"))
return EXIT_FAILURE;
if (!IMG_PianoN[1].LoadFromFile("IMAGES/PianoN1.tga"))
return EXIT_FAILURE;
if (!IMG_PianoN[2].LoadFromFile("IMAGES/PianoN2.tga"))
return EXIT_FAILURE;
// This tends to crash when Images are declared outside the main
SPR_PianoB[0][0].SetImage(IMG_PianoB[0][0]);
SPR_PianoB[0][1].SetImage(IMG_PianoB[0][1]);
SPR_PianoB[0][2].SetImage(IMG_PianoB[0][2]);
SPR_PianoB[1][0].SetImage(IMG_PianoB[1][0]);
SPR_PianoB[1][1].SetImage(IMG_PianoB[1][1]);
SPR_PianoB[1][2].SetImage(IMG_PianoB[1][2]);
SPR_PianoN[0].SetImage(IMG_PianoN[0]);
SPR_PianoN[1].SetImage(IMG_PianoN[1]);
SPR_PianoN[2].SetImage(IMG_PianoN[2]);
// Same here if Interface is declared outside, random results
(*Interface).Create(VideoModes[0], "QUANTON AUDIO", sf::Style::Fullscreen);
(*Interface).Clear();
(*Interface).Draw(SPR_PianoB[0][0]);
(*Interface).Display();
[...]
EXIT RETURN_SUCCESS;
}
I really don't know what else I could tell you.
Edit: And I know exactly where in my code it stops because I usually add
std::cout << "What it's about to do" << std::endl;