Reduce SIGSEGVs in tests that use ProvideUniqueNetworkTableInstance - #142
Merged
Conversation
kcooney
force-pushed
the
kcooney/preferences-test-same-thread
branch
from
February 14, 2026 17:36
c3db601 to
eef02b0
Compare
kcooney
force-pushed
the
kcooney/preferences-test-same-thread
branch
2 times, most recently
from
February 14, 2026 23:12
7a5035f to
7ce0852
Compare
kcooney
force-pushed
the
kcooney/preferences-test-same-thread
branch
5 times, most recently
from
February 15, 2026 01:49
418fccf to
7a5035f
Compare
kcooney
force-pushed
the
kcooney/preferences-test-same-thread
branch
2 times, most recently
from
February 15, 2026 02:14
370e86d to
6e41a0a
Compare
I noticed the WPILib Preferences test uses this annotation, so trying it out to see if it reduces the crashes in the test runs.
kcooney
force-pushed
the
kcooney/preferences-test-same-thread
branch
from
February 15, 2026 23:36
de7d741 to
9eecb37
Compare
kcooney
force-pushed
the
kcooney/preferences-test-same-thread
branch
from
February 15, 2026 23:41
9eecb37 to
52f22e8
Compare
cuttestkittensrule
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes seem to eliminate the SIGSEGV failures in tests that
use
@ProvideUniqueNetworkTableInstanceand passreplacePreferencesNetworkTable=true.ProvideUniqueNetworkTableInstanceExtensionto drain thelistener queue before calling
setNetworkTableInstance()(thisseems to resolve the
SIGSEGVissue)NetworkTableInstance.startLocal()(the WPILib Java testscall
startServer(), which seems unnecessary; callingstartLocal()instead seems reasonable)removePreferencesListener()(it didn't seem to help)PersistedConfigurationTestwith@Execution(SAME_THREAD)(this is a no-op, as tests are not run in parallel, but seems like a
good idea)
ProvideUniqueNetworkTableInstanceExtensionto fail the testif tests are run in parallel and
replacePreferencesNetworkTableistrue