DTFU on Linux

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.
Post Reply
User avatar
AshSlave
Posts: 11
Joined: Sun Mar 22, 2015 10:09 am

DTFU on Linux

Post by AshSlave »

When I choose path to arena2 folder in recently released Unity Editor for Linux I get these errors:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) (at /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/GUILayoutUtilityBindings.gen.cs:205)
UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6478)
UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6457)
DaggerfallWorkshop.GUILayoutHelper.Horizontal (DaggerfallWorkshop.VoidDelegate callback) (at Assets/Daggerfall Unity/Scripts/Editor/GUILayoutHelper.cs:56)
DaggerfallWorkshop.DaggerfallUnityEditor.<DisplayImporterGUI>m__3B () (at Assets/Daggerfall Unity/Scripts/Editor/DaggerfallUnityEditor.cs:257)
DaggerfallWorkshop.GUILayoutHelper.Indent (DaggerfallWorkshop.VoidDelegate callback) (at Assets/Daggerfall Unity/Scripts/Editor/GUILayoutHelper.cs:43)
DaggerfallWorkshop.DaggerfallUnityEditor.<DisplayImporterGUI>m__35 () (at Assets/Daggerfall Unity/Scripts/Editor/DaggerfallUnityEditor.cs:252)
DaggerfallWorkshop.GUILayoutHelper.Foldout (Boolean toggle, UnityEngine.GUIContent label, DaggerfallWorkshop.VoidDelegate callback) (at Assets/Daggerfall Unity/Scripts/Editor/GUILayoutHelper.cs:29)
DaggerfallWorkshop.DaggerfallUnityEditor.DisplayImporterGUI () (at Assets/Daggerfall Unity/Scripts/Editor/DaggerfallUnityEditor.cs:250)
DaggerfallWorkshop.DaggerfallUnityEditor.OnInspectorGUI () (at Assets/Daggerfall Unity/Scripts/Editor/DaggerfallUnityEditor.cs:117)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at /home/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1162)
UnityEditor.DockArea:OnGUI()
InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Stack.Pop () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections/Stack.cs:329)
UnityEngine.GUILayoutUtility.EndLayoutGroup () (at /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/GUILayoutUtilityBindings.gen.cs:222)
UnityEngine.GUILayout.EndVertical () (at /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/GUILayoutBindings.gen.cs:266)
UnityEditor.EditorGUILayout.EndVertical () (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6556)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at /home/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1175)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /home/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:969)
UnityEditor.InspectorWindow.OnGUI () (at /home/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:350)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
If I try to import anything, I get something like this:
DFTFU 1.3.31: Unknown location RegionName='Daggerfall', LocationName='Daggerfall'.
UnityEngine.Debug:Log(Object)
DaggerfallWorkshop.DaggerfallUnity:LogMessage(String, Boolean) (at Assets/Daggerfall Unity/Scripts/DaggerfallUnity.cs:280)
DaggerfallWorkshop.Utility.ContentReader:GetLocation(String, String, DFLocation&) (at Assets/Daggerfall Unity/Scripts/Utility/ContentReader.cs:130)
DaggerfallWorkshop.Utility.GameObjectHelper:FindMultiNameLocation(String, DFLocation&) (at Assets/Daggerfall Unity/Scripts/Utility/GameObjectHelper.cs:516)
DaggerfallWorkshop.Utility.GameObjectHelper:CreateDaggerfallLocationGameObject(String, Transform) (at Assets/Daggerfall Unity/Scripts/Utility/GameObjectHelper.cs:526)
DaggerfallWorkshop.<DisplayImporterGUI>c__AnonStorey6:<>m__3F() (at Assets/Daggerfall Unity/Scripts/Editor/DaggerfallUnityEditor.cs:302)
DaggerfallWorkshop.GUILayoutHelper:Horizontal(VoidDelegate) (at Assets/Daggerfall Unity/Scripts/Editor/GUILayoutHelper.cs:57)
DaggerfallWorkshop.DaggerfallUnityEditor:<DisplayImporterGUI>m__3B() (at Assets/Daggerfall Unity/Scripts/Editor/DaggerfallUnityEditor.cs:297)
DaggerfallWorkshop.GUILayoutHelper:Indent(VoidDelegate) (at Assets/Daggerfall Unity/Scripts/Editor/GUILayoutHelper.cs:43)
DaggerfallWorkshop.DaggerfallUnityEditor:<DisplayImporterGUI>m__35() (at Assets/Daggerfall Unity/Scripts/Editor/DaggerfallUnityEditor.cs:252)
DaggerfallWorkshop.GUILayoutHelper:Foldout(Boolean, GUIContent, VoidDelegate) (at Assets/Daggerfall Unity/Scripts/Editor/GUILayoutHelper.cs:29)
DaggerfallWorkshop.DaggerfallUnityEditor:DisplayImporterGUI() (at Assets/Daggerfall Unity/Scripts/Editor/DaggerfallUnityEditor.cs:250)
DaggerfallWorkshop.DaggerfallUnityEditor:OnInspectorGUI() (at Assets/Daggerfall Unity/Scripts/Editor/DaggerfallUnityEditor.cs:117)
UnityEditor.DockArea:OnGUI()
Since I have such errors only in Linux version of the editor, it should be reported in its forum, but I don't have enough knowledge of DTFU to properly explain the problem.

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

