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

CultureNotFoundException when trying to browse for song folder #472

Open
AnsisMalins opened this issue Oct 3, 2024 · 1 comment
Open
Labels

Comments

@AnsisMalins
Copy link
Collaborator

Issue type: Bug report

Actual behaviour

When I click on the folder button in Song Folders, no file browser dialog is opened. When I look at the console, I see

CultureNotFoundException: Culture ID 8192 (0x2000) is not a supported culture.
Parameter name: culture
System.Globalization.CultureInfo..ctor (System.Int32 culture, System.Boolean useUserOverride, System.Boolean read_only) (at <8d5ef054c27c4b94bf100f8d26466ac6>:0)
System.Globalization.CultureInfo.GetCultureInfo (System.Int32 culture) (at <8d5ef054c27c4b94bf100f8d26466ac6>:0)
System.Windows.Forms.InputLanguage.get_InstalledInputLanguages () (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.Windows.Forms.InputLanguage.FromCulture (System.Globalization.CultureInfo culture) (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.Windows.Forms.InputLanguage.get_CurrentInputLanguage () (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.Windows.Forms.Application..cctor () (at <4aab8eccdded4736adb682c54e921d0b>:0)
Rethrow as TypeInitializationException: The type initializer for 'System.Windows.Forms.Application' threw an exception.
System.Windows.Forms.Form.Dispose (System.Boolean disposing) (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.ComponentModel.Component.Finalize () (at <f31eb757adc148968c878f72f18b04ee>:0)
Rethrow as TypeInitializationException: The type initializer for 'System.Windows.Forms.ThemeEngine' threw an exception.
System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.Windows.Forms.Control..ctor () (at <4aab8eccdded4736adb682c54e921d0b>:0)
(wrapper remoting-invoke-with-check) System.Windows.Forms.Control..ctor()
System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () (at <4aab8eccdded4736adb682c54e921d0b>:0)
Rethrow as TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception.
System.Windows.Forms.WindowsFormsSynchronizationContext.get_AutoInstall () (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.Windows.Forms.Control..ctor () (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.Windows.Forms.ScrollableControl..ctor () (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.Windows.Forms.ContainerControl..ctor () (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.Windows.Forms.Form..ctor () (at <4aab8eccdded4736adb682c54e921d0b>:0)
System.Windows.Forms.CommonDialog+DialogForm..ctor (System.Windows.Forms.CommonDialog owner) (at <4aab8eccdded4736adb682c54e921d0b>:0)
(wrapper remoting-invoke-with-check) System.Windows.Forms.CommonDialog+DialogForm..ctor(System.Windows.Forms.CommonDialog)
System.Windows.Forms.FolderBrowserDialog..ctor () (at <4aab8eccdded4736adb682c54e921d0b>:0)
(wrapper remoting-invoke-with-check) System.Windows.Forms.FolderBrowserDialog..ctor()
SFB.StandaloneFileBrowserWindows.OpenFolderPanel (System.String title, System.String directory, System.Boolean multiselect) (at Assets/Plugins/UnityStandaloneFileBrowser/StandaloneFileBrowser/StandaloneFileBrowserWindows.cs:57)
SFB.StandaloneFileBrowser.OpenFolderPanel (System.String title, System.String directory, System.Boolean multiselect) (at Assets/Plugins/UnityStandaloneFileBrowser/StandaloneFileBrowser/StandaloneFileBrowser.cs:88)
FileSystemDialogUtils.OpenFolderDialog (System.String title, System.String directory) (at Assets/Common/FileSystemDialogUtils.cs:70)
SongFolderListEntryControl.OpenSelectFolderDialog () (at Assets/Scenes/Options/SongLibraryOptions/SongFolderListEntryControl.cs:153)
SongFolderListEntryControl.<OnInjectionFinished>b__32_1 (UnityEngine.UIElements.EventBase _) (at Assets/Scenes/Options/SongLibraryOptions/SongFolderListEntryControl.cs:108)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEvent_BubbleUpCallbacks (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement element) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPath (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCachedElementUnderPointerOrPanelRoot (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.PointerEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <ae359e179ec04ddbbf723b49755560ed>:0)
UnityEngine.UIElements.PanelEventHandler.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.EventSystems.BaseEventData sourceEventData) (at ./Library/PackageCache/[email protected]/Runtime/UGUI/EventSystem/UIElements/PanelEventHandler.cs:268)
UnityEngine.UIElements.PanelEventHandler.OnPointerUp (UnityEngine.EventSystems.PointerEventData eventData) (at ./Library/PackageCache/[email protected]/Runtime/UGUI/EventSystem/UIElements/PanelEventHandler.cs:135)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerUpHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/[email protected]/Runtime/UGUI/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at ./Library/PackageCache/[email protected]/Runtime/UGUI/EventSystem/ExecuteEvents.cs:272)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
CustomUnityLogHandler:LogException(Exception, Object) (at ./Packages/playshared/Runtime/Logging/Log.cs:429)
UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/[email protected]/Runtime/UGUI/EventSystem/EventSystem.cs:530)

Expected behaviour

File browser dialog should open.

Steps to reproduce

  • Have a laptop with Windows that came preinstalled in Germany and/or have the German keyboard layout active. I'm not sure which.
  • Click the folder button in Song Folders.

Details

Implementation hints

I question the wisdom of copy-pasting System.Windows.Forms.dll into Assets. It's not hard to call the Win32 API directly.

@AnsisMalins
Copy link
Collaborator Author

Something, something, locales without LCIDs, whatever that means, allegedly a bug in .NET or dunno: CBLoader/CBLoader#52

@achimmihca achimmihca added the bug label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants