- Online Community Forums » Programming Questions » Demo crashes randomly while while browsing on another monitor

This thread is locked; no one can reply to it. rss feed Print
Demo crashes randomly while while browsing on another monitor
Member #18,984
January 2021

As long as I start the demo and do not open Chrome and start browsing it runs without crashing. Once Chrome is opened it crashes after random intervals. Once it crashed as soon as I clicked on Google search. Other times it crashes when Chrome is open and I'm not doing anything except watching the demo.

So the reason that I switched from raylib to Allegro5 was because raylib minimizes the fullscreen mode anytime another monitor is clicked on. Allegro5 allows clicking on other monitors without minimizing the fullscreen borderless window. But then I can't use a browser. This is apparently an old problem that I can't find a solution for.


disp = al_create_display(0, 0);

Is how the display is created. Therefore it defaults to the native resolution of the desktop. Which is exactly what I want because all drawing is scaled accordingly.

Please, is there a way to fix this?


The .cpp file also had an annoying problem. While browsing on a different monitor it would change the color in the 2nd cell of the color array. Weird just weird. Anyway, looking through the myriad of compiler options for MSVS 2019 Community I saw that the C standard was set to Legacy MSVC, 2014. So I set it to the 2018 C standard and changed the file back to .c and now after several hours of running with multiple browsers it appears to be rock solid!!! 8-)

Edgar Reynaldo
Major Reynaldo
May 2007

Okay, give us the standard details for a bug report.

1) Which OS
2) Which Compiler
3) Which version of Allegro 5
4) When was the last time you updated your graphics drivers
5) Can you provide a debugging binary for us to try?
6) Can you make a minimal complete verifiable example that reproduces the behavior of your demo program?

If you can provide us this information, we can help you much more easily.

btw, welcome kingnoob

Member #18,984
January 2021

Thank you for the welcome! MSVS 2019 Community. I changed the file from Demo.c to Demo.cpp and compiled it as a C++ program and now it seems to be working just fine.

Go to: