Jump to content
  • 0

Help please with "NullPointerException" in gameserver error.


Question

Posted (edited)
[19:00:00]  INFO CastleSiegeEvent: Undefined objects: bought_zones
[19:00:00]  INFO ActionWrapper: Exception: java.lang.NullPointerException; name: 5_aden_castle
java.lang.NullPointerException
        at java.util.concurrent.ConcurrentHashMap.get(Unknown Source)
        at l2.gameserver.instancemanager.SpawnManager.getSpawners(SpawnManager.java:263)
        at l2.gameserver.model.entity.events.impl.CastleSiegeEvent.spawnRewardMonsters(CastleSiegeEvent.java:719)
        at l2.gameserver.model.entity.events.impl.CastleSiegeEvent.stopEvent(CastleSiegeEvent.java:464)
        at l2.gameserver.model.entity.events.impl.SiegeEvent.stopEvent(SiegeEvent.java:114)
        at l2.gameserver.model.entity.events.GlobalEvent.action(GlobalEvent.java:367)
        at l2.gameserver.model.entity.events.impl.SiegeEvent.action(SiegeEvent.java:512)
        at l2.gameserver.model.entity.events.impl.CastleSiegeEvent.action(CastleSiegeEvent.java:330)
        at l2.gameserver.model.entity.events.actions.StartStopAction.call(StartStopAction.java:26)
        at l2.gameserver.model.entity.events.GlobalEvent.callActions(GlobalEvent.java:140)
        at l2.gameserver.model.entity.events.GlobalEvent.timeActions(GlobalEvent.java:192)
        at l2.gameserver.model.entity.events.EventWrapper.runImpl0(EventWrapper.java:24)
        at l2.gameserver.taskmanager.actionrunner.ActionWrapper.runImpl(ActionWrapper.java:47)
        at l2.commons.threading.RunnableImpl.run(RunnableImpl.java:21)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

I got this error in gameserver log. Help me please solve this problem

Edited by Vision

2 answers to this question

Recommended Posts

  • 0
Posted (edited)
41 minutes ago, `Son said:

Show us source code SpawnManager.java line 220 - 280

        if (Config.ALLOW_GMSHOP)
            spawn("[gm_shop]");
        if (Config.ALLOW_AUCTIONER)
            spawn("[auctioner]");
        if (Config.ALLOW_GLOBAL_SERVICES)
            spawn("[global_services]");
        if (Config.ALLOW_PVP_EVENT_MANAGER)
            spawn("[pvp_event_manager]");
        if (Config.ALLOW_TREASURE_BOX)
            spawn("[treasure_box]");
        if (Config.SERVICES_ALLOW_LOTTERY)
            spawn("[lotto_manager]");
        if (!Config.ALLOW_CLASS_MASTERS_LIST.isEmpty())
            spawn("class_master");
    }

    public void spawn(String group) {
        List<Spawner> spawnerList = getSpawners(group);
        if (spawnerList == null) {
            return;
        }

        int npcSpawnCount = 0;

        for (Spawner spawner : spawnerList) {
            npcSpawnCount += spawner.init();

            if (npcSpawnCount % 1000 == 0 && npcSpawnCount != 0)
                _log.info("SpawnManager: spawned " + npcSpawnCount + " npc for group: " + group);
        }
        _log.info("SpawnManager: spawned " + npcSpawnCount + " npc; spawns: " + spawnerList.size() + "; group: " + group);
    }

    public void despawn(String group) {
        List<Spawner> spawnerList = _spawns.get(group);
        if (spawnerList == null)
            return;

        for (Spawner spawner : spawnerList)
            spawner.deleteAll();
    }

    public List<Spawner> getSpawners(String group) {
        List<Spawner> list = _spawns.get(group);
        return list == null ? Collections.<Spawner>emptyList() : list;
    }

    public void reloadAll() {
        RaidBossSpawnManager.getInstance().cleanUp();
        for (List<Spawner> spawnerList : _spawns.values())
            for (Spawner spawner : spawnerList)
                spawner.deleteAll();

        RaidBossSpawnManager.getInstance().reloadBosses();

        spawnAll();

        //FIXME [VISTALL] придумать другой способ
        if (SevenSigns.getInstance().getCurrentPeriod() == SevenSigns.PERIOD_SEAL_VALIDATION)
            SevenSigns.getInstance().getCabalHighestScore();

 

Edited by LinIeIage

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..