Skip to content
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

[1.20.1] Crash when viewing a camera from the mod SecurityCraft #9

Open
2 of 3 tasks
RedstoneDubstep opened this issue Oct 3, 2024 · 6 comments
Open
2 of 3 tasks
Labels
bug Something isn't working

Comments

@RedstoneDubstep
Copy link

Describe the bug
When Very Many Players is installed alongside SecurityCraft, trying to view a camera from SecurityCraft that is far away (and hence needs new chunks to load) crashes the server after a short while

To Reproduce

  1. Install SecurityCraft v1.9.11 and Very Many Players 0.2.0+beta.7.101 on your client
  2. Start the game and join a singleplayer world
  3. Teleport to a far away place (I used 1000 100 1000), place a SecurityCraft camera there and link a SecurityCraft camera monitor to it
  4. Teleport back to spawn
  5. Rightclick the camera monitor and select the linked camera
  6. Observe that the game first hangs and then crashes after a short while

Expected behavior
The game would not crash, and the player's camera would move to the position of the SecurityCraft camera so the player can view the surroundings of that camera

Runtime info (please complete the following information):

  • OS: Windows 11
  • Minecraft version: 1.20.1, Forge version 47.2.0
  • Mod version: 0.2.0+beta.7.101

Crash reports / logs
Crash report: https://pastebin.com/FUmBgExD

Other mods
Should be visible in the crash report; to my knowledge, only SecurityCraft and VMP modify the server in a way that is meaningful to this issue

Checklist

  • I am using the official version of the mod.
  • I tried the latest development version but the issue persists.
  • I searched for similar open issues and could not find an existing bug report on this.
@RedstoneDubstep RedstoneDubstep added the bug Something isn't working label Oct 3, 2024
@ishland
Copy link
Contributor

ishland commented Oct 4, 2024

Try reproduce with this mod installed: https://modrinth.com/mod/uwrad/version/1.1.0+forge

@RedstoneDubstep
Copy link
Author

I installed the mod, the crash occurred in the same manner as before.
Log file (crash report should already be included in there): https://pastebin.com/n4jHLJFi

@ishland
Copy link
Contributor

ishland commented Oct 4, 2024

The only way this can happen is due to the use of unsafe threading in other mods (most likely SecurityCraft itself) that have corrupted the state vmp uses.
Please consider reporting this to SecurityCraft as well.

@RedstoneDubstep
Copy link
Author

I am one of the developers of SecurityCraft, and after reporting this internally we concluded that, to quote bl4ckscor3, "We're not doing anything off-thread". My personal guess is that this issue could arise from SecurityCraft trying to load and send chunks far away from the player in a faulty/unexpected way, since this crash does not occur when trying to view a SecurityCraft camera that is directly next to the player.

@ishland
Copy link
Contributor

ishland commented Oct 5, 2024

Cannot reproduce the crash.

@RedstoneDubstep
Copy link
Author

Alright I apologize for the confusion, the crash I experienced was likely in part caused by me having WorldEdit installed as well (though now I can also no longer reproduce it, my game only starts to hang indefinitely until it runs out of memory with SC, VMP and WorldEdit).
I've also now investigated why mounting the camera with SecurityCraft and VMP, while not crashing, also does not work as expected (the player stays where it was, instead of mounting the camera), and the most likely cause of that is VMP queueing the sending of newly added server entities to the client (see MixinThreadedAnvilChunkStorage#redirectUpdateOnAddEntity in VMP), so when the client wants to mount SecurityCraft's camera entity, it has not yet been sent to the client, and thus this process fails. This is something that can be fixed by SecurityCraft though, by just having the client wait until the camera entity arrives.
So since the actual crash seems to be a weird 3-mod-incompatibility and not directly related to the SC+VMP interaction, feel free to close this issue if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants