Loading a world and getting errors

Discussion in 'Plugin Development' started by chriztopia, Feb 19, 2013.

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

    chriztopia

    Code:
    //Load World
    String world = "banana";
    WorldCreator creator = new WorldCreator(world);
    creator.createWorld();
    I have been using this code to load worlds until 1.4.7 R1.0 come out now when the server reloads and sometimes even with no reload. the server will crash and report this error.

    http://pastebin.com/V4az2dnH

    Has the code changed to load a world or is my world broken?
     
  2. Offline

    Nitnelave

    Hmmm... I think the problem is that you're allocating too much memory in local variables, taking all the stack space ( thus the stackoverflow error). You could try doing it without keeping a reference to the world, if it is possible, ie new WorldCreator(world).createWorld();
    Or maybe you would have to declare that as an object attribute, and not a local variable, I'm not sure.
    Do some research on stack space and java, that might help you.
     
  3. Offline

    Splated

    You may want to add a check if the world is already loaded before you make it, if you use reload that world will still be loaded.
     
Thread Status:
Not open for further replies.

Share This Page