Page 1 of 1
error with autospawnhandler and cabal npc
Posted: Sat Jul 10, 2010 4:53 pm
by darknessneo
L2J Revision
Number:4330
L2JDP Revision
Number:7279
hello, here is a prob with seven sign npc:

its same code for alls cabal npc...
Re: error with autospawnhandler and cabal npc
Posted: Thu Jul 15, 2010 12:15 am
by darknessneo
i try a little up
Re: error with autospawnhandler and cabal npc
Posted: Thu Jul 15, 2010 12:38 am
by hope
you spawned 31094 dont spawn this npc it auto spawns when it should
Re: error with autospawnhandler and cabal npc
Posted: Thu Jul 15, 2010 12:40 pm
by darknessneo
nah, i dont spawned this npc, when seven sign ended all orator spwn in town. but they dont spawn in my server, i have this error.
Re: error with autospawnhandler and cabal npc
Posted: Thu Jul 15, 2010 1:09 pm
by janiii
you used the admin command //respawnall or //spawn_reload . just dont do it

respawning the npcs can ruin the quests or other scripts.
or try this patch for the exception:
Code: Select all
Index: java/com/l2jserver/gameserver/model/AutoSpawnHandler.java===================================================================--- java/com/l2jserver/gameserver/model/AutoSpawnHandler.java (revision 4223)+++ java/com/l2jserver/gameserver/model/AutoSpawnHandler.java (working copy)@@ -73,16 +73,13 @@ private static final int DEFAULT_RESPAWN = 3600000; // 1 hour in millisecs private static final int DEFAULT_DESPAWN = 3600000; // 1 hour in millisecs - protected Map<Integer, AutoSpawnInstance> _registeredSpawns;- protected Map<Integer, ScheduledFuture<?>> _runningSpawns;+ protected Map<Integer, AutoSpawnInstance> _registeredSpawns = new FastMap<Integer, AutoSpawnInstance>();+ protected Map<Integer, ScheduledFuture<?>> _runningSpawns = new FastMap<Integer, ScheduledFuture<?>>(); protected boolean _activeState = true; private AutoSpawnHandler() {- _registeredSpawns = new FastMap<Integer, AutoSpawnInstance>();- _runningSpawns = new FastMap<Integer, ScheduledFuture<?>>();- restoreSpawnData(); } @@ -98,12 +95,6 @@ public void reload() {- // stop all timers- for (ScheduledFuture<?> sf : _runningSpawns.values())- {- if (sf != null)- sf.cancel(true);- } // unregister all registered spawns for (AutoSpawnInstance asi : _registeredSpawns.values()) {@@ -111,10 +102,17 @@ this.removeSpawn(asi); } - // create clean list- _registeredSpawns = new FastMap<Integer, AutoSpawnInstance>();- _runningSpawns = new FastMap<Integer, ScheduledFuture<?>>();+ // stop all timers+ for (ScheduledFuture<?> sf : _runningSpawns.values())+ {+ if (sf != null)+ sf.cancel(true);+ } + // clean list+ _registeredSpawns.clear();+ _runningSpawns.clear();+ // load restoreSpawnData(); }@@ -256,7 +254,8 @@ // Cancel the currently associated running scheduled task. ScheduledFuture<?> respawnTask = _runningSpawns.remove(spawnInst._objectId);- respawnTask.cancel(false);+ if (respawnTask != null)+ respawnTask.cancel(false); if (Config.DEBUG) _log.info("AutoSpawnHandler: Removed auto spawn for NPC ID " + spawnInst._npcId + " (Object ID = " + spawnInst._objectId
Re: error with autospawnhandler and cabal npc
Posted: Fri Jul 16, 2010 12:01 am
by darknessneo
well, if i use reload npc, what this script make exactly? this command try to spawn cabal npc? If a don't use it, they spawn correctly in the next end of seven sign?
i added your patch, no more error now, but just :
AutoSpawnHandler: No spawn registered for object ID = 268479993
AutoSpawnHandler: No spawn registered for object ID = 268479994
AutoSpawnHandler: No spawn registered for object ID = 268479995
AutoSpawnHandler: No spawn registered for object ID = 268479992
AutoSpawnHandler: No spawn registered for object ID = 268479996
but thx for your patch.
Re: error with autospawnhandler and cabal npc
Posted: Fri Jul 16, 2010 12:22 am
by hope
dont use that command on a live server it will mess it all up
Re: error with autospawnhandler and cabal npc
Posted: Fri Jul 16, 2010 7:52 pm
by darknessneo
i need to reset all npc spawn or all come to normal in somes days?
Re: error with autospawnhandler and cabal npc
Posted: Fri Jul 16, 2010 11:30 pm
by hope
restart server
Re: error with autospawnhandler and cabal npc
Posted: Sun Feb 27, 2011 12:02 am
by gremlin
I have this error on my server, I put the janii's patch but when Spawns the night skip the error and makes all the scripts stops working and end up falling off the server
In error.log i have this:
Code: Select all
Feb 26, 2011 11:22:53 PM com.l2jserver.gameserver.model.AutoSpawnHandler$AutoDespawner runWARNING: AutoSpawnHandler: An error occurred while despawning spawn (Object ID = 268482332): 0java.lang.ArrayIndexOutOfBoundsException: 0 at javolution.util.FastCollection.toArray(FastCollection.java:383) at com.l2jserver.gameserver.model.AutoSpawnHandler$AutoSpawnInstance.getNPCInstanceList(AutoSpawnHandler.java:706) at com.l2jserver.gameserver.model.AutoSpawnHandler$AutoDespawner.run(AutoSpawnHandler.java:587) at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:86) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636)
and then I get very many of these
Code: Select all
Feb 26, 2011 11:23:04 PM com.l2jserver.gameserver.model.AutoSpawnHandler$AutoDespawner runWARNING: AutoSpawnHandler: An error occurred while despawning spawn (Object ID = 268482332): nulljava.lang.ArrayIndexOutOfBoundsException
Please help