robinjam/Ports — Issue #11: Yaw Exceptions
Author: tustin2121
Created: 2011-11-15 06:30:19+00:00
State: open

Immediately after I set up a port, I started getting the errors below whenever I walk into a defined port. Now, I know what's causing the bug - my server, for whatever reason, suffers from an on-again-off-again "direction bug", which manifests as the Yaw or Pitch of players reporting as NaN. I don't know why it happens, it causes many annoying bugs during normal gameplay, and I have no fix for it. But, the plugins I've installed thus far have gracefully handled this error, usually storing the NaN value as nothing, 0, or NaN. This is the first time I've gotten rampent stack traces because of it, and due to these errors, your plugin is unfortunately unusable.

This isn't high priority, but if it is possible, please add more graceful error handling for yaw and pitch being NaN. :/

```
[SEVERE] Could not pass event PLAYER_MOVE to Ports
javax.persistence.PersistenceException: Error loading on net.robinjam.bukkit.ports.persistence.Port.yaw
at com.avaje.ebeaninternal.server.query.SqlBeanLoad.load(SqlBeanLoad.java:132)
at com.avaje.ebeaninternal.server.deploy.BeanProperty.load(BeanProperty.java:619)
at com.avaje.ebeaninternal.server.query.SqlTreeNodeBean.load(SqlTreeNodeBean.java:276)
at com.avaje.ebeaninternal.server.query.CQuery.readRow(CQuery.java:560)
at com.avaje.ebeaninternal.server.query.CQuery.readBeanInternal(CQuery.java:594)
at com.avaje.ebeaninternal.server.query.CQuery.hasNextBean(CQuery.java:720)
at com.avaje.ebeaninternal.server.query.CQuery.readTheRows(CQuery.java:706)
at com.avaje.ebeaninternal.server.query.CQuery.readCollection(CQuery.java:673)
at com.avaje.ebeaninternal.server.query.CQueryEngine.findMany(CQueryEngine.java:204)
at com.avaje.ebeaninternal.server.query.DefaultOrmQueryEngine.findMany(DefaultOrmQueryEngine.java:104)
at com.avaje.ebeaninternal.server.core.OrmQueryRequest.findList(OrmQueryRequest.java:344)
at com.avaje.ebeaninternal.server.core.DefaultServer.findList(DefaultServer.java:1469)
at com.avaje.ebeaninternal.server.querydefn.DefaultOrmQuery.findList(DefaultOrmQuery.java:906)
at com.avaje.ebeaninternal.util.DefaultExpressionList.findList(DefaultExpressionList.java:201)
at net.robinjam.bukkit.ports.PlayerListener.onPlayerMove(PlayerListener.java:34)
at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:302)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:180)
at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:615)
at net.minecraft.server.Packet10Flying.a(SourceFile:126)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:501)
at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
Caused by: java.lang.RuntimeException: setIntercept yaw on [net.robinjam.bukkit.ports.persistence.Port] arg[null] type[net.robinjam.bukkit.ports.persistence.Port$$EntityBean$Ports] threw error
at com.avaje.ebeaninternal.server.deploy.BeanProperty.setValueIntercept(BeanProperty.java:843)
at com.avaje.ebeaninternal.server.query.SqlBeanLoad.load(SqlBeanLoad.java:122)
... 27 more
Caused by: java.lang.NullPointerException
at net.robinjam.bukkit.ports.persistence.Port$$EntityBean$Ports._ebean_setFieldIntercept(Port.java:1)
at com.avaje.ebeaninternal.server.reflect.EnhanceBeanReflect$Setter.setIntercept(EnhanceBeanReflect.java:184)
at com.avaje.ebeaninternal.server.deploy.BeanProperty.setValueIntercept(BeanProperty.java:833)
... 28 more
```