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

Trombloader is unable to load songs on MacOS #36

Closed
Guarde opened this issue Jan 26, 2023 · 1 comment
Closed

Trombloader is unable to load songs on MacOS #36

Guarde opened this issue Jan 26, 2023 · 1 comment

Comments

@Guarde
Copy link
Contributor

Guarde commented Jan 26, 2023

A friendly Mac user and I successfully installed BepInEx to the game on a MacOS device.
However attempting to load a custom chart resulted in a blackscreen with notes faintly visible and no music playing.

The following error occurs as the plugin is attempting to load the .ogg (at Plugin.GetClipAudioSync)

UriFormatException: Invalid URI: The Authority/Host could not be parsed.
  at UnityEngineInternal.WebRequestUtils.MakeInitialUrl (System.String targetUrl, System.String localUrl) [0x000c8] in <a5f78ef8005a453aa863503f7ed64467>:0 
  at UnityEngine.Networking.UnityWebRequest.set_url (System.String value) [0x00007] in <a5f78ef8005a453aa863503f7ed64467>:0 
  at UnityEngine.Networking.UnityWebRequest..ctor (System.String url, System.String method, UnityEngine.Networking.DownloadHandler downloadHandler, UnityEngine.Networking.UploadHandler uploadHandler) [0x0001a] in <a5f78ef8005a453aa863503f7ed64467>:0 
  at UnityEngine.Networking.UnityWebRequestMultimedia.GetAudioClip (System.String uri, UnityEngine.AudioType audioType) [0x0000e] in <7e5e565e073b4587968ebb6ef13b9047>:0 
  at TrombLoader.Plugin+<GetAudioClipSync>d__5.MoveNext () [0x00045] in <67e261e65508417587fb3c8ce428cf63>:0 
  at TrombLoader.Class_Patches.GameControllerStartPatch.Prefix (GameController __instance) [0x007f6] in <67e261e65508417587fb3c8ce428cf63>:0 
  at GameController.Start () [0x00005] in <2c1bd930c016469ea082019b9c08a9e7>:0

The above error is followed by a flood of NullReferenceExceptions until the game was closed

One possible cause I've considered is the different file path compared to Windows or Linux as well as the use of backslashes in the file uri.
So I tried this:

public IEnumerator GetAudioClip(string path, Action callback = null)
	{
	if (SystemInfo.operatingSystemFamily == OperatingSystemFamily.MacOSX)
		{
			path = "file://" + path;
		}
	else
		{
			path = "file:\\\\" + Path.GetFullPath(path);
		}			

Which turned out unsuccessful and resulted in an identical error...
Since I don't want to annoy our friendly community member by throwing poop at the wall until something sticks ill create an issue instead.

I've attached the Player.log of the first time they attempted to load a song with an unaltered Build of Trombloader 1.4.2
(For the sake of their privacy I've replaced all instances of their username with "USERNAME")

Player.log

@Guarde
Copy link
Contributor Author

Guarde commented Jan 27, 2023

Issue solved.
Pull request is up ^

@Guarde Guarde closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant