Race condition in coil activation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing Unity's Player.Start, CoilPlayer.OnStart, CoilPlayer.HandleCoilEvent, and IGameLogicEngine.OnCoilChanged, then reproduce the table script and "Pulse Coil" sequence. Done means the ball spawns reliably regardless of the order in which the relevant startup methods run.
Written by the indexing model from the issue text.
Description
Problem
This script has no effect:
This script causes the ball to spawn:
Cause
What should happen is:
Player.Startis called by UnityCoilPlayer.OnStartis calledCoilPlayer.HandleCoilEventis added as a callback toIGameLogicEngine.OnCoilChanged- The table script starts running and the "Pulse Coil" node is executed
- The ball spawns
The problem is that the table script starts running before Player.Start is called and nothing happens because CoilPlayer.HandleCoilEvent does not yet observe IGameLogicEngine.OnCoilChanged. This might be non-deterministic as well because the order of in which Start is called on MonoBehaviours is. Not sure how it is in Visual Scripting.
- Dominant language
- C#
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from VisualPinball/VisualPinball.Unity.VisualScripting
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in VisualPinball/VisualPinball.Unity.VisualScripting
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·