Scawen!
I think I can reproduce the black screen bug - it has to do with losing focus during window mode change.
The steps are relatively simple
Start LFS, windowed or not is irrelevant
Just stay in the main menu, it's not necessary to have anything happen in LFS
(Maybe set up the LFS fullscreen resolution to the desktop one, so Shift+F4 works faster)
Press and hold Shift+F4 - the LFS window should start switching between full and windowed mode quite fast. You can keep this up infinitely, that's not the problem.
Now, click on the half visible task bar or somewhere outside so LFS loses focus. At first I thought it happened by launching any application, but it's actually the lost focus that makes LFS screw up.
Continue holding Shift+F4. It might happen that LFS still shows as full screen but doesn't actually have focus, so you have to Alt+Tab back in and start pressing Shift+F4 again. I can quite reliably get a black screen at that point.
It seems the problem occurs if LFS loses focus during screenmode change, which would explain why I got my first black screen shortly after joining a server - I guess it was going back to full screen (from the multiplayer windowed mode) shortly after I clicked outside to look at the forums.
As a note, I also managed a few times to get LFS into a state where it wouldn't close by itself anymore. Usually Alt+F4 works, or clicking the X of the window, but sometimes it just froze and I had to kill it with the task manager.
iirc thats something to do with hooking into windows ans disabling the Win key temporarily is it not? imo it's not that important
No - try offline and all the ballast goes and the cars get faster
After LFS lost focus, did you make sure to start pressing Shift+F4 again? The lost focus can interrupt the keyboard input and you have to press it again.
You don't even have to be fast. In one case LFS is fullscreen and still has focus after clicking outside, but I see "good race" pop up at LFS now, as the shift key press was lost. At that point I can take my time to start again and switch to windowed mode, and as soon as I switch back to fullscreen it goes black. Every time.
Actually it seems the black screen only comes up when switching from windowed to full mode. When clicking outside it usually leaves LFS in fullscreen mode (which is logical, the click "outside" only counts when you're currently in windowed mode, and the most likely thing that will happen then is going to full as you're still pressing Shift+F4). Then it could be that LFS has focus or not - if not you first have to Alt+Tab back in, but it doesn't influence the outcome. As soon as I start going to windowed and back to full it's black.
Just for the record, I have a 6600GT with 92.91 drivers.
as long as its not in any way time critical yes
i can resume keeping shift-f4 pressed after losing focus for as long as i like and make it lose focus during that as often as i want and it never goes black
Thanks for that - making progress now! I have two questions :
1) Does this explain why this might happen when LFS auto windows? Is it because you are clicking on another program while connecting to a server? Sorry if that's a dumb question but my slightly tired mind is focussed on network connection / disconnection issues and that's very complicated.
2) If you can work out an even more simple way to reproduce it that would be great (with minimum number of clicks and keypresses). I mean, a way to guarantee it happens, that way I can for sure catch it in the debugger. If it's "hit and miss" then I can't necessarily catch it.
Same here, that "Black-Screen" Problem i had twice. 1 Time long time ago, and 1 time at W39. I can´t reproduce it, but at W39 i had Mediaplayer running. That´s all i can say about it.
I also never use the Window-mode at joining a server. It always sets to window after i install a LFS-Patch. Then i turn it off again.
It is to make it more noticeable that your firewall wants input is my guess. To prevent comments like i get no servers But its a bit missplaced as in my case that little norton screen hides after the LFS windows anyway.
It goes to windowed mode because often there are firewalls that will block LFS at the exact point you display the list of games (as you do the first query to the master server then). If that happens in full screen mode, many firewalls simply freeze LFS, without the chance to even Alt+Tab out, forcing you to do a hard reset (or do some task manager trickery). So it is much safer to go to windowed mode first and then try to access the net, as you can easily allow LFS' connection in the firewall popup window then.
because a firewall may pop up and say "z0mg! LFS.exe is trying to connect to "t3h intertuubes!" - Do you want it to? Yes/No" and if LFS was full screen you wouldn't see it and would just think "Why isn't this motherfizzling program working!"
EDIT - Last time i waste time telling my Dad what kind of drugs i want, just bring me Morphine god-damnit and then i can beat Android!
@Scawen: I'm working on simplifying the process, and while I can reduce the steps, it's certainly *harder* to reproduce it without the screen flicker, but it makes it more clear what's triggering it.
The general gist is, that it happens when going from window to full screen, but you have to click outside LFS at the exact moment you hit Shift+F4. I think it's easiest to reproduce when LFS and desktop resolution are the same, so it doesn't take so long to change screen mode for trying again.
Basically
LFS in windowed mode, focused
Hit shift, ready your finger over F4
Get ready to click with your mouse on the taskbar
Hit F4 and immediately click the taskbar "after" that
By immediately I mean the click should be at the same time as shift+F4 as far as a human would be able to discern, but for the program it should first get the screen mode change command and in the next possible frame the focus change.
Possible results:
Nothing happend.
You clicked too fast and the Shift+F4 didn't reach LFS anymore. .
LFS goes fullscreen and then minimizes.
You clicked too slow, LFS was already over the critical phase and handled the focus change properly (or Windows did?). .
LFS changes to fullscreen, but it still works.
You clicked too slow, LFS was already maximised when you tried clicking the taskbar, so it didn't lose focus. .
LFS takes a split second longer than usual to change to full screen mode.
Now it is in the correct state for that bug to happen. You probably have to click onto the now full screen LFS again so it gets the focus back. Switch back to windowed mode, everything still ok. Now get your debugger ready and switch back to full screen - which will remain black. .
I hope from this point you'll be able to backtrack what happened during the first screen change that initiated the bug.
That's pretty much as simple as I could make it, hope it helps you
Edit:
It is easier to reproduce if you go to Options > Misc, enable "Limit frame rate in game" and set it to "10 fps". This should give you a longer time window in which you can click the task bar, compared to the usual 40 fps menu limitation. VSync has no influence on the outcome.
Make sure you have a few other programs running ..... winamp, explorer window, e-mail prog and firefox here!
run lfs - go windowed..... make it 1/2 screen so you have room
LFS focused - press shift-F4 and at same time click on one of the background programs.... explorer for me.....
works every time, as long as the timing is right
Edit: I can make it happen, 1 in 3 tries .... now..... practise makes perfect Maybe we could have a black screen ladder ? It would be nice to be the best at something
Edit,Edit: Not sure if anyone else tested...... happens in 'W' also!
I cannot reproduce it here. If I remembe correctly, I did never get a black screen while switching window/full screen.
What happens here is, that I can make LFS go fullscreen without having the focus. So LFS is on top, but I cannot click any buttons. If I click, I can make other programs (or desktop icons) popup over the LFS window, just for the time I click.
Maybe it depends on the graphic driver, if you get a black screen or only a LFS without focus as in my case. So I guess the problem is, that LFS can go full screen without actually having the focus. Is there a way, you can make it sure, that LFS always has the focus if being fullscreen?
Edit: ATI X1600 mobility with Mac drivers for Win XP (Bootcamp)