I got an exception again!:
java.lang.NullPointerException
at greenfoot.ActorSet.getActorNode(ActorSet.java:127)
at greenfoot.ActorSet.contains(ActorSet.java:92)
at greenfoot.ActorSet.add(ActorSet.java:52)
at greenfoot.TreeActorSet.add(TreeActorSet.java:172)
at greenfoot.World.addObject(World.java:399)
at HighscoresWorld.createUI(HighscoresWorld.java:27)
at HighscoresWorld.<init>(HighscoresWorld.java:19)
at MainMenu.buttonClicked(MainMenu.java:45)
at Button.act(Button.java:111)
at greenfoot.core.Simulation.actActor(Simulation.java:565)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
at greenfoot.core.Simulation.runContent(Simulation.java:213)
at greenfoot.core.Simulation.run(Simulation.java:203)
to the second error, could I see HighscoresWorld`?
to the first, copy the project.greenfoot file from an other project.
That is not the error: I only got the error once.
Why? You can't fix it, can you? And I can't find a non instanciated object in all of my classes, and you can even tell from these lines:
at greenfoot.ActorSet.getActorNode(ActorSet.java:127) at greenfoot.ActorSet.contains(ActorSet.java:92) at greenfoot.ActorSet.add(ActorSet.java:52) at greenfoot.TreeActorSet.add(TreeActorSet.java:172)
that's is probably a greenfoot bug.
What is line 19 of your HighscoresWorld code?
Hmm, I can't immediately see how you could get these errors (though it is clearly a bug in Greenfoot). Is there anything strange or advanced that you are doing in your scenario that you think might be related? I wonder if there is some bug to do with changing world and trying to have an actor in multiple worlds. Are you using multiple worlds in your scenario? If you're willing, you can upload the scenario to the site for us to have a look, or email it to us at support@greenfoot.org.
I can see how the first one might happen (and I've added a check to prevent it), the other one though should be pretty much impossible. SPower, are you messing with threads by any chance?
@davmac Yes, I think that's the error, sorry for that.
I'm so sorry greenfoot team: this time I got an exception, and I wasn't messing with threads:
java.lang.NullPointerException
at greenfoot.WorldVisitor.startSequence(WorldVisitor.java:73)
at greenfoot.core.WorldHandler.startSequence(WorldHandler.java:873)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:491)
at greenfoot.core.Simulation.runContent(Simulation.java:213)
at greenfoot.core.Simulation.run(Simulation.java:203)
I don't want to tease you: I just want to help
That's the same stack trace as you reported initially, and I've already found and fixed the bug that I think caused it (see my comment above).
O, sorry. I thought it was another :)