Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TraceAndOptimizeState.Exclusions contains destroyed GameObjects if objects in the list are destroyed by the AAO Merge Skinned Renderer #1360

Closed
ColorlessColor opened this issue Dec 3, 2024 · 1 comment · Fixed by #1367
Labels
bug Something isn't working
Milestone

Comments

@ColorlessColor
Copy link

UnityEngine.MissingReferenceException: The object of type 'GameObject' 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.
  at (wrapper managed-to-native) UnityEngine.GameObject.GetComponentsInternal(UnityEngine.GameObject,System.Type,bool,bool,bool,bool,object)
  at UnityEngine.GameObject.GetComponents[T] () [0x00001] in <cb81df0c49c643b1a04d9fc6ccca2433>:0 
  at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.FindUnusedObjectsProcessor.Mark (Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.GCComponentInfoHolder componentInfos) [0x000bd] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\FindUnusedObjectsProcessor.cs:251 
  at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.FindUnusedObjectsProcessor.ProcessNew () [0x0000d] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\FindUnusedObjectsProcessor.cs:93 
  at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.FindUnusedObjects.Execute (nadena.dev.ndmf.BuildContext context, Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.TraceAndOptimizeState state) [0x00012] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\FindUnusedObjectsProcessor.cs:18 
  at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.TraceAndOptimizePass`1[T].Execute (nadena.dev.ndmf.BuildContext context) [0x00010] in .\Packages\com.anatawa12.avatar-optimizer\Internal\TraceAndOptimizeBase\TraceAndOptimizeProcessor.cs:103 
  at nadena.dev.ndmf.Pass`1[T].nadena.dev.ndmf.IPass.Execute (nadena.dev.ndmf.BuildContext context) [0x00000] in .\Packages\nadena.dev.ndmf\Editor\API\Fluent\Pass.cs:64 
  at nadena.dev.ndmf.ConcretePass.Execute (nadena.dev.ndmf.BuildContext context) [0x00000] in .\Packages\nadena.dev.ndmf\Editor\API\Solver\PluginResolver.cs:39 
  at nadena.dev.ndmf.BuildContext.RunPass (nadena.dev.ndmf.ConcretePass pass) [0x00124] in .\Packages\nadena.dev.ndmf\Editor\API\BuildContext.cs:325 
  at (wrapper managed-to-native) UnityEngine.GameObject.GetComponentsInternal(UnityEngine.GameObject,System.Type,bool,bool,bool,bool,object)
  at UnityEngine.GameObject.GetComponents[T] () [0x00001] in <cb81df0c49c643b1a04d9fc6ccca2433>:0 
  at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.FindUnusedObjectsProcessor.Mark (Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.GCComponentInfoHolder componentInfos) [0x000bd] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\FindUnusedObjectsProcessor.cs:251 
  at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.FindUnusedObjectsProcessor.ProcessNew () [0x0000d] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\FindUnusedObjectsProcessor.cs:93 
  at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.FindUnusedObjects.Execute (nadena.dev.ndmf.BuildContext context, Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.TraceAndOptimizeState state) [0x00012] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\FindUnusedObjectsProcessor.cs:18 
  at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.TraceAndOptimizePass`1[T].Execute (nadena.dev.ndmf.BuildContext context) [0x00010] in .\Packages\com.anatawa12.avatar-optimizer\Internal\TraceAndOptimizeBase\TraceAndOptimizeProcessor.cs:103 
  at nadena.dev.ndmf.Pass`1[T].nadena.dev.ndmf.IPass.Execute (nadena.dev.ndmf.BuildContext context) [0x00000] in .\Packages\nadena.dev.ndmf\Editor\API\Fluent\Pass.cs:64 
  at nadena.dev.ndmf.ConcretePass.Execute (nadena.dev.ndmf.BuildContext context) [0x00000] in .\Packages\nadena.dev.ndmf\Editor\API\Solver\PluginResolver.cs:39 
  at nadena.dev.ndmf.BuildContext.RunPass (nadena.dev.ndmf.ConcretePass pass) [0x00124] in .\Packages\nadena.dev.ndmf\Editor\API\BuildContext.cs:325
@ColorlessColor ColorlessColor changed the title 'TraceAndOptimizeState.Exclusions' contains destroyed GameObjects if objects in the list are destroyed by the AAO Merge Skinned Renderer TraceAndOptimizeState.Exclusions contains destroyed GameObjects if objects in the list are destroyed by the AAO Merge Skinned Renderer Dec 3, 2024
@anatawa12 anatawa12 added the bug Something isn't working label Dec 3, 2024
@ColorlessColor
Copy link
Author

T&O config:

T&O

AAO Merge Skinned Renderer config:

AAO Merge Skinned Renderer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants