Jump to content

Server-side AddLocation causes crash in lobby for client


Recommended Posts

Even though this is related to a mod of mine, I am filing this as a bug. I will explain why.

On the server-side, I have enabled a mod, which adds and uses a new location for one of the worlds. If a client (without any mods enabled), browses through the lobby, they will see the game with that mod enabled. If they join the game, there are not any problems and everything is OK. However, if a client decides to view the world settings, they will see a tab with "???" (unknown) and an error will pop-up, requesting the client to exit the game or disable any mods (even though the client has no mods enabled). I don't mind the "???" tab, but I do mind the crash.

This should not occur in the lobby, I would think. The cause of the error is that the location is not defined for the client-side, since the mod is not loaded for the client (as the client is still in the lobby). Thus, a function called GetDataForLocation returns nil and locationdata gets assigned a nil value. Then this happens and everything goes wrong:

[00:05:21]: [string "scripts/map/customise.lua"]:313: attempt to index local 'locationdata' (a nil value)

I don't think the problem is with the server-side mod, but even if this were the case, then the game should still not be allowed to crash in the lobby for a client, right? 

See also (ignore the first post):

I don't think my mod is relevant, but in case you need it... Here it is: http://steamcommunity.com/sharedfiles/filedetails/?id=726432903

Edited by Joachim
Link to comment
Share on other sites

@PeterA It seems like there was an attempt to fix this bug. Not sure. But before I saw "???" instead of my custom location, and now Snowy. This is good. However, I still get a crash when I try to click on Snowy.

I apologize if I misunderstood.

Anyway, here is a screenshot. Please note that from my side no mods were enabled.

20160802195004_1.jpg

Edit: I don't want anything fancy. There is no need to show settings for new prefabs or whatever. I just think there should not be any crash on the client side.

Edited by Joachim
Link to comment
Share on other sites

  • Developer
23 minutes ago, Joachim said:

It seems like there was an attempt to fix this bug

Yeah we've made a fix for this, but it's not actually released yet. It should be going out in the next few days. Thanks again for the report!

Link to comment
Share on other sites

I have checked the new update. It works without crashing. I am very happy about this. Excellent work!

One last thing: I know it's one of your least concerns right now, but to what extent do I have control over what the client gets to see? Before the fix, my custom location label ("Snowy") was shared with the client (although crashing). Now I see "???" instead (but without the crash). Does this mean I can't have custom labels anymore? Or has the key for the lookup table changed somehow?

It's not that important, really. But if there is an easy way for me to use a custom label for the location, then I would like to use it. If not, then never mind. It's OK. I think the majority of players don't even bother to examine the world settings anyway.

Link to comment
Share on other sites

  • Developer

Hey! Thanks for mentioning it. Custom locations and game modes are not really well supported, I'm kind of surprised that the name was showing up at all before. I'll have a look anyways because I agree it would be nice for other people to see that label, though!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...