Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matches#lambda$isTerritoryEnemyAndNotUnownedWater$140:1213 - java.lang.NullPointerException #12846

Open
tripleabuilderbot opened this issue Aug 20, 2024 · 11 comments
Assignees
Labels
2.6 Error Report Issue reported via the in-game error reporter Help Needed

Comments

@tripleabuilderbot
Copy link
Contributor

Map

d-day2_fix / D-Day 2 fix

TripleA Version

2.6.14780

Java Version

11.0.19

Operating System

Windows 10

Heap Size

2028M

Stack Trace

Exception: java.lang.NullPointerException 
java.lang.Exception
	at games.strategy.triplea.delegate.Matches.lambda$isTerritoryEnemyAndNotUnownedWater$140(Matches.java:1213)
	at java.base/java.util.function.Predicate.lambda$and$0(Predicate.java:69)
	at java.base/java.util.function.Predicate.lambda$or$2(Predicate.java:101)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at org.triplea.java.collections.CollectionUtils.getMatches(CollectionUtils.java:71)
	at games.strategy.triplea.delegate.battle.BattleDelegate.setupUnitsInSameTerritoryBattles(BattleDelegate.java:423)
	at games.strategy.triplea.delegate.battle.BattleDelegate.doInitialize(BattleDelegate.java:205)
	at games.strategy.triplea.delegate.battle.BattleDelegate.start(BattleDelegate.java:87)
	at games.strategy.engine.framework.ServerGame.startStep(ServerGame.java:585)
	at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:445)
	at games.strategy.engine.framework.ServerGame.runNextStep(ServerGame.java:347)
	at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:314)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:92)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.lambda$launch$0(LocalLauncher.java:60)
	at java.base/java.lang.Thread.run(Thread.java:829)


@tripleabuilderbot tripleabuilderbot added 2.6 Error Report Issue reported via the in-game error reporter labels Aug 20, 2024
@VictoryFirst2
Copy link
Contributor

I figured out the issue... "player" was spelled as "plater"....

@beelee1
Copy link
Contributor

beelee1 commented Aug 20, 2024

You should close issue :)

@VictoryFirst2
Copy link
Contributor

You should close issue :)

Lol, how do I do that

@frigoref
Copy link
Member

@VictoryFirst2 Where did you misspell "player" as "plater"? Maybe the system should rather have checked that instead of giving a NullPointerException.

@VictoryFirst2
Copy link
Contributor

@frigoref I misspelled it in the sequence.
...

...

@VictoryFirst2
Copy link
Contributor

No description provided.

@VictoryFirst2
Copy link
Contributor

Lol not sure why I can't post the code line but it was for "step". It was a combat move step for the player "AlliedBombers" and spelled plater="AlliedBombers".

@VictoryFirst2
Copy link
Contributor

@frigoref
image

@beelee1
Copy link
Contributor

beelee1 commented Aug 21, 2024

@VictoryFirst2 it won't let you close it ? I thought if you made the issue then you could. Maybe not. Well it's closing time now lol

@beelee1 beelee1 closed this as completed Aug 21, 2024
@frigoref frigoref reopened this Aug 24, 2024
@frigoref
Copy link
Member

@DanVanAtta Shouldn't that be covered in GameParser or GameParsingValidation?

@asvitkine
Copy link
Contributor

+1 to add that validation at parse time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.6 Error Report Issue reported via the in-game error reporter Help Needed
Projects
None yet
Development

No branches or pull requests

5 participants