SDK Bug & Feature Requests

Please check out the following rules and use the provided template when posting a bug report! Off-topic posts will be deleted.http://bit.ly/vrchat-bug-reports
String conversion errors from RuntimeAssembly.GetCodeBase with Japanese locale and/or paths
I've been getting reports from multiple Japanese users that they are getting the following stacktrace, breaking the build window in the Avatar SDK: ExecutionEngineException: String conversion error: Illegal byte sequence encounted in the input. System.Reflection.RuntimeAssembly.GetCodeBase (System.Reflection.Assembly a, System.Boolean escaped) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Reflection.RuntimeAssembly.get_CodeBase () (at <27124aa0e30a41659b903b822b959bc7>:0) System.Reflection.AssemblyName.Create (System.Reflection.Assembly assembly, System.Boolean fillCodebase) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Reflection.RuntimeAssembly.GetName (System.Boolean copiedName) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Reflection.Assembly.GetName () (at <27124aa0e30a41659b903b822b959bc7>:0) VRC.Tools.get_HasTypeVRCApplication () (at <de2b87b788984fa39f4913eb18084fa8>:0) VRC.Tools.get_isClient () (at <de2b87b788984fa39f4913eb18084fa8>:0) VRC.Core.API.PopulateHTTPRequestHeaders (BestHTTP.HTTPRequest request) (at <de2b87b788984fa39f4913eb18084fa8>:0) VRC.Core.API.SendRequestInternal (System.String endpoint, BestHTTP.HTTPMethods method, VRC.Core.ApiContainer responseContainer, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] requestParams, System.Boolean authenticationRequired, System.Boolean disableCache, System.Single cacheLifetime, System.Int32 retryCount, VRC.Core.API+CredentialsBundle credentials, BestHTTP.Forms.HTTPFormBase formData, System.Boolean disableLog, VRC.Core.UpdateDelegator+JobPriority priority) (at <de2b87b788984fa39f4913eb18084fa8>:0) VRC.Core.API+<>c__DisplayClass49_0.<SendRequest>g__PerformRequest|0 () (at <de2b87b788984fa39f4913eb18084fa8>:0) VRC.Core.API.SendRequest (System.String endpoint, BestHTTP.HTTPMethods method, VRC.Core.ApiContainer responseContainer, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] requestParams, System.Boolean authenticationRequired, System.Boolean disableCache, System.Single cacheLifetime, System.Int32 retryCount, VRC.Core.API+CredentialsBundle credentials, BestHTTP.Forms.HTTPFormBase formData, System.Boolean disableLog, VRC.Core.UpdateDelegator+JobPriority priority) (at <de2b87b788984fa39f4913eb18084fa8>:0) VRC.Core.RemoteConfig.FetchConfig (System.Action onFetched, System.Action onError) (at <de2b87b788984fa39f4913eb18084fa8>:0) VRC.Core.BaseConfig.Init (System.Action onInit, System.Action onError, System.Boolean reload) (at <de2b87b788984fa39f4913eb18084fa8>:0) VRCSdkControlPanel.ShowControlPanel () (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/ControlPanel/VRCSdkControlPanel.cs:25) Some folks claim that this starts when they install Modular Avatar, and persists after removing it. It may be related to https://github.com/mono/mono/issues/20968 - calling Assembly.GetName appears to be unsafe on the version of mono in Unity 2022.3.22f1. This bug appears to be very sensitive to load order. In particular, it will occur when: Your PC nonunicode locale is Japanese, and there is Japanese text in the project path An assembly listed before Assembly-CSharp in the AppDomain.CurrentDomain.GetAssemblies() list is one which throws an exception from assembly.Name . This can be any assembly that is dynamically constructed (notably, HarmonySharedState assemblies and some "external tools" bindings, such as the Rider bindings, will trigger this) I would suggest adding exception handling to this isClient check, and skipping assemblies that throw exceptions from GetName. Or, check for the presence of VRCApplication using Assembly.GetType first, and then check for whether this is Assembly-CSharp only if you find that class.
3
·

tracked

Network ID Utility fails to import with NullReferenceException
Many NullReferenceException happens during the import process. You will fail to do even a simple "loop back test". Repro steps Create a scene having a VRCSceneDescriptor and an UdonBehavior at the minimum. Open Network ID Import and Export Utility https://creators.vrchat.com/worlds/udon/networking/network-id-utility/#network-id-import-and-export-utility Press Regenerate Scene IDs and confirm the dialog Press Export and save it to a file Press Clear Scene IDs and confirm the dialog Press Import and select the file you have just saved. The utility shows the object(s). Press Accept All or Select Then, the Console shows NullReferenceException errors Environment Tested with SDK 3.7.0 Worlds. This seems to happen from 3.5.2 Log The head part of the exception: NullReferenceException: Object reference not set to an instance of an object VRCNetworkIDUtility.<DetectConflicts>g__DoTypesMatch|28_6 (VRCNetworkIDUtility+NetworkObjectRef scene, VRCNetworkIDUtility+NetworkObjectRef loaded) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/VRCNetworkIDUtility.cs:550) VRCNetworkIDUtility.DetectConflicts (System.Collections.Generic.Dictionary`2[TKey,TValue] loadedRefs, System.Collections.Generic.List`1[T] conflictList) (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/VRCNetworkIDUtility.cs:520) VRCNetworkIDUtility.OnGUI () (at ./Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/VRCNetworkIDUtility.cs:297) Note The NullReferenceException happens when accessing NetworkObjectRef.typeNames . Some implementation of INetworkIDContainer has the issue, maybe, UdonBehavior . INetworkIDContainer.NetworkIDCollection is typed List<NetworkIDPair> Some element of it has the null as NetworkIDPair.SerializedTypeNames
2
·

tracked

Load More