Kamaloka | EventReflectionMobInstance.onDeath error

MrTitan

Knight
Customer
I get this error in my console and I can't understand what it cause it. I know its from kamaloka but I I do not know what exactly cause it. Any ideas?
P.S - I go multiply times to kamaloka but I can not replicate this error, but somehow the players make this error to show.


JavaScript:
[08:49:23] ERROR
java.lang.NullPointerException: Cannot invoke "l2.gameserver.model.Creature.getReflection()" because "<parameter1>" is null
        at npc.model.EventReflectionMobInstance.onDeath(Unknown Source)
        at l2.gameserver.model.Creature.doDie(Unknown Source)
        at l2.gameserver.skills.skillclasses.MDam.useSkill(Unknown Source)
        at l2.gameserver.model.Creature.callSkill(Unknown Source)
        at l2.gameserver.model.Creature.onMagicUseTimer(Unknown Source)
        at l2.gameserver.model.GameObjectTasks$MagicUseTask.runImpl(Unknown Source)
        at l2.commons.threading.RunnableImpl.run(Unknown Source)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:842)

Kamaloka code

JavaScript:
<!DOCTYPE list SYSTEM "instances.dtd">
<list>
    <instance id="72" name="Kamaloka, Hall of the Abyss" maxChannels="3" collapseIfEmpty="1" timelimit="15" dispelBuffs="false">
        <collapse on-party-dismiss="true" timer="10"/>
        <level min="83" max="92"/>
        <party min="2" max="6"/>
        <return loc="43219 188471 -3488"/>
        <teleport loc="180056 -88968 -7216"/>
        <geodata map="25_15"/>
        <remove itemId="16101" count="50" necessary="true"/>
        <give itemId="0" count="0"/>
        <quest id="0"/>
        <add_parameters><param name="ipLimit" value="true"/></add_parameters>
        <reuse resetReuse="30 6 * * *" setUponEntry="false" sharedReuseGroup="1"/> <!-- Instance reuse at 6:30 every day -->
        <spawns>
            <spawn mobId="25657" type="point"><!-- raid 1 -->
                <coords loc="180375 -88984 -7216"/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180204 -88512 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180227 -88617 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180313 -88705 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180439 -88650 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180529 -88522 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180723 -88590 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180859 -88769 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180532 -89262 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180399 -89416 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180218 -89332 -7216 "/>
            </spawn>
<!-- end -->
            <spawn mobId="25658" type="point"><!-- raid 2 -->
                <coords loc="182168 -88968 -7216"/>
            </spawn>
            <!-- mobs -->
            <spawn mobId="48291" type="point">
                <coords loc="181956 -88651 -7216 13028" />
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182088 -88658 -7216 64238" />
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182423 -88564 -7216 1039" />
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182691 -88779 -7216 58038" />
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182633 -89321 -7216 45574" />
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182263 -89348 -7216 28799" />
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="181784 -89287 -7216 29412" />
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="181875 -89007 -7216 24575" />
            </spawn>
            <spawn mobId="25659" type="point"><!-- raid 3 -->
                <coords loc="183911 -88969 -7216 "/>
            </spawn>
        </spawns>
        <doors>
            <door id="25150001" opened="false"/>
            <door id="25150002" opened="false"/>
            <door id="25150003" opened="false"/>
            <door id="25150004" opened="false"/>
        </doors>
    </instance>
</list>
 
The NullPointerException error you are encountering is likely caused by incorrect configuration of the spawns in the XML file, especially due to incorrect coordinates with four parameters.
By correcting these coordinates and ensuring that all elements of the XML are consistent with the DTD and the system you are using, you should be able to resolve the problem.


CSS:
before:
 
<spawn mobId="48291" type="point">
                    <coords loc="181875 -89007 -7216 24575" />
            </spawn>

after:

 <spawn mobId="48291" type="point">
                    <coords loc="181875 -89007 -7216" />
            </spawn>
 
The NullPointerException error you are encountering is likely caused by incorrect configuration of the spawns in the XML file, especially due to incorrect coordinates with four parameters.
By correcting these coordinates and ensuring that all elements of the XML are consistent with the DTD and the system you are using, you should be able to resolve the problem.


CSS:
before:
 
<spawn mobId="48291" type="point">
                    <coords loc="181875 -89007 -7216 24575" />
            </spawn>

after:

 <spawn mobId="48291" type="point">
                    <coords loc="181875 -89007 -7216" />
            </spawn>
Sadly this not solve the problem.