Re: DTFU on Linux

Post by Interkarma »

Thanks for testing this out! I was waiting for the Linux Unity editor to come out of "experimental" status before I gave it a shot.

I'm not sure of the problem here. The first round of failures seems to be related to the Unity GUI layout. Perhaps some of my layout code is breaking things.

If you could, please let me know a few more details as well.

1. Which Linux distro and version are you using?
2. Which version of the Linux Unity Editor did you install (official 64-bit .deb package or unofficial platform agnostic)?
3. Which Daggerfall installer/download was the source of your Arena2 folder?

Armed with that information, I should be able to reproduce the environment and related problems. I can then look a bit deeper and see what's going on.

User avatar
AshSlave
Posts: 11
Joined: Sun Mar 22, 2015 10:09 am

Re: DTFU on Linux

Post by AshSlave »

1. I tried it on Arch Linux and Gentoo (stable) with the same result.
2. Unofficial platform agnostic, both 5.1.0f3+2015082501 and 5.1.0f3+2015090301.
3. It was few years ago, soon after Daggerfall became free, so I don't really remember, but I suspect it to be an installer downloaded somewhere from UESP.

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

Re: DTFU on Linux

Post by Interkarma »

Thank you. :) It would be interesting to see if the results were any different with the officially supported build on Ubuntu (I'm guessing not at this stage though).

User avatar
venim1103
Posts: 8
Joined: Thu Mar 26, 2015 6:32 pm
Location: Finland

Re: DTFU on Linux

Post by venim1103 »

Another Arch Linux user here with the same problem.

I just wanted to mention that I don't have any problems with certain other, um. "asset importers" such as the Axis Game Factory, meaning that the Linux version of the editor (albeit very very early and buggy version) seems functional enough.


Someone mentioned in this link:
http://forum.unity3d.com/threads/object ... em.318067/

That certain GUI functions are legacy functions and that mixing old legacy GUI code will not work with the new system.

I know you must know this already and I'm sure most, if not all, code has been updated for the Unity 5 but maybe there is some old code left from the Unity 4 version of the Workshop code that somehow just appears to bring problems for the new Linux build of the editor?

Ps. I love that I can now finally use the Unity engine natively on my Linux box without having to bother with Wine!
I can't wait when all the bugs with the Unity editor have been ironed out and that when all the Daggerfall Workshop tools will also work perfectly inside the Linux environment, so I can finally start playing around and making some cool little projects! :D

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

Re: DTFU on Linux

Post by Interkarma »

Aye, definitely related to GUI. While I don't use the legacy GUI as such at runtime, some of the editor scripts use the editor GUI quite heavily. Odds are just the current Linux Editor doesn't support all the layout tricks being used by the editor scripts.

Once I get a bit more time, I'll rework things to be compatible with the Linux editor. I would also like the status on Unity's side to progress out of the "experimental" stage before I go too crazy trying to fix stuff. :)

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

Re: DTFU on Linux

Post by Interkarma »

Quick update on this. I've setup a Linux environment and reproduced this error. Once I have it sorted out and tested, I'll release a 1.4 DFTFU Developer Preview .assetpackage for you guys to test.

This will (hopefully, fingers crossed) all be ready this weekend in line with the Daggerfall Unity test build. I'll keep you updated.

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

Re: DTFU on Linux

Post by Interkarma »

I've been able to resolve all major problems preventing DFTFU from working in the "experimental" Linux editor. The below screenshot was taken in Ubuntu, but in theory fixes should work with other distros as well.

Problems with GUI turned out to be bugs in the Inspector, not DFTFU. I was just unlucky enough to be triggering them. A second set of problems were totally my fault. There are a few stupid and lazy bits in the API I need to fix.

Overall, things are looking good! I still need to do more testing and work around the Inspector bugs, bug I'm fairly sure it can all be solved. I'll let you know once the test .assetpackage is ready.

Image

User avatar
venim1103
Posts: 8
Joined: Thu Mar 26, 2015 6:32 pm
Location: Finland

Re: DTFU on Linux

Post by venim1103 »

Wow, awesome, thank you!

I know the Linux editor version is still experimental so I wasn't even expecting any major bug fixes as most of the problems are still Unity related but I'm really happy you found at least the problem with the initial import using the inspector under Linux and you got it working :D

No need to put much effort on the Linux side yet!

I just wanted to show that we have at least some people here using Linux and we can hopefully be of some help for figuring out bugs on that side :)

Post Reply