Daggerfall Unity 0.10.26 crash on Linux Mint

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
User avatar
jefetienne
Posts: 170
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Daggerfall Unity 0.10.26 crash on Linux Mint

Post by jefetienne »

I am super happy to see how far we've come along in this new update. :) That being said, I'm having troubles with the Linux build - it only loads the sky and nothing else. There are also some debug files in the zip archive.
El jefe, Etienne
Nexus Mods | GitHub

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Daggerfall Unity 0.10.26 crash on Linux Mint

Post by Interkarma »

jefetienne wrote: Tue Sep 22, 2020 3:48 am I am super happy to see how far we've come along in this new update. :) That being said, I'm having troubles with the Linux build - it only loads the sky and nothing else. There are also some debug files in the zip archive.
I ran the Linux build on my test Linux notebook earlier without any issues, not sure what the problem is there. I'll spin it up again in a VM when I can later today.

All the builds are created and packaged directly from git via Unity Cloud Build. I don't know any way to strip those debug files at this time.

User avatar
jefetienne
Posts: 170
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: Daggerfall Unity 0.10.26 crash on Linux Mint

Post by jefetienne »

Hmm, that's odd. If/when you test with your VM I am experiencing this issue on Linux Mint 19.3 Cinnamon.
El jefe, Etienne
Nexus Mods | GitHub

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Daggerfall Unity 0.10.26 crash on Linux Mint

Post by Interkarma »

Runs OK in my test VM too. I'm using a fresh install of Ubuntu 20.04.1 LTS. DFU installed via DaggerfallGameFiles method and fresh unzip of 0.10.26.

ubuntu.jpg
ubuntu.jpg (464.48 KiB) Viewed 1582 times

Maybe try changing game files and deleting settings.ini? Are there any errors in your logs?

User avatar
jefetienne
Posts: 170
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: Daggerfall Unity 0.10.26 crash on Linux Mint

Post by jefetienne »

I looked inside the Player.log and I found a couple errors.
Spoiler!
The first one is this:

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
  at UnityEngine.ResourceManagement.AsyncOperations.InitalizationObjectsOperation.Execute () [0x00010] in <b4f887cfeeed4d869b9f31f77875d213>:0 
  at UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].InvokeExecute () [0x00000] in <0664cf1a4c314d78a04458c8b44b6348>:0 
  at UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].Start (UnityEngine.ResourceManagement.ResourceManager rm, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle dependency, DelegateList`1[T] updateCallbacks) [0x00068] in <0664cf1a4c314d78a04458c8b44b6348>:0 
  at UnityEngine.ResourceManagement.ResourceManager.StartOperation[TObject] (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject] operation, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle dependency) [0x00000] in <0664cf1a4c314d78a04458c8b44b6348>:0 
  at UnityEngine.AddressableAssets.Initialization.InitializationOperation.CreateInitializationOperation (UnityEngine.AddressableAssets.AddressablesImpl aa, System.String playerSettingsLocation, System.String providerSuffix) [0x000d5] in <b4f887cfeeed4d869b9f31f77875d213>:0 
  at UnityEngine.AddressableAssets.AddressablesImpl.InitializeAsync (System.String runtimeDataPath, System.String providerSuffix, System.Boolean autoReleaseHandle) [0x000e8] in <b4f887cfeeed4d869b9f31f77875d213>:0 
  at UnityEngine.AddressableAssets.AddressablesImpl.InitializeAsync () [0x00021] in <b4f887cfeeed4d869b9f31f77875d213>:0 
  at UnityEngine.AddressableAssets.AddressablesImpl.get_ChainOperation () [0x00008] in <b4f887cfeeed4d869b9f31f77875d213>:0 
  at UnityEngine.AddressableAssets.AddressablesImpl.LoadAssetsAsync[TObject] (System.Object key, System.Action`1[T] callback) [0x00008] in <b4f887cfeeed4d869b9f31f77875d213>:0 
  at UnityEngine.AddressableAssets.Addressables.LoadAssetsAsync[TObject] (System.Object key, System.Action`1[T] callback) [0x00000] in <b4f887cfeeed4d869b9f31f77875d213>:0 
  at UnityEngine.Localization.Settings.LocalesProvider.get_PreloadOperation () [0x00032] in <996f9c0fd86f4d558cf89b89ff42e1e8>:0 
  at UnityEngine.Localization.Settings.LocalizationSettings.GetSelectedLocaleAsync () [0x00030] in <996f9c0fd86f4d558cf89b89ff42e1e8>:0 
  at UnityEngine.Localization.Settings.LocalizationSettings.get_SelectedLocaleAsync () [0x00005] in <996f9c0fd86f4d558cf89b89ff42e1e8>:0 
  at DaggerfallWorkshop.Game.TextManager.HasLocalizedFont (DaggerfallWorkshop.Game.UserInterface.DaggerfallFont+FontName fontName) [0x00000] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.GetFont (DaggerfallWorkshop.Game.UserInterface.DaggerfallFont+FontName fontName) [0x00005] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.get_DefaultFont () [0x00005] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterface.ToolTip..ctor () [0x00038] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallBaseWindow..ctor (DaggerfallWorkshop.Game.UserInterface.IUserInterfaceManager uiManager, System.Int32 screenWidth, System.Int32 screenHeight) [0x000a2] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallPopupWindow..ctor (DaggerfallWorkshop.Game.UserInterface.IUserInterfaceManager uiManager, DaggerfallWorkshop.Game.UserInterface.IUserInterfaceWindow previousWindow, System.Int32 screenWidth, System.Int32 screenHeight) [0x00012] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallPauseOptionsWindow..ctor (DaggerfallWorkshop.Game.UserInterface.IUserInterfaceManager uiManager, DaggerfallWorkshop.Game.UserInterface.IUserInterfaceWindow previousWindow) [0x00049] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <fb001e01371b4adca20013e0ac763896>:0 
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007a] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.UIWindowFactory.GetInstance (DaggerfallWorkshop.Game.UserInterfaceWindows.UIWindowType windowType, System.Object[] args) [0x0000f] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.UIWindowFactory.GetInstance (DaggerfallWorkshop.Game.UserInterfaceWindows.UIWindowType windowType, DaggerfallWorkshop.Game.UserInterface.IUserInterfaceManager uiManager, DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallBaseWindow previous) [0x0000f] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.InstantiatePersistentWindowInstances () [0x00000] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.Update () [0x0007c] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
Then it has this error:

Code: Select all

Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[System.Collections.Generic.IList`1[UnityEngine.Localization.Locale]], result='', status='Failed': Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=Locale, Type=UnityEngine.Localization.Locale 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
And repeatedly loops repeatedly:

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
  at DaggerfallWorkshop.Game.TextManager.GetLocaleFontKey (UnityEngine.Localization.Locale locale, DaggerfallWorkshop.Game.UserInterface.DaggerfallFont+FontName fontName) [0x00000] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.TextManager.HasLocalizedFont (DaggerfallWorkshop.Game.UserInterface.DaggerfallFont+FontName fontName) [0x0001b] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.GetFont (DaggerfallWorkshop.Game.UserInterface.DaggerfallFont+FontName fontName) [0x00005] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.get_DefaultFont () [0x00005] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterface.ToolTip..ctor () [0x00038] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallBaseWindow..ctor (DaggerfallWorkshop.Game.UserInterface.IUserInterfaceManager uiManager, System.Int32 screenWidth, System.Int32 screenHeight) [0x000a2] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallPopupWindow..ctor (DaggerfallWorkshop.Game.UserInterface.IUserInterfaceManager uiManager, DaggerfallWorkshop.Game.UserInterface.IUserInterfaceWindow previousWindow, System.Int32 screenWidth, System.Int32 screenHeight) [0x00012] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallPauseOptionsWindow..ctor (DaggerfallWorkshop.Game.UserInterface.IUserInterfaceManager uiManager, DaggerfallWorkshop.Game.UserInterface.IUserInterfaceWindow previousWindow) [0x00049] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <fb001e01371b4adca20013e0ac763896>:0 
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007a] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.UIWindowFactory.GetInstance (DaggerfallWorkshop.Game.UserInterfaceWindows.UIWindowType windowType, System.Object[] args) [0x0000f] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.UIWindowFactory.GetInstance (DaggerfallWorkshop.Game.UserInterfaceWindows.UIWindowType windowType, DaggerfallWorkshop.Game.UserInterface.IUserInterfaceManager uiManager, DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallBaseWindow previous) [0x0000f] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.InstantiatePersistentWindowInstances () [0x00000] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.Update () [0x0007c] in <553e8d1f9af74a05b67c0a1fe55a8149>:0 
  ......