JavaScript:
[02:05:39] ERROR
java.lang.NullPointerException: Cannot invoke "l2.gameserver.model.Creature.getReflection()" because "<parameter1>" is null
        at npc.model.EventReflectionMobInstance.onDeath(Unknown Source)
        at l2.gameserver.model.Creature.doDie(Unknown Source)
        at l2.gameserver.skills.skillclasses.MDam.useSkill(Unknown Source)
        at l2.gameserver.model.Creature.callSkill(Unknown Source)
        at l2.gameserver.model.Creature.onMagicUseTimer(Unknown Source)
        at l2.gameserver.model.GameObjectTasks$MagicUseTask.runImpl(Unknown Source)
        at l2.commons.threading.RunnableImpl.run(Unknown Source)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:842)
[02:07:21] ERROR

here is the whole setup for kamaloka

JavaScript:
<!DOCTYPE list SYSTEM "instances.dtd">
<list>
    <instance id="72" name="Kamaloka, Hall of the Abyss" maxChannels="3" collapseIfEmpty="1" timelimit="15" dispelBuffs="false">
        <collapse on-party-dismiss="true" timer="10"/>
        <level min="84" max="92"/>
        <party min="2" max="6"/>
        <return loc="43219 188471 -3488"/>
        <teleport loc="180056 -88968 -7216"/>
        <geodata map="25_15"/>
        <remove itemId="16101" count="100" necessary="true"/>
        <give itemId="0" count="0"/>
        <quest id="0"/>
        <add_parameters><param name="ipLimit" value="true"/></add_parameters>
        <reuse resetReuse="30 6 * * *" setUponEntry="true" sharedReuseGroup="1"/> <!-- Instance reuse at 6:30 every day -->
        <spawns>
            <spawn mobId="25657" type="point"><!-- raid 1 -->
                <coords loc="180375 -88984 -7216"/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180204 -88512 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180227 -88617 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180313 -88705 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180439 -88650 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180529 -88522 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180723 -88590 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180859 -88769 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180532 -89262 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180399 -89416 -7216 "/>
            </spawn>
            
            <spawn mobId="48290" type="point">
            <coords loc="180218 -89332 -7216 "/>
            </spawn>
<!-- end -->
            <spawn mobId="25658" type="point"><!-- raid 2 -->
                <coords loc="182168 -88968 -7216"/>
            </spawn>
            <!-- mobs -->
            <spawn mobId="48291" type="point">
                <coords loc="181956 -88651 -7216"/>
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182088 -88658 -7216"/>
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182423 -88564 -7216"/>
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182691 -88779 -7216"/>
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182633 -89321 -7216"/>
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="182263 -89348 -7216"/>
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="181784 -89287 -7216"/>
            </spawn>
            <spawn mobId="48291" type="point">
                    <coords loc="181875 -89007 -7216"/>
            </spawn>
            <spawn mobId="25659" type="point"><!-- raid 3 -->
                <coords loc="183911 -88969 -7216"/>
            </spawn>
        </spawns>
        <doors>
            <door id="25150001" opened="false"/>
            <door id="25150002" opened="false"/>
            <door id="25150003" opened="false"/>
            <door id="25150004" opened="false"/>
        </doors>
    </instance>
</list>
Code:

Also for some reason the player are able to re-enter kamaloka however they want if they change the pt leader.
I don't know how many times I've tried different configuration to the kamaloka but every time the players can enter it however they want.
 
Before:
<coords loc="180399 -89416 -7216 "/>

After:
<coords loc="180399 -89416 -7216"/>

Check if it might be from the gaps they have left.
 
Before:
<coords loc="180399 -89416 -7216 "/>

After:
<coords loc="180399 -89416 -7216"/>

Check if it might be from the gaps they have left.
Finally I have some more info. The kamaloka have issue for sure. I do not know why none reported this.

The error message indicates a NullPointerException, which means that the code is trying to access a method (getReflection()) on an object that is null.

This suggests that the issue happens when a creature (mob/NPC) dies, and the server calls its onDeath() method.

Where the Actual Error is Happening

The error log shows:
HTML:
java.lang.NullPointerException: Cannot invoke "l2.gameserver.model.Creature.getReflection()" because "<parameter1>" is null
  • This means that somewhere in the game, a Creature (NPC or player) is null and the code is trying to call getReflection() on it.
  • This is happening inside:

    HTML:
    at npc.model.EventReflectionMobInstance.onDeath(Unknown Source)at l2.gameserver.model.Creature.doDie(Unknown Source)
This code may cause the problem

JavaScript:
protected void onDeath(Creature var1) {
    if (var1 != null) {
        Player var2 = var1.getPlayer();
        if (var2 != null) {
            var2.getListeners().onKillIgnorePetOrSummon(this);
        }

        var1.getListeners().onKill(this);
        if (this.isPlayer() && var1.isPlayable()) {
            this._currentCp = 0.0;
        }
    }

For more than 2 weeks my server have this issue, I have made many changes sometimes kamaloka works normal sometimes not, I still get this error, also the players reported that when they finish the last raid they do not get any reward. But when I try to replicate this bug I always get the reward...
@Deazer can you please check?
 
Back
Top