Wow this one was a real M**********R
Case:
when you set X_SETTEXTURE -1, -1
and then you call FILEREQUEST$
Problem:
When the window comes back......CRASH
Fix:
the fix .... X_SETTEXTURE 0,0 //even if nothing is assigned to this ID, its ok
does it crash only in debug mode? You would have found a fix for a very silly bug then.
Because this bug drove me crazy, i used debug mode.
When in debug mode...fatal exception error is reported after it crashes.
When not in debug mode, it crashes...either way crash.
Debugger does not report the problem as far as i can tell.