L2JMobius

High Five characters returning to level 1 during the up

Susuy · 6 · 2611

Offline Susuy

  • Heir
  • **
    • Posts: 32
most of the time the problem happens when the player is in the antharas lair region, after killing the monster the player goes back to level 1 losing all skills

Code: [Select]
Mar 29, 2022 10:11:12 AM org.l2jmobius.commons.network.codecs.PacketEncoder encode
WARNING: Failed sending Packet(org.l2jmobius.gameserver.network.serverpackets.UserInfo@50e734ab)
java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "java.util.Map.get(Object)" is null
at org.l2jmobius.gameserver.data.xml.ExperienceData.getExpForLevel(ExperienceData.java:82)
at org.l2jmobius.gameserver.network.serverpackets.UserInfo.write(UserInfo.java:87)
at org.l2jmobius.commons.network.codecs.PacketEncoder.encode(PacketEncoder.java:51)
at org.l2jmobius.commons.network.codecs.PacketEncoder.encode(PacketEncoder.java:33)
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)
at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1071)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)

after this message comes others showing more null returns and the server crashes. this has happened 4 times

Erro.log: https://www.mediafire.com/file/7dx4t9ne66xu7xw/error1.pdf/file


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16056
Do you have any modifications?
Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/data/xml/ExperienceData.java
===================================================================
--- java/org/l2jmobius/gameserver/data/xml/ExperienceData.java (revision 9990)
+++ java/org/l2jmobius/gameserver/data/xml/ExperienceData.java (working copy)
@@ -79,7 +79,22 @@
  */
  public long getExpForLevel(int level)
  {
- return _expTable.get(level);
+ if (level <= 0)
+ {
+ LOGGER.warning(getClass().getSimpleName() + ": Requested exp for level " + level);
+ Thread.dumpStack();
+ return 0;
+ }
+
+ final Long exp = _expTable.get(level);
+ if (exp == null)
+ {
+ LOGGER.warning(getClass().getSimpleName() + ": Requested exp for level " + level);
+ Thread.dumpStack();
+ return _expTable.get((int) MAX_LEVEL);
+ }
+
+ return exp.longValue();
  }
 
  /**


Offline Susuy

  • Heir
  • **
    • Posts: 32
I have some but they are all in the datapack, they are custom items. I already applied the diff, I'll put it online to test thanks



Offline Susuy

  • Heir
  • **
    • Posts: 32
Sorry for the delay, so far the problem has not been repeated. overflow, as few times waiting in all these months can take a while. ate now the player did not complain again.