When setting up the condition for the "same sector", the server will fire a nullpointer exception on any sector change.
Rule set:
In XML:
<RuleSets version="0"> <RuleSet id="Testing" version="0"> <Rule alltrue="false" id="NearHome" version="0"> <Conditions> <Condition type="32" version="0"> <!--SEG_SAME_SECTOR_CONTAINS--> <Type>2</Type> <Amount>1</Amount> <Relationship>2</Relationship> <SectorX>0</SectorX> <SectorY>0</SectorY> <SectorZ>0</SectorZ> <MoreThan>true</MoreThan> </Condition> </Conditions> <Actions> <Action type="4" version="0"> <!--SEG_POPUP_MESSAGE--> <TriggerMessage>Ruletest: Arrived near friendly station</TriggerMessage> <TriggerMsgType>0</TriggerMsgType> <UntriggerMessage>Ruletest: Left friendly station</UntriggerMessage> <UntriggerMsgType>0</UntriggerMsgType> </Action> </Actions> </Rule> </RuleSet> </RuleSets>
Errormessage:
[2019-01-24 11:36:30] CHEKCING ALL RULES FOR SERVER [2019-01-24 11:36:30] java.lang.NullPointerException [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.conditions.seg.SegmentControllerSameSectorContainsCondition.processCondition(SourceFile:79) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.conditions.seg.SegmentControllerSameSectorContainsCondition.processCondition(SourceFile:25) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.conditions.Condition.checkSatisfied(SourceFile:62) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.Rule.process(SourceFile:388) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.RuleEntityManager.checkRules(SourceFile:182) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.RuleEntityManager.checkAllRules(SourceFile:186) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.RuleEntityManager.onRulesChanged(SourceFile:167) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.RuleEntityManager.update(SourceFile:213) [2019-01-24 11:36:30] at org.schema.game.common.data.world.SimpleTransformableSendableObject.updateLocal(SourceFile:1469) [2019-01-24 11:36:30] at obfuscated.arT.updateLocal(SourceFile:2879) [2019-01-24 11:36:30] at obfuscated.ask.updateLocal(SourceFile:398) [2019-01-24 11:36:30] at org.schema.game.common.controller.EditableSendableSegmentController.updateLocal(SourceFile:1099) [2019-01-24 11:36:30] at obfuscated.arg.updateLocal(SourceFile:199) [2019-01-24 11:36:30] at org.schema.game.server.controller.GameServerController.update(SourceFile:1401) [2019-01-24 11:36:30] at org.schema.schine.network.server.ServerController.run(SourceFile:275) [2019-01-24 11:36:30] at java.lang.Thread.run(Thread.java:745) [2019-01-24 11:36:30] [SERVER] Exception catched [2019-01-24 11:36:30] GET GLOBAL RULES {testing=>org.schema.game.common.controller.rules.RuleProperty@2f8316f0, large objects=>org.schema.game.common.controller.rules.RuleProperty@61cee925, disable thrust=>org.schema.game.common.controller.rules.RuleProperty@5f520369, manual track=>org.schema.game.common.controller.rules.RuleProperty@3bb668ef, many docks=>org.schema.game.common.controller.rules.RuleProperty@cb5ddff}; 3 [2019-01-24 11:36:30] Server(0); Asteroid(3794)sec[3793](!) ON RULE CHANGED: [[org.schema.game.common.controller.rules.rules.Rule@31600166], [org.schema.game.common.controller.rules.rules.Rule@c1f448c1, org.schema.game.common.controller.rules.rules.Rule@80f1ad26], [org.schema.game.common.controller.rules.rules.Rule@29ae4582, org.schema.game.common.controller.rules.rules.Rule@7a545a51, org.schema.game.common.controller.rules.rules.Rule@dde548a3]] [2019-01-24 11:36:30] Server(0) Asteroid(3794)sec[3793](!) [ONRULECHANGE] INDIVIDUAL RULES 0; MAP: {} [2019-01-24 11:36:30] Server(0) Asteroid(3794)sec[3793](!) [ONRULECHANGE] RESULT: TOTAL: 6; globalSets: 3; individualSets: 0; [2019-01-24 11:36:30] CHEKCING ALL RULES FOR SERVER [2019-01-24 11:36:30] java.lang.NullPointerException [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.conditions.seg.SegmentControllerSameSectorContainsCondition.processCondition(SourceFile:79) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.conditions.seg.SegmentControllerSameSectorContainsCondition.processCondition(SourceFile:25) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.conditions.Condition.checkSatisfied(SourceFile:62) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.Rule.process(SourceFile:388) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.RuleEntityManager.checkRules(SourceFile:182) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.RuleEntityManager.checkAllRules(SourceFile:186) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.RuleEntityManager.onRulesChanged(SourceFile:167) [2019-01-24 11:36:30] at org.schema.game.common.controller.rules.rules.RuleEntityManager.update(SourceFile:213) [2019-01-24 11:36:30] at org.schema.game.common.data.world.SimpleTransformableSendableObject.updateLocal(SourceFile:1469) [2019-01-24 11:36:30] at obfuscated.arT.updateLocal(SourceFile:2879) [2019-01-24 11:36:30] at obfuscated.ask.updateLocal(SourceFile:398) [2019-01-24 11:36:30] at org.schema.game.common.controller.EditableSendableSegmentController.updateLocal(SourceFile:1099) [2019-01-24 11:36:30] at obfuscated.arg.updateLocal(SourceFile:199) [2019-01-24 11:36:30] at org.schema.game.server.controller.GameServerController.update(SourceFile:1401) [2019-01-24 11:36:30] at org.schema.schine.network.server.ServerController.run(SourceFile:275) [2019-01-24 11:36:30] at java.lang.Thread.run(Thread.java:745) [2019-01-24 11:36:30] [SERVER] Exception catched