Event Reference Updater Breaks on Scan

UPDATE: I’ve manually updated the paths for all the events using the wrench icon for every Event Reference variable I have on my prefabs/SOs. The issue still persists when running the Updater tool. It could be that it gets “stuck” on either a scene or project asset.

I’ve updated paths in FMOD Studio, and when I used the Event Reference Updater tool in Unity, several issues came up:

  1. Almost right off the bat, got a Null Reference exception.
  2. It couldn’t scan all the assets in the project.
  3. Got two Stack Overflow errors (both are the same in the attached file).
  4. When clicking “Execute Selected Tasks” anyway for the ones it found, it fixed some broken paths, but not all the ones it managed to locate.

It located over 1400 references to fix before it stopped. But there are so many scan results that are duplicates. For example, one scan result is a scriptable containing a reference to a prefab, where said prefab was where the actual FMOD event reference. So the prefab’s enough, I don’t see a need to list the scriptable object or fix it. And so many in the 1400 results are similar cases to this.

Both the null reference and stack overflow exceptions occur in the GetGenericUpdateTasks function. I’m adding a text file containing the error call stacks if it helps.
FMOD Event Updater Errors.txt (3.2 KB)

Thank you for all the information, we are currently looking into it.

Are you able to share the entire log file from when you tried to use the Updater tool?
What FMOD versions were you updating from & to?

Hey Cameron!

I’ve attached both player and editor logs. For these logs, I’ve launched Unity and the project, and afterwards did nothing but use the Event Reference Updater tool.

What FMOD versions were you updating from & to?

I wasn’t updating FMOD versions. FMOD 2.02.20 is the one and only studio and plugin versions used in the project (not from the start of the project but much later).
What happened is that the event paths were changed on the FMOD Studio side, and I wanted to update them on Unity’s side in the prefabs, so I used the Updater tool for it. The rest is as I described in my original post.

My only guess is that it hits a circular call between some prefabs/scriptable objects that reference each other.

EventUpdateIssue_Shennoz_Player.log (26.6 KB)
EventUpdaterIssue_Shennoz_Editor.log (702.9 KB)

Ah that is good to know, thank you very much for the log files. I have created a task to investigate this further and hopefully we can get a fix out in an upcoming release.

1 Like

Any update on this, we are too having this issue. We have quite a big project

Hey, we also suffer from a similar problem with the Event Reference Updater Tool and we’re also on version 2.02.20, Unity version is 2021.3.29f1. We did upgrade from 2.02.04. When calling Scan in the tool, we also get exceptions. Investigation lead to “target” being null in the GetGenericUpdateTasks method, breaking recursion.

It’s also worth mentioning it also gave an UnassignedReferenceException about some arbitrary (private/protected non-serialized) properties along the way. It’s probably nothing since reflection is used to access them but it might be relevant.

I’m unable to upload files since this is a new account, so I’ll post it here:

NullReferenceException: Object reference not set to an instance of an object
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:520)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:692)
FMODUnity.EventReferenceUpdater+d__37.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:337)
FMODUnity.EventReferenceUpdater+d__34.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:230)
System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () (at :0)
FMODUnity.EventReferenceUpdater.UpdateProcessing () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:1761)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <1e8c82ffe64a4e1d8e997fa7e5933f70>:0)

UnassignedReferenceException: The variable myRT of TooltipOwner has not been assigned.
You probably need to assign the myRT variable of the TooltipOwner script in the inspector.
UnityEngine.Transform+Enumerator.MoveNext () (at <91dc399f41a440558c716315c7e834ab>:0)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:690)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:692)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:692)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__35.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:263)
System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () (at :0)
FMODUnity.EventReferenceUpdater.UpdateProcessing () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:1761)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <1e8c82ffe64a4e1d8e997fa7e5933f70>:0)

NullReferenceException: Object reference not set to an instance of an object
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:520)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:692)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__37.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:337)
FMODUnity.EventReferenceUpdater+d__36.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:307)
System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () (at :0)
FMODUnity.EventReferenceUpdater.UpdateProcessing () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:1761)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <1e8c82ffe64a4e1d8e997fa7e5933f70>:0)

Would love to see a fix for this ASAP, since we currently have no way to track changed event reference paths. We could still upgrade to 2.02.21, but reading the change log I don’t expect it to fix this issue.

I keep trying a couple times every now and then in hopes of maybe something’s changed with the project and it can now scan properly. Unfortunately no such luck.

What I don’t really understand is why does this tool need to count nested referencing - so to speak - of the EventReference type variables?
I get results that are like: a prefab that has a script, which includes a reference to another script, that references yet another prefab that holds a script where the EventReference type is… This also means that this same variable will show up in the scan results as many times as its owning prefab/script is referenced in other prefabs/scripts.
Is it not possible to just count the scripts that directly have an EventReference type in their variables, and the game objects which directly use the FMOD Studio Event Emitter component?

I am investigating this at them moment, although having trouble reproducing the issue exceptions myself.

One theory I have is that the EventReferenceUpdater encounters a type that is unknown to it, possibly a type that is defined in an external plugin or library that FMOD doesn’t have knowledge of and may not be loaded until runtime. Does this sound like it could be possible in your projects?

All three callstacks look like they are related to a ScriptableObject if that helps narrow the search.

All I can tell from this is that it’s coming from a prefab.


That is a fair point and I believe that is also the cause of the stack overflow crash.

It’s worth mentioning that downgrading from 2.02.20 to 2.02.07 fixed all my issues and restored the tool so my guess is that it’s not an unknown type causing the issue but rather due to changes made to the tool between these versions.

As far as I can remember, the nullref came from a GetType() call on the object “target” in aforementioned method, where target was null, causing the exception.

Hope it helps, we’ve downgraded for the moment.

Here’s a screenshot of the current packages in the project, if it helps.

Thanks for the tip! I guess that’s the only solution for now - to downgrade, run the tool, and then upgrade again. Won’t be very useful after 2.03 version is official though.

Hi,

Thank you for bringing this to our attention. I am currently working on the issue.

Would it be possible to get a copy of your Unity project or a stripped-down version displaying the issue uploaded to your profile? Please note you must register a project with us before uploading files.

If that is not possible, could I get any objects or scripts you think may be causing the issue uploaded instead?