# FMOD Event Reference Updater crashes on classes with a BlobAssetReference\<Unity.Physics.Collider\> member

**URL:** <https://qa.fmod.com/t/fmod-event-reference-updater-crashes-on-classes-with-a-blobassetreference-unity-physics-collider-member/20939>\
**Category:** Unity\
**Created:** [December 1, 2023, 5:17pm UTC](https://qa.fmod.com/t/fmod-event-reference-updater-crashes-on-classes-with-a-blobassetreference-unity-physics-collider-member/20939 "2023-12-01T17:17:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gtzpower1](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@gtzpower1](https://qa.fmod.com/u/gtzpower1)\
**Post date:** [December 1, 2023, 5:17pm UTC](https://qa.fmod.com/t/fmod-event-reference-updater-crashes-on-classes-with-a-blobassetreference-unity-physics-collider-member/20939/1 "2023-12-01T17:17:20Z")

</div>

I wanted to report that the FMOD Event Reference Updater crashes if my project has a BlobAssetReference\<Unity.Physics.Collider\> member in any of the MonoBehaviours that are assigned to a game object. Here is an example behaviour that will break the updater:

```auto
using UnityEngine;
using Unity.Physics;

public class AuthoringExample : MonoBehaviour
{
    private BlobAssetReference<Unity.Physics.Collider> ecsCollider;
}

```

This requires the Unity.Physics package to be installed. Tested on Physics 1.0.16 under Unity 2022.3.7. The crash reported is:

InvalidCastException: Specified cast is not valid.  
Unity.Entities.BlobAssetReference`1[T].Equals (System.Object obj) (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/Blobs.cs:708) System.Collections.Generic.ObjectEqualityComparer`1[T].Equals (T x, T y) (at :0)  
System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at :0)  
System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value) (at :0)  
FMODUnity.EventReferenceUpdater+d\_\_45.MoveNext () (at Assets/Plugins/3rd Party/FMOD/src/Editor/EventReferenceUpdater.cs:709)  
FMODUnity.EventReferenceUpdater+d\_\_45.MoveNext () (at Assets/Plugins/3rd Party/FMOD/src/Editor/EventReferenceUpdater.cs:711)  
FMODUnity.EventReferenceUpdater+d\_\_37.MoveNext () (at Assets/Plugins/3rd Party/FMOD/src/Editor/EventReferenceUpdater.cs:363)  
FMODUnity.EventReferenceUpdater+d\_\_34.MoveNext () (at Assets/Plugins/3rd Party/FMOD/src/Editor/EventReferenceUpdater.cs:256)  
FMODUnity.EventReferenceUpdater.UpdateProcessing () (at Assets/Plugins/3rd Party/FMOD/src/Editor/EventReferenceUpdater.cs:1724)  
UnityEditor.EditorApplication.Internal\_CallUpdateFunctions () (at \<97436df440ca462884c5332c1d8ebbe7\>:0)

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [December 5, 2023, 11:40pm UTC](https://qa.fmod.com/t/fmod-event-reference-updater-crashes-on-classes-with-a-blobassetreference-unity-physics-collider-member/20939/2 "2023-12-05T23:40:24Z")

</div>

Apologies for the delayed response, and thanks for pointing this out. I’ve been able to reproduce the issue on my end, and it seems to be an issue with a null check in EventReferenceUpdater running up against the cast in equality operator in Blobs.cs, as BlobAssetReference isn’t nullable.

Unfortunately, I don’t have a workaround to offer at present, but I’ve passed this along to the development team for further investigation. If this is a blocker or significant inconvenience for you, please let me know and I’ll see what I can do.

---

<div class="post-metadata">

**Author:** ![gtzpower1](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@gtzpower1](https://qa.fmod.com/u/gtzpower1)\
**Post date:** [December 6, 2023, 12:45am UTC](https://qa.fmod.com/t/fmod-event-reference-updater-crashes-on-classes-with-a-blobassetreference-unity-physics-collider-member/20939/3 "2023-12-06T00:45:46Z")

</div>

We have worked around the issue for now by ignoring any Entities related fields in the GetGenericUpdateTasks() function (around line 529).

```auto
foreach (FieldInfo f in fields)
{
    // New code to workaround the issue
    if (f.Module.Name == "Unity.Entities.dll")
        continue;

    // Remaining pre-existing code omitted
}

```

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [December 6, 2023, 3:00am UTC](https://qa.fmod.com/t/fmod-event-reference-updater-crashes-on-classes-with-a-blobassetreference-unity-physics-collider-member/20939/4 "2023-12-06T03:00:04Z")

</div>

That’s great to hear. Thanks for providing your workaround, I’ve passed it along to the development team as well.
