Skip to content

Custom OpMode Registration Concurrency Issues #384

Answered by lizlooney
tom-ricci asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the issue report.

The problem occurs because some code in SDK iterates through a set of methods that have the OpModeRegistrar annotation, calling each one. When it calls your method, your method calls ClassManagerFactory.processAllClasses(), which causes the SDK code to re-populate the set of OpModeRegistrar methods. I will try to fix this in the SDK by iterating on a copy of the set.

In the meantime, you should remove the call to ClassManagerFactory.processAllClasses() from your registerOperationModes method.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@tom-ricci
Comment options

@NoahAndrews
Comment options

@tom-ricci
Comment options

@tom-ricci
Comment options

@NoahAndrews
Comment options

Answer selected by tom-ricci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants