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

Fix filters invalidating players from other matches #1455

Merged
merged 2 commits into from
Dec 7, 2024
Merged

Conversation

Pablete1234
Copy link
Member

@Pablete1234 Pablete1234 commented Dec 7, 2024

Hopefully this fixes the NPE of:

java.lang.NullPointerException: state
	at tc.oc.pgm.util.Assert.assertNotNull(Assert.java:19) ~[?:?]
	at tc.oc.pgm.features.MatchFeatureContext.getState(MatchFeatureContext.java:33) ~[?:?]
	at tc.oc.pgm.api.filter.query.MatchQuery.state(MatchQuery.java:30) ~[?:?]
	at tc.oc.pgm.filters.matcher.match.PulseFilter.matches(PulseFilter.java:37) ~[?:?]
	at tc.oc.pgm.filters.matcher.match.PulseFilter.matches(PulseFilter.java:18) ~[?:?]
	at tc.oc.pgm.filters.matcher.TypedFilter.queryTyped(TypedFilter.java:13) ~[?:?]
	at tc.oc.pgm.filters.matcher.WeakTypedFilter.query(WeakTypedFilter.java:21) ~[?:?]
	at tc.oc.pgm.api.filter.Filter.response(Filter.java:37) ~[?:?]
	at tc.oc.pgm.filters.XMLFilterReference.response(XMLFilterReference.java:29) ~[?:?]
	at tc.oc.pgm.filters.FilterMatchModule.lambda$check$8(FilterMatchModule.java:326) ~[?:?]
	at java.util.Map.forEach(Map.java:733) ~[?:?]
	at tc.oc.pgm.filters.FilterMatchModule.lambda$check$9(FilterMatchModule.java:314) ~[?:?]
	at java.util.Map.forEach(Map.java:733) ~[?:?]
	at tc.oc.pgm.filters.FilterMatchModule.check(FilterMatchModule.java:311) ~[?:?]
	at tc.oc.pgm.filters.FilterMatchModule.lambda$tick$10(FilterMatchModule.java:372) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at tc.oc.pgm.filters.FilterMatchModule.tick(FilterMatchModule.java:372) ~[?:?]
	at tc.oc.pgm.filters.FilterMatchModule.tick(FilterMatchModule.java:356) ~[?:?]
	at tc.oc.pgm.match.MatchImpl$TickableTask.run(MatchImpl.java:757) ~[?:?]

Also adds the match id to failures to run a ticking task, and gets rid of a remove that was never doing anything, as that Map has scope as key, not runnable (so it was doing nothing, no behavior change) and i don't think we should stop any tickable that throws an exception, as that can break pgm even more (ie: a single error checking filters means no more dynamic filters for the rest of the match)

@Pablete1234 Pablete1234 merged commit a3eefc9 into dev Dec 7, 2024
2 checks passed
@Pablete1234 Pablete1234 deleted the fix-state-npe branch December 7, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants