I have a similar problem.
i am creating menu for my game and when player chande in game options resolution or fullscreen mode - game always crashing.
try this simple code and you will understand what I mean.
is it real to change screen resolution or windowed mode in real time you have to reload all objects ang images in scene??
set display mode 800,600,32
set window on
autocam off
sync rate 60
sync on
make object cube 1,10
position object 1,0,100,0
position camera 0,0,0
point camera 0,100,0
angle#=0
d=0
DO
inc d
angle#=cos(d)
position object 1,angle#*50,100,0
set cursor 0,0
print press spacekey to change windowed mode
if spacekey()=1 then set window off
sync
LOOP
END