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

StorageException: Failed to rename temporary regions file to #2049

Open
5 of 6 tasks
MarvinKlar opened this issue Dec 17, 2023 · 1 comment
Open
5 of 6 tasks

StorageException: Failed to rename temporary regions file to #2049

MarvinKlar opened this issue Dec 17, 2023 · 1 comment
Labels
status:invalid This does not describe a request or bug with WorldGuard type:bug Incorrect behavior, not working as intended

Comments

@MarvinKlar
Copy link

MarvinKlar commented Dec 17, 2023

WorldEdit Version

7.2.6

WorldGuard Version

7.0.6

Platform Version

git-Paper-84 (MC: 1.17.1)

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using a version of WorldGuard compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

I encountered the following error when creating a region via WorldGuard API: https://pastebin.com/njpTDw8h

The code I used was:

import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;

[...]

            BlockVector3 upperLimit = BlockVector3
                    .at(location.getBlockX() + regionRadius, location.getBlockY() + regionRadius,
                            location.getBlockZ() + regionRadius);
            BlockVector3 lowerLimit = BlockVector3
                    .at(location.getBlockX() - regionRadius, location.getBlockY() - regionRadius,
                            location.getBlockZ() - regionRadius);
            regionContainer.addRegion(new ProtectedCuboidRegion(regionName, upperLimit, lowerLimit));
            try {
                regionContainer.saveChanges();
            } catch (Exception e) {
                Bukkit.getLogger().log(Level.SEVERE, "Unable to save region '" + regionName + "'!", e);
            }

Expected Behavior

I expect this error not to occour and the region to be saved.

Reproduction Steps

  1. Install WorldGuard and execute the mentioned code. This error does occour sporadically.

Optional WorldGuard-Report

No response

Anything Else?

No response

@MarvinKlar MarvinKlar added status:pending Pending acceptance or closure. type:bug Incorrect behavior, not working as intended labels Dec 17, 2023
@Joo200
Copy link
Collaborator

Joo200 commented Dec 17, 2023

You shouldn't save the regions yourself. WorldGuard already performs the save process periodically in an async thread. You shouldn't do that in your sync thread. Just add the region to the regionContainer and you're done.

@wizjany wizjany added status:invalid This does not describe a request or bug with WorldGuard and removed status:pending Pending acceptance or closure. labels Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:invalid This does not describe a request or bug with WorldGuard type:bug Incorrect behavior, not working as intended
Projects
None yet
Development

No branches or pull requests

3 participants