clockworklabs / clockworklabs/SpacetimeDB

Blackholio - Race condition on force respawn

Open
#3,041 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

sometimes you get

MissingReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Transform.get_position () (at <779cc116a5954f1c9b92496e62345641>:0)
EntityController+<DespawnCoroutine>d__11.MoveNext () (at Assets/Scripts/EntityController.cs:70)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <779cc116a5954f1c9b92496e62345641>:0)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Assets/Scripts/EntityController.cs, especially DespawnCoroutine at line 70, and reproduce the force-respawn sequence in Blackholio. Trace the object lifetime around the reported MissingReferenceException; the work is done when force respawn no longer accesses a destroyed Transform and the exception cannot be reproduced.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.