-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatability/bug between MassFarming, ValheimPlus, XPortal/Jotunn #36
Comments
Hi, thanks for reporting! Judging by the error that's showing up in your logfile, it looks as if you are trying to destroy a portal that XPortal doesn't know about. So something else has gone wrong earlier, when this portal was created and/or updated. Did you change the name or destination of the portal before trying to destroy it, and did that cause any errors or weird side effects? Either way, that is just a "guess at first sight". To properly dive into this I will need a little more information. Could you peform the following steps for me?
Thank you very much in advance! |
Sorry, valheim updated while I was away and I didn't have a clean copy of the server files from before, the new update broke the valheim plus fix so just waiting for that to update before I can try this for you. |
You can always trust game updates to ruin everything! But no worries, just give me a shout when you've got things up and running again and I'll look into it. |
Sorry it took a couple days, been dealing with some stuff, here's the logs. Client: Server: I logged into the server, placed the portal, didn't name it or change destination, attempted to destroy and it didn't demolish, zoomed out and in and it let me demolished it. |
Very curious! It is precisely what I expected; XPortal detects when a new piece is being placed (i.e. when you build anything), and if that piece happens to be a portal, XPortal adds that portal to its internal list of "known portals". This did not happen to the portal you built (no error at this stage, just a silent undetected failure). So when the time came to destroy the portal, XPortal searched for it in its internal known portals list, and didn't find it, and that caused an error. From your server log:
The reason it does work the second time, is because you have hovered over the portal. When you do that, XPortal detects that the portal you are hovering over does not yet exist, and then goes on to add it (client only), assuming it was just a new portal that wasn't added to the list for an unknown reason -- essentially exactly what happened to your portal. From your client log:
Now, I could just make XPortal ignore the fact that the portal doesn't exist upon destruction. After all, you're destroying it, the portal doesn't matter anymore. And the hover event takes that same approach, as in, it adds a portal if it didn't exist. This doesn't however address the underlying problem (and the same argument can be made for the hover event taking the wrong approach). You could have chosen not to destroy this portal. You could have just left it there and moved on with your life. In that case, XPortal will not know that this portal exists, until you log out and join the server again (this triggers a full resync), and the portal would not be available in the destination dropdown on other portals (XPortal can only list he portals it knows about). The root cause of this problem is the fact that the build event is not being triggered. Both VH+ and Mass Farming handle build events, and it's possible that, because of how they work, XPortal never gets a chance to do its part. I will do two things:
I'll get back to you on that when I have made some progress. Sadly I cannot address the root cause. |
Here's a new (debug) release in which:
XPortal-debug-v1.2.10-issue-36.zip Could you run the same test as before with this new version, and let me know the results? Bear in mind that with this version, the portal will be destroyed, even if that would otherwise have gone wrong, so it's important (for me) to see the client output log. As a side note, this is a candidate release for v1.2.10 of XPortal and it contains changes that weren't fully tested yet (like UI Keyhints), so you might run into other bugs. I was not able to use the previous version for this test, because of game and bepinex updates. |
The portal destroyed when attempting to demolish. Not sure if you only need client, i'll just send both. Using your debug v1.2.10 Client: Server: |
Excellent, thank you very much. Here's the new error message, working as intended:
So now it does that, instead of crashing. That's half the problem fixed. (it's still an error, because it's not supposed to happen, but at least nothing breaks now) My other point (detection of the portal being placed) clearly did not work so I'll spend a little more time on that. I'll get back to you when my brain has hurt sufficiently ;) |
yea, no worries, it was nice that it broke properly and the error is okay, sometimes i build a workbench portal etc to break then i have the exact materials i need for that thing, instead of going and searching and trying to remember how many of what items i need for it when using vplus build/craft from containers. |
I've spent several hours on this issue and I think I have a rough idea of what the root cause is, but I haven't been able to come up with a solution yet. In case you (or anyone else reading this) are interested in the technicals: it appears that my patch on I currently have no idea how to debug this, which is why I have opened an issue in the HarmonyX project, here: BepInEx/HarmonyX#71 In the upcoming release of XPortal I will include the change that stops XPortal from crashing when you destroy an unknown portal. The other half of the problem (not detecting portal placement) will have to wait until I have learned more. So I'm leaving this issue open for now. |
v1.2.10 is now live. As mentioned previously, this version includes the change that stops XPortal from crashing when you destroy an unknown portal. |
Hi @purrdypaws! It seems that the bug I discovered isn't really a bug, but, let's say, a challenging feature of how this programming language works. If you want to read the technicals (I don't recommend it - it hurts), just click on the HarmonyX issue I linked in an earlier comment. Anyway, I have a new test file ready. The issue "might" be solved in this (but I'm not sure yet). Could you please try the same steps again, and share your output logfiles with me?
Thanks for your patience! |
Hi @purrdypaws, have you been able to test this yet? Without testing feedback I will not be able to implement this in a new release. |
Hi @purrdypaws I have included a work-around in v1.2.11 which has just gone live. If you continue to have this problem please let me know and I will spend more time on it. |
Describe the bug
Place portal using hammer, attempt to demolish portal with hammer, portal isn't demolished.
To Reproduce
Place portal using hammer, attempt to demolish portal with hammer, portal isn't demolished.
Expected behaviour
Portal demolished.
LogOutput file(s)
LogOutput.log
Version
v1.2.9
Environment
Dedicated server
Singleplayer
Other mods
MassFarming v1.6 https://www.nexusmods.com/valheim/mods/527
ValheimPlus Fix v0.9.9.12 https://www.nexusmods.com/valheim/mods/2323
Jotunn v2.11.2 https://www.nexusmods.com/valheim/mods/1138
Priority
Medium (XPortal kind of still works, but it's not pleasant to use)
Additional information
XPortal works normally with just ValheimPlus, it also works normally with just MassFarming, but not when using all 3 together. Weirdly enough it lets you demolish after placing a new portal and then zooming out or in with scroll then attempting to demolish with the hammer. Also no error is thrown in server console, portal just doesn't demolish.
The text was updated successfully, but these errors were encountered: