Problem/bug unloading & deleting world

Discussion in 'Bukkit Help' started by biel, Aug 2, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    biel

    Hi, it's my first post to this forum.
    I write that for reporting a bug that has been annoying me last few days.
    When you unload a world with Bukkit.unloadWorld(World world, Boolean save), the region files keep locked by the server and can't be deleted from the filesystem. I write this directly here because i have read lots of threads talking about this without getting a valid solution and all points to the Bukkit API. So i think it is not a coding problem of my plugin, as this is a very general problem.
    I think the problem is that a filestream or any IO object don't calls his .close() method when unloading the world or a thing like that. (I haven't looked at Bukkit's source code, but I'm completely sure the bukkit developers know about what I'm talking)
    For solving it entirely, I suggest adding a method that unloads and deletes a world, a thing like Bukkit.deleteWorld(World world) or if you don't want to add unecessary methods, adding a parameter to unloadWorld() like: Bukkit.unloadWorld(World world, Boolean save, Boolean delete).
    I hope that get fixed soon and waiting for a feedback from the bukkit team!
     
  2. Offline

    TnT

    If you are trying this on a Windows OS, that's where your problem lies. If I remember correctly, this is an issue specific to Windows that will not affect Linux servers. Nothing Bukkit can do about it.
     
  3. Offline

    biel

    So, it's a java IO issue? (I don't believe that) If the isue comes from Bukkit, this can be fixed, no?
    Java is multiplatform so the programs written in that language should do the same in all OS or i'm wrong?

    And yes, i'm running bukkit in a Windows OS (Windows 7)
     
  4. Offline

    Jade

    The issue doesn't come from Bukkit, or we'd be able to fix it as TnT said.
     
  5. Offline

    biel

    So, where is the issue?
     
  6. Offline

    Jade

     
  7. Offline

    biel

    So, bukkit developers only design bukkit features for linux?
     
  8. Offline

    Jade

    ...
    Bukkit is NOT the problem. Java is. We've stated that twice, so I repeat, Java is the problem. Not Bukkit. End of.
     
  9. Offline

    Tagette

    I am having this issue with my plugin as well. However I am using Mac OSX 10.8. I unload the world then when I delete the folder the server freezes up. At first I thought it was because I was not giving the server enough time to unload it. So I delayed the delete by 10 seconds to make sure. I also tried to remove the world from the list. Server.getWorlds().remove(world);

    I know you have said that it's a problem within java but do you think you can be more specific? Is it actually because java is not releasing the lock? There is usually a work around.
     
Thread Status:
Not open for further replies.

Share This Page