Mydayyy / Valheim-ServerSideMap

This plugin completely moves the explored map and created pins to the server. As clients explore, they will send their explored areas to the server who will then distribute it to all connected clients. When a client joins, the server will synchronize the currently explored areas to the client. Pins are shared as well but default to false and need to be enabled. When pin sharing is used, all newly created pins are send to the server who saves them along with the explored area.
38 stars 1 forks source link

Unable to Delete or Red X Markers with Mod #44

Closed GhostParticle closed 2 years ago

GhostParticle commented 2 years ago

Everything is working fine except for 2 things.

Neither of these issues came up until after H&H update. We removed the mod and were able to red x and delete new and old markers, the issue is only with this mod. I don't know if it is conflicting with another mod in some way as not all mods have updated for H&H, however all mods we currently have installed are working like were before the update, and we are using the same mods as before the update.

Current Mods Installed - We do not have any other map mods installed

Mydayyy commented 2 years ago

Hello,

I tried to reproduce the issue on my server, but it is working for me.

Can you check both the server and the client logs for any errors and log output? When you delete or cross(X) a pin, the server should print a message:

[Info   :ServerSideMap] Client checked pin by server
[Info   :ServerSideMap] Server checked pin by client
[Info   :ServerSideMap] Client checked pin by server
[Info   :ServerSideMap] Server received pin by client
[Info   :ServerSideMap] Client received pin by server

Do those messages appear? Are there any errors? Is the log void of both?

In case the log is void of both, would you mind zipping me your plugins and config folder (making sure there are no sensitive data in the config folder) and sending those to me in order to try to reproduce the issue.

Best Regards Mydayyy

GhostParticle commented 2 years ago

This is a very weird issue. It started working yesterday with no issues, then during gaming it all of a sudden stopped working again where i couldn't delete pins or red-x them. Today I jumped on and its working again no issues. Because the server was shut down i think the logs when it wasn't working was replaced. However, i did notice in some areas in the log showed connection failed right after the servermap info was logged.

[Info :ServerSideMap] loaded from existing explore file [Warning: Unity Log] 09/21/2021 19:23:45: Game server connected failed [Warning: Unity Log] 09/21/2021 19:24:08: Game server connected failed [Warning: Unity Log] 09/21/2021 19:24:57: Game server connected failed

[Info :ServerSideMap] Map saved. Pin Count: 76 [Info : Unity Log] 09/21/2021 20:13:45: Connections 0 ZDOS:386914 sent:0 recv:0 [Warning: Unity Log] 09/21/2021 20:22:08: Game server disconnected [Warning: Unity Log] 09/21/2021 20:22:32: Game server connected failed [Warning: Unity Log] 09/21/2021 20:22:56: Game server connected failed [Info : Unity Log] 09/21/2021 20:23:44: Connections 0 ZDOS:386914 sent:0 recv:0 [Info : Unity Log] 09/21/2021 20:23:45: clone 303 [Info :ServerSideMap] Map saved. Pin Count: 76 [Warning: Unity Log] 09/21/2021 20:23:47: Game server connected failed [Warning: Unity Log] 09/21/2021 20:25:08: Game server connected failed [Warning: Unity Log] 09/21/2021 20:26:08: Game server connected failed [Warning: Unity Log] 09/21/2021 20:30:59: Game server connected failed [Info : Unity Log] 09/21/2021 20:33:44: Connections 0 ZDOS:386914 sent:0 recv:0

I will have to wait till it stops working again to get better logs if its even recognizing the pin check when deleting or red-xing the pin. Its working now as we speak but this is only the second time its worked since the update.

GhostParticle commented 2 years ago

This issue seems very random. Just did a test, was loaded in and some markers i could delete and red-x and some I could not. Waited for the world to save and jumped out, rebooted the server and jumped back in. Now i can edit all markers, even the ones I couldn't before the reboot of the server. I am getting the notification in the log when i edit the markers, and when i cant edit them there is no info in the log if it was tried and failed, its just doesn't record that.

Mydayyy commented 2 years ago

Okay, if the there are no notifications in the log file (were you checking the server logfile?), it seems that the client never even sends out the request to delete it. Could you provide me with the (plugins/configs).zip for the client as well as the server? I hope I may be able to reproduce the issue.

GhostParticle commented 2 years ago

Hello again, my apologies for getting back with you this late. I believe I have found the root cause of this issue. It seems to be a version difference. When H&H had dropped, we did not use your mod at the beginning, then you had dropped a test version in nexus in the comments section, I had pulled it from there. After a few days you published the current version in nexus and the thunderstore which is the one we are currently using. We are having no issues right now with pins made with that version, but all pins that were created from the test version I pulled from the comments section on nexus are the ones we cannot delete or red-x. I'm not sure why this is, but this seems to be the case. All pins created with the current version are fine, any pins created with the older/test version are not available to remove or red-x. I hope this information helps. I don't think its a bug with the mod, just with the different versions. Let me know if you still need anything to look at or if you are good with this explanation. Thank You for your time and the mod.

Mydayyy commented 2 years ago

Greetings,

if you could upload me your .explored file (you can find it alongside your map savefile on your server) as well as take a screenshot of your map and circle me 2 or 3 pins which are not deletable, that would be great. That way I can check if those pins are actually on the server or somehow reside in your client.

GhostParticle commented 2 years ago

Apparently this isn't a version issue as it is still happening. I even created 2 new pins today and after a while I could no longer red-x or delete them. Sometimes after logging out and back in I can, sometimes I cannot. I have added a zip with some stuff, if you need more let me know vahsmbroken.zip.zip .

GhostParticle commented 2 years ago

I also just went through a swamp and set multiple krypt pins. After doing so i went back to see if i could edit the pins and i could not. I logged out and back in and then i could edit the pins. I have added the logs for this action. SwampKrypts.zip

Mydayyy commented 2 years ago

Hello,

please apologize the late reply, I was stuck late at work yesterday so I did not get around to it.

I looked into the files you provided. The interesting parts:

I uploaded a new test file here. I would appreciate if you were able to give that a test. I removed one line which might be responsible. Under normal circumstances this code would not be called but I can imagine that some mod is doing that.

You only need to install the test version on your client, the server would not be affected by the change anyways.

ServerSideMap.zip

Edit: This would also fit well into the picture of that issue only cropping up since you switched to the newest version, since that bugfix was only available as a release candidate so far

GhostParticle commented 2 years ago

Thank You, i will give this a test and see and update you after some time with it.

NoisyFlake commented 2 years ago

I'm having the same issue, so I just installed the new test version and will report back soon. Thanks for the quick help!

GhostParticle commented 2 years ago

Hello, I know this is several days later but I wanted to make sure I tested everything. Looks like the last test zip you gave me is working great, I can even delete or modify old pins created. So whatever change you made fixed the issue. I really appreciate your assistance with this. Thank you for the hard work on the MOD.

Mydayyy commented 2 years ago

Greetings,

thank you so much for bringing this to my attention and for your patience in testing this.

Bit of context: The change I reverted was an earlier bugfix for a different issue. The bugfix is clearing the local pin database when disconnecting from the server, so the pins do not become stale in case you connect to a different server. Apparently it seems like some mod called a game function which in turn triggered the clearing of my local database.

I will now find a different way of fixing that bug and would upload another test version here. If you would be able to install that too and just check if the issue crops up again that would be amazing.

If all goes well I would release the next test version as a new bugfix release.

Best Regards

GhostParticle commented 2 years ago

Sure, just let me know when you have it uploaded and i will test it out. Thank You

GhostParticle commented 2 years ago

Here is something interesting. I loaded up my solo client world to do some stuff. Pins from my server world are showing up in my solo client only game. I added the client logs with some pics along with the SSM dll files from both the server and my client game. Just thought this may interest you. Let me know what you think and if you need more stuff to look deeper.

V_SSM.zip

Mydayyy commented 2 years ago

Greetings,

thats the exact bug that got fixed by the line I reverted :)

The bugfix is clearing the local pin database when disconnecting from the server, so the pins do not become stale in case you connect to a different server

As soon as I reimplement that bugfix (Which will be most likely this evening CEST) in a different way that issue will be gone too.

Mydayyy commented 2 years ago

Greetings,

I did now reimplement the bugfix that I reverted for the testing version.

I found a different way to detect a disconnect which should have no side-effects and only be called when you actually disconnect. This now also fixes the stale pin issue again:

ServerSideMap.zip

As soon as you report back to me on that version, I will create a public release from that one.

Best Regards

GhostParticle commented 2 years ago

Do I need to put this in both client and server or just server side for now?

Mydayyy commented 2 years ago

Just the client is enough

GhostParticle commented 2 years ago

Hello, so far I have not had any issues with the new one provided. Just wanted to provide an update on this.

Mydayyy commented 2 years ago

Hello GhostParticle,

thank you for getting back to me on that, I appreciate your help and again, thank you for bringing this issue to my attention.

I will now create a bugfix release with the working test version and publish it.

Best Regards Mydayyy

GhostParticle commented 2 years ago

Sounds good, thanks for the hard work on the mod.

Mydayyy commented 2 years ago

Fixed in 20de66c0966384e3dce34dfc4018d6905e66cb0a and released in v1.3.6