I tested on several distros via live USB - Fedora, Gobo, Elementary and Peppermint, all of them worked fine. I must be missing some localization font on my system then, but maybe there needs to be like a small hotfix for a nullcheck and setting a default otherwise?
Last edited by jefetienne on Tue Sep 22, 2020 5:12 am, edited 1 time in total.
El jefe, Etienne
Nexus Mods | GitHub

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Daggerfall Unity 0.10.26 crash on Linux Mint

Post by Interkarma »

Interesting, that would indicate something off with Locale object passed to this method.

Code: Select all

private string GetLocaleFontKey(Locale locale, DaggerfallFont.FontName fontName)
{
    return string.Format("{0}_{1}", fontName, locale.name);
}
Locale is loaded async by default from system properties at startup. Can certainly do a null check here and fallback to say "English (en)" for locale name, but that might cause other issues if system locale not being detected and loaded at startup.

Does this work OK if you download tagged 0.10.26 code and build yourself in your dev environment? You might also need to rebuild addressables beforehand (hit me up in PM if any help needed).

If you step through code in your debugger, is locale.name available in this method?

Edit: And I'll split this conversation into its own Help & Support topic so we don't drown the news topic in tech stuff. :)

User avatar
jefetienne
Posts: 170
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: Daggerfall Unity 0.10.26 crash on Linux Mint

Post by jefetienne »

I'll have to look into this later today hopefully (it's 1 AM where I am at hehe) but I'm thinking that this part of the HasLocalizedFont method (the one with only one parameter and is part of the stack trace) looks suspicious:

Code: Select all

        public bool HasLocalizedFont(DaggerfallFont.FontName fontName)
        {
            Locale selectedLocale;
            
            var op = LocalizationSettings.SelectedLocaleAsync; <--------------------
            if (op.IsDone) <-------------------
                selectedLocale = op.Result;
            else
                return false;

            return localizedFonts.ContainsKey(GetLocaleFontKey(selectedLocale, fontName));
        }
I feel like one or both of those lines should be wrapped inside a StartCoroutine method or using that task/await C# feature since it probably needs to yield until the operation is complete. Maybe op.Result is still null despite being done.
El jefe, Etienne
Nexus Mods | GitHub

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Daggerfall Unity 0.10.26 crash on Linux Mint

Post by Interkarma »

Having a search around and found the below similar issue on Android from July.

https://forum.unity.com/threads/localiz ... ce.911558/

Code stripping is disabled in our project settings, so shouldn't be that. Possibly a bug in Unity Addressables or Localization that manifests on your distro.

User avatar
jefetienne
Posts: 170
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: Daggerfall Unity 0.10.26 crash on Linux Mint

Post by jefetienne »

It could be. Not sure if this helps either, but I can run the Windows exe fine under WINE.
El jefe, Etienne
Nexus Mods | GitHub

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Daggerfall Unity 0.10.26 crash on Linux Mint

Post by Interkarma »

jefetienne wrote: Tue Sep 22, 2020 5:23 am I feel like one or both of those lines should be wrapped inside a StartCoroutine method or using that task/await C# feature since it probably needs to yield until the operation is complete. Maybe op.Result is still null despite being done.
The following code returns an AsyncOperationHandle.

Code: Select all

var op = LocalizationSettings.SelectedLocaleAsync;
No need to wrap that in anything, but can wait for completion of async operation with below pattern:

Code: Select all

var op = LocalizationSettings.SelectedLocaleAsync;
if (op.IsDone)
   Debug.Log(op.Result);
else
   op.Completed += (o) => Debug.Log(o.Result);
I'll use this and a null check to make these methods a bit more robust.

Thank you jefetienne! I'll let you get some sleep. :)

Post Reply