Search Issue Tracker

Won't Fix

Votes

0

Found in

2021.1

2021.2

2021.2.0a13

Issue ID

1328659

Regression

Yes

[Profiler(Standalone Process) ] "get_dataPath can only be called from the main thread" exception thrown on opening Profiler

Package

-

"get_dataPath can only be called from the main thread" exception thrown on opening Profiler (Standalone)

Steps to Reproduce:

1. Create a new Project
2. Open Windows > Analysis > Profiler (Standalone Process)

Expected Result: Profiler window should be opened without any errors

Actual Results: Getting multiple errors

Reproducible on: 2021.2.0a13, 2021.1.3f1. 2021.1.0a1

Working fine on: 2020.3.4f1, 2020.2.7f1

Environment: Windows 10 and Mac 10.15

StackTrace:
1. FileNotFoundException: Couldn't find Bolt package folder.
Unity.VisualScripting.PathUtility.GetPackageRootPath () (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/utilities/pathutility.cs:144)
Unity.VisualScripting.PluginPaths.get_package () (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/utilities/pluginpaths.cs:38)
Unity.VisualScripting.BoltCorePaths.get_dotNetDocumentation () (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/plugin/boltcorepaths.cs:14)
Unity.VisualScripting.XmlDocumentation..cctor () (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/documentation/xmldocumentation.cs:32)
Rethrow as TypeInitializationException: The type initializer for 'Unity.VisualScripting.XmlDocumentation' threw an exception.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <695d1cc93cca45069c528c15c9fdd749>:0)
Unity.VisualScripting.BackgroundWorker+<>c__DisplayClass0_0.<.cctor>b__3 () (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/threading/backgroundworker.cs:82)
Unity.VisualScripting.BackgroundWorker.Work () (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/threading/backgroundworker.cs:157)
UnityEngine.Debug:LogException(Exception)
Unity.VisualScripting.<>c__DisplayClass28_0:<Work>b__0() (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/threading/backgroundworker.cs:161)
UnityEditor.EditorApplication:Internal_CallDelayFunctions()

2. Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
Unity.VisualScripting.Paths..cctor () (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/utilities/paths.cs:16)
Rethrow as TypeInitializationException: The type initializer for 'Unity.VisualScripting.Paths' threw an exception.
Unity.VisualScripting.VSBackupUtility.BackupAssetsFolder (System.String backupLabel) (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/utilities/vsbackuputility.cs:58)
Unity.VisualScripting.VSBackupUtility.Backup () (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/utilities/vsbackuputility.cs:29)
Unity.VisualScripting.PluginContainer.PerformUpdate () (at library/packagecache/com.unity.visualscripting@1.5.2/editor/visualscripting.core/plugins/plugincontainer.cs:290)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <abde78d817db4c4994d267d8ce4de7a2>:0)

  1. Resolution Note (2022.1.X):

    We will deprecate UMPE and the Standalone profiler using UMPE for 22.1.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.