ID:775093
 
Resolved
Calling winget() and similar procs in client/New() before calling ..() would result in the client never loading the game skin. These procs will now return immediately and do nothing if there is no reason to assume the skin is ready.
BYOND Version:494
Operating System:Windows 7 Ultimate
Web Browser:Chrome 18.0.1025.162
Applies to:Dream Daemon
Status: Resolved (495)

This issue has been resolved.
Descriptive Problem Summary:

Running Dream Seeker in 494 won't connect to my game, but running it in 493 will. However, in 493, it runs fine, so I'm assuming it's an issue with the latest version.

In the loading screen it will say "connected" but won't go past that point.

Numbered Steps to Reproduce Problem:

1.)Compile "Eternia" in 494(source can be sent to Tom/Lummox)
2.) Run the game

Expected Results:

The game should run.

Actual Results:

Instead of running it hangs up in the connecting box.

Does the problem occur:
Every time? Or how often? Every time.
In other games? Not sure.
In other user accounts? Yes.
On other computers? Yes.

When does the problem NOT occur? It always occurs unless connecting using 493.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? 493.

Workarounds: None that I know of.
You can send me source at [email protected], though I won't be able to look at it till Tuesday.

However I recommend making sure this isn't a connection issue as well. If you have a firewall interfering with BYOND (a common issue after updates) that might be all it is. You should also see if anyone else is able to connect, or is able to host. If another user can host your game and join it without incident, a firewall is the most likely culprit.
I've tested this along side WANO, when I was hosting it for some preview thingamabob. It'd host fine, it'd connect, the options and messages would show up. The main window would not.
In response to Super Saiyan X
Good to know. There are some preliminary things you might try to see if this goes away:

1) If there are any transparent or translucent windows used in the skin, temporarily disable that to see if it changes anything.

2) Try turning off hardware rendering (via the pager) before launching the game to see if it comes up then.

3) Try making all the windows in the skin visible to start with.

4) Try launching with the skin disabled, just using a default skin.

Those are just some ideas I have that might narrow things down. This seems like it could be a skin change, though most of 494's skin changes concern the map. It could also be related to resources (does O&M say "resources received"?) potentially, since there were some changes to the startup sequence related to preload_rsc; if you're using preload_rsc, I'd recommend commenting out the setting so you're on the default and seeing if that helps too.
I always have .configure debug on and whatnot, so, this my prompt when I'm connecting;


Welcome BYOND! (4.0 Public Version 494.1134)
Logging in...connected
Logged in as Super Saiyan X.
Connecting to byond://127.0.0.1:3003...connected
Resource list received: 457 of 482 are already available.
Required resources received.


Yeah, everything is there besides the skin stuff, so it's the skin that is apparently not loading.
I'm programming for Eternia, so I've tried a few of your suggestions:

1) I tried running with no skin (default), no result.
2) I tried turning off hardware rendering, nothing.
3) I tried running an alternative skin, still no.
4) I tried with an alternate map, nada.
5) I tried commenting out any preload_rsc, again, fail.

A side note, it hangs at the Options & Messages if running offline, and if I try to connect to an online server it hangs at the blue splash screen.
I'd also like to point out that this problem only appears as of 494.1126. Dream Daemon hosts it fine and clients earlier than 1126 can connect, but 1126 and later cannot.
I've found the issue here and will work out a fix; however some changes may still need to be made to the game, because the problem is a result of bad practice in the game's code itself.

Here's the situation: 494 altered the way skin loading is done, by necessity. This doesn't impact most games, but yours is an exception because you're using winget() in client/New(). Until client/New() successfully calls ..() the mob isn't created, and that means the skin isn't loaded, so the server basically can't complete the login process and tell the client to load the skin until winget() returns. The client, meanwhile, is delaying acting on that winget() call until the skin is loaded. So each end is waiting on the other, and nothing gets done.

Obviously this is untenable, so I'm changing winget() and similar procs that require feedback from the client, and depend on the skin load, to return instantly if the skin couldn't have been loaded on the client yet. This could cause some changes in your code's behavior, which is a risk that stems from trying to access the skin at a point where it isn't guaranteed to be ready. (While the documentation client/New() doesn't specifically mention the skin, the fact that it's a low-level proc and should not be overridden in cases where mob/Login() is more appropriate is stressed. The saveWindow() and setMap() functions should be called after ..() instead of before which will break the deadlock, or better yet should simply be called from Login() instead.)
In response to Lummox JR
Lummox JR wrote:
Here's the situation: 494 altered the way skin loading is done, by necessity. This doesn't impact most games, but yours is an exception because you're using winget() in client/New(). Until client/New() successfully calls ..() the mob isn't created, and that means the skin isn't loaded, so the server basically can't complete the login process and tell the client to load the skin until winget() returns. The client, meanwhile, is delaying acting on that winget() call until the skin is loaded. So each end is waiting on the other, and nothing gets done.

Thank you so much for finding this out, I'll make the adjustments to the code. As you might know, Eternia has passed a few hands, and has a lot of foundation, so I don't have the time to go over everything, but knowing this, I'll definitely make the proper adjustments to client/New().
Lummox JR resolved issue with message:
Calling winget() and similar procs in client/New() before calling ..() would result in the client never loading the game skin. These procs will now return immediately and do nothing if there is no reason to assume the skin is ready.