App Crash on resolution change

BlitzMax Forums/BlitzMax Beginners Area/App Crash on resolution change

Hardcoal(Posted 2016) [#1]
Hi..
when i change resolution of my desktop while my blitzmax app is runing
the app tend to crash..
anyone has an idea why is that and how to prevent it?

I must mention im using xors3d..

tnx


Derron(Posted 2016) [#2]
Graphics context might get lost...or textures might have get invalid.


just to make sure...store "graphics" variable somewhere and check validity each cycle... then change res.


Bye
Ron


Hardcoal(Posted 2016) [#3]
i dont change graphics inside the application..
when the windows goes to sleep mode or changes graphics externally
it get stuck..

maybe i need to recognize this actions and pause the app?
I dont know.


Derron(Posted 2016) [#4]
I did not say you are changing the graphics WITHIN the application.


As I do not know what drivers do when changing desktop resolution I just suggested to check wether your graphics context is still valid after you changed your desktop res ... if not print something.

Just a simple approach to narrow things down.

Another thing is of course a debug build :-)


PS: "Tend to crash" sounds exactly as if graphic things get distorted and sometimes "by luck" reach a still workable state again (same memory address or so).


bye
Ron