0 votes
asked in Bug Report by
Just imported UMotion Pro 1.06 into an existing 64bit DX11 Net 3.5 project under Unity 2017.3.1 and when trying to open the UMotion editor window, I get the following error message:

TypeLoadException: Could not load type 'ΊΊΉΉΉΊΉΊΉΊΉΊΉΊΊΊΉΉΊΊΉΊΊΉΉΉΉΊΊΉΊΉΉΉΉΊΉΉΊΉΉΊΉΉΉΊΉ' from assembly 'UMotionEditor, Version=1.0.6628.27488, Culture=neutral, PublicKeyToken=null'.
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

As always with dll assets, its hard to debug this myself and/or find problematic interplay with other assets like double defined types etc..I already tried switching to Net 4.6, after which the editor completely denies loading of the assembly, stating that it is broken.Of course, when creating a new project and only loading UMotion Pro into it, everything works fine.

Any ideas what I could try next to drill down on the problem? Are there any types defined globally in the assembly that I could check for in code from other assets? At least that was the cause of a similar problem I had with another dll asset in the past - so just a straw.

4 Answers

0 votes
answered by Expert (80k points)
 
Best answer

Hi,
I wanted to provide a new update on this topic with all the latest information I have related to this problem:

  • Make sure UMotion isn't installed into a Plugins folder (e.g. "Plugins/UMotionEditor/...").
  • Make sure there is no AssemblyInfo.cs file in your project. You can search for such a file using the search bar in Unity's project window. If you have such a file in your project, you can safely delete it. This file usually is compiled into a *.dll, delivering it as source file makes no sense and causes problems.
  • If you have compile errors in your script when you import UMotion for the first time you get a very similar exception that complains that Assembly-CSharp can not be loaded. Make sure to fix any compile errors in your scripts. After that, UMotion should load fine.
  • Try to restart your computer, maybe an internal Unity problem causes the plugins not to get loaded correctly.
  • If none of the above applies, open the console window and make sure that "Collapse" is enabled. Check all error messages that you get, maybe that provides a hint.

Best regards,
Peter 

commented by

I'm having a similar problem, but the folder is in the default location, and the AssemblyInfo.cs are coming from packages (progrids and package manager UI), so I can't delete them.

I'm using unity 2018.2b4 any workarounds to it ? I really don't know what can be causing problems here if I import it to a new project with those packages umotion works.

commented by Expert (80k points)

Hi,
thanks for your support request.

It's Ok and valid when a package has an AssemblyInfo.cs because packages are compiled into there own assembly (using assembly definition files).

I really don't know what can be causing problems here if I import it to a new project with those packages umotion works.

If it works in an empty project then the cause of this issue must be something inside the project where it doesn't work. If you want you can send me the project via the email support form and I can take a look at it. You can also try to copy your project and start removing things step by step (other assets, etc.) until everything is working again. The thing you deleted before its starts working is most probably the cause of this issue.

I'm sorry for the inconvenience.

Best regards,
Peter

commented by
It's quite a big project so it's hard to send it to you.

Everytime I open it I get greeted with 29 of these errors

TypeLoadException: Could not load type 'ΊΉΉΊΊΉΉΉΊΊΉΉΊΊΊΊΊΊΊΊΊΉΊΊΉΊΊΉΉΉΉΊΉΉΊΉΊΉΊΊΉΉΊΊΊΊΉ' from assembly 'UMotionEditor, Version=1.0.6708.29006, Culture=neutral, PublicKeyToken=null'.

I'm right now deleting some stuff I don't use to see if I can narrow the problem.

The actual editor seems to be working in "preview mode" but for example the animations in the demo scene don't play (even if I can use the clips or see them with the clip editor).
 Thank you.
commented by Expert (80k points)

It's quite a big project so it's hard to send it to you.

It might be possible to delete all scenes and 3D assets from the project to get its size down. It's also possible that you request a link to my Dropbox (via the email support form) if the project size exceeds 20 MB.

The actual editor seems to be working in "preview mode" but for example the animations in the demo scene don't play (even if I can use the clips or see them with the clip editor).

You mean if you scrub the time cursor or press play in the Clip Editor, the pose of the robots don't update accordingly in the scene view?

What have you deleted from your project that UMotion can be opened now?

Best regards,
Peter

0 votes
answered by Expert (80k points)

Hi,
thank you very much for your support request.

It looks like Unity can't load a class called "UMotionMainLogic" which is in a UMotion specific namespace.

I just did a few tests on what I could think of that might be causing the issue but wasn't successful in reproducing your problem.

 Are there any types defined globally in the assembly that I could check for in code from other assets? 

UMotion uses classes of Beebyte's Obfuscator asset. My guess was that maybe a different asset (also compiled as dll) might use the same classes thus producing a naming conflict. But that seems not to introduce problems (at least in my tests).

Switching to .Net 4.6 also worked in my tests. Switching to .Net 4.6 should not be necessary as UMotion is compiled against .Net 3.5, though.

Do you have other assets compiled as *.dll in your project? Could you try adding them to your empty project one after another to trace down if there is a conflict with one of these?

I'm sorry for the inconvenience.

Best regards,
Peter

commented by
Thanks for the fast response! No need to be sorry, since (in my experience) it's a fairly common problem with dll plugins in Unity. And frankly, after all these years, the guys at Unity are still not able to handle cases like these gracefully (which would be quite easy, at least regarding handling and the amount of error information given to the user) which finally made me avoid dll assets whenever I could.
But some assets are too valuable regarding a productive workflow to be ruled out, and actually UMotion ranks among those for me.

In situations like these I always try to switch to Net 4.6 since it sometimes gives more or different information on the actual problem which can help to identify what's going on.

Now comes the fun stuff. I went the extra mile and imported all dll assets present in the actual project into the test project as well, without leading to the problem. I just noticed that loading of the Clip Editor window took longer than usual the first time after all dll assets had been imported.
Going back to the actual project, it all of a sudden also works there. So my first guess is that loading the assembly in the test project successfully by the Net runtime fixed whatever was the problem in the actual project as well.

While leaving me with an uneasy feeling, it seems like I can go on with work right now. I'll post here again if the situation changes once more.

Thanks for your time, and best hopes for all of us that Unity will be able to get dll handling right one day in the near future.
commented by Expert (80k points)

Thanks for that detailed reply. That's really strange and indeed smells a little bit like a Unity "dll" loading bug.

No need to be sorry, since (in my experience) it's a fairly common problem with dll plugins in Unity.

Do you know some forum threads or the like of other problems like this one? Maybe I can find some parallels or maybe I can even get this reproduced (then I would be able to do some further debugging or sending a bug report to Unity).

While leaving me with an uneasy feeling, it seems like I can go on with work right now.

Yes that gives me the same feeling... Not reproduce-able problems that only appear randomly are the fear of every programmer I guess...

I'll post here again if the situation changes once more.

Yes, please keep me updated.

Best regards,
Peter

commented by

Hello, I encountered the same situation. After I deleted a lot of files, I found that there was a cs file that may have caused this problem. This file came from another third party plugin (Easy Movie Texture v3.59)

AssemblyInfo.cs:

using System.Reflection;

using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following 

// set of attributes. Change these attribute values to modify the information

// associated with an assembly.

[assembly: AssemblyTitle("FFmpeg.AutoGen")]

[assembly: AssemblyDescription("")]

[assembly: AssemblyConfiguration("")]

[assembly: AssemblyCompany("")]

[assembly: AssemblyProduct("FFmpeg.AutoGen")]

[assembly: AssemblyCopyright("Copyright © Ruslan Balanukhin 2015")]

[assembly: AssemblyTrademark("")]

[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible 

// to COM components.  If you need to access a type in this assembly from 

// COM, set the ComVisible attribute to true on that type.

[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM

[assembly: Guid("410c7abf-7c83-478f-8655-af2a0f29c7ff")]

// Version information for an assembly consists of the following four values:

//

//      Major Version

//      Minor Version 

//      Build Number

//      Revision

//

// You can specify all the values or you can default the Build and Revision Numbers 

// by using the '*' as shown below:

// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.2.0.0")]

[assembly: AssemblyFileVersion("1.2.0.0")]

My version of UMotion is 1.08

I have used the following version of unity:

2017.4.2f1

2017.3.1p1

2017.1.0p5

All have this problem

My mother tongue is not English. This reply comes from translation software. Please forgive me and hope to help you reproduce this problem.

commented by Expert (80k points)
Hi,
thank you very much for this very helpful information.

Can you reproduce this error if you create an empty project with just UMotion and the Movie Texture plugin included?

Thanks!

Best regards,
Peter
commented by
Yes, I did a new project and reproduced the problem. When I found AssemblyInfo.cs and deleted it, UMotion resumed operation. EasyMovieTexture also seems to have no other problems.
commented by Expert (80k points)
Thank you very much. I will take a look into this and keep you updated.

Best regards,
Peter
commented by Expert (80k points)
Hi Null,
I was in contact with the developer of "Easy Movie Texture". He was very helpful and will delete the AssemblyInfo.cs file from his asset. The AssemblyInfo.cs is already compiled into the *.dll so shipping it as source file is not correct and explains why things get messed up.

Thanks again for this very helpful tip!

Best regards,
Peter
0 votes
answered by Expert (80k points)
Hi,
I just wanted to let you know that I was able to reproduce this exception. You get this error when UMotion is installed into a Plugins folder (e.g. "Plugins/UMotionEditor/...").

UMotion is delivered with *.dll and *.cs files. When the *.cs files are located in a "Plugins" folder Unity compiles them in the first pass (--> they are added to "Assembly-CSharp-firstpass.dll"). But the UMotion *.dlls try to load the *.cs files from the "Assembly-CSharp.dll" which fails and produces the cryptic error message you've got.

Long story short: Please don't put the UMotion folder into a "Plugins" folder. I've implemented a meaningful error dialog that is shown instead of the cryptic exception that you discovered. This change ships in UMotion V1.08p01.

Again, thanks for reporting!

Best regards,
Peter
commented by
Thanks for getting back to me and I'm glad that my report was useful to sort that out.

Funny thing is, I never moved UMotion from its original install path, but meanwhile - while removing a couple of unused assets - I've identified another asset that also seemingly uses the Obfuscator asset. So maybe there was a very tangled code reference situation at works in my case, and Unity once again wasn't able to handle that gracefully (not bashing here, just talking about common reality).

Ah well, the magic of the ghost in the machine. Let's hope weve sorted that out completely at the time we start using completely autonomous machines in our every households. :)

Best regards and wishes for your projects,
Heiko
0 votes
answered by

I bought this asset recently and every time I've tried to put it into any test project, it arrives with broken assemblies, it's a terrible way to setup things IMO.

For example, I just imported this on existing project (using 2018.2.0f2) and got greeted by:

I noticed that this is covered here https://support.soxware.com/345/typeloadexception

I'm sorry if this sounds harsh but your asset really needs to play nice with other asset store items. Right now, only way to use it out of the box is to import it into completely blank project. But the whole point of having an animation editor inside unity is to be able to do it within your game projects, otherwise we would just use DCC tools for this.

Could you please find some alternative way to handle this so it wouldn't break by Default?

'Ive also tried importing UMotion first and then other assets but all ends the same eventually, I also can't really tell if "ΊΉΉΊΊΉΉΉΊΊΉΉΊΊΊΊΊΊΊΊΊΉΊΊΉΊΊΉΉΉΉΊΉΉΊΉΊΉΊΊΉΉΊΊΊΊΉ'" is important as everything is obfuscated. I'm curious, what's with that too? 

It's an editor tool that doesn't ship with games so your code would be rather safe anyways from bigger public. Now if something happens to the asset provider (asset gets deprecated or asset provider loses interest on the asset), we are left with zero means to fix the issues ourselves, making UMotion Pro super risky buy for about everyone.

commented by Expert (80k points)

Hi,
thank you very much for your bug report. I understand your frustration and I will do my very best to resolve this issue as quick as possible.

Please provide a few further technical details so that we can identify the cause of your issue:

  1. Once you get this TypeLoadExcpetion, what affect on UMotion does it have? Are you still able to use UMotion?
  2. Do you get this TypeLoadException also after restarting Unity?
  3. You said that you've tried to add assets one by one to an empty project and you ended up having the same issue. What asset have you been adding before the problem occurred?
  4. Would it be possible to send me a project that I can use to reproduce your issue (see email support form)? I can send you a drop box link if the project exceeds 20 MB.

 Could you please find some alternative way to handle this so it wouldn't break by Default?

Yes that is of course the desirable solution. Please provide a repro project as requested above and I will try to identify the issue and find a way that this won't happen again.

'Ive also tried importing UMotion first and then other assets but all ends the same eventually, I also can't really tell if "ΊΉΉΊΊΉΉΉΊΊΉΉΊΊΊΊΊΊΊΊΊΉΊΊΉΊΊΉΉΉΉΊΉΉΊΉΊΉΊΊΉΉΊΊΊΊΉ'" is important as everything is obfuscated. I'm curious, what's with that too? 

Technically speaking it doesn't matter much which class exactly is mentioned in the error message as this error message is more an indicator that there is a problem with loading the whole assembly (not related to that specific class).

Now if something happens to the asset provider (asset gets deprecated or asset provider loses interest on the asset), we are left with zero means to fix the issues ourselves, making UMotion Pro super risky buy for about everyone.

If something would happen to the asset provider (me in this case), the asset would still work with all the Unity versions that it supported in the past. The only risk would be that newer Unity versions (with possible breaking API changes) would not be supported.
Furthermore UMotion supports exporting all your animations as *.FBX so your work can be opened in literally any DCC application :-)

Best regards,
Peter

commented by

Hi i am new to this asset bought it yesterday. I have the same issues as described in this post. 

null texture passed to GUI.DrawTexture

UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode)ΊΊΉΊΊ.........................

I deleted all asseblyinfo files and my installed folders are in order. I have tryied all solutions that were given here.

My main problem is that the GUI of the ClipEditor and PoseEditor is half visible. Like in the picture here. I am using unity 2018.2

commented by Expert (80k points)

Hi,
thank you very much for your bug report and I'm sorry that you are experiencing an issue.

Have you tried restarting Unity?

Could you send me the project where this is happening so that I can reproduce and fix this issue via the email support form? Thank you very much.

Best regards,
Peter

commented by
Yes i have restarted my computer and unity several times. Ok so on what link can i send the project? That link that you gave me is 20mb max.
commented by Expert (80k points)
Please send an empty email via the link tha I've posted in my last email. I will then send you a link where you can upload a file to my Dropbox.

Best regards,

Peter
commented by
I now get this error even when I import this on new project using 2018.2.1f1. It doesn't throw the error once I import the package from asset store initially but immediately every time I restart the editor. Having an obfuscated error message isn't making it any easier to guess what's getting broken.. I haven't yet learned the tool enough to be able to tell what's broken if any, examples seem to work fine and provided editor tools fire up without extra errors.

Repro:

1) install 2018.2.1f1 if not installed already (I don't think I had this issue on 2018.2.0f2 on totally empty project with no other assets around so do test with 2018.2.1f1).

2) create a new project

3) import UMotion Pro from asset store and wait for it to process the assets

4) restart the editor

5) get greeted by TypeLoadException: Could not load type 'ΊΉΉΊΊΉΉΉΊΊΉΉΊΊΊΊΊΊΊΊΊΉΊΊΉΊΊΉΉΉΉΊΉΉΊΉΊΉΊΊΉΉΊΊΊΊΉ' from assembly 'UMotionEditor, Version=1.0.6778.12991, Culture=neutral, PublicKeyToken=null'.

This is literally the only asset from the asset store I've had this much trouble to get working without errors. It's also one of the few that doesn't come with source code for the integration and definitely the only one I know that obfuscates everything so you can't even figure out what the errors mean, making it impossible for end user to fix these random issues.
commented by Expert (80k points)
Hi rz,
thanks for reaching out.

This error message is generated by Unity when loading the dlls. I can confirm that this message has no negative side effect on UMotion or Unity's functionality. It happens with any Unity 2018.2 version.

As this problem appears only in Unity 2018.2 and in none of the older versions and I have no influence on the dll loading code of Unity the only thing I can do is forward this bug report to Unity. I think this is somehow caused by a change in their dll loading code.

Best regards,
Peter
commented by Expert (80k points)
Quick Update: I found a workaround for the "TypeLoadException" thrown in Unity 2018.2 that will be available in the UMotion V1.13p02 release (scheduled for next week).

Please note that the error message has no negative impact on the functionality of UMotion (and even though it has the same text, it is not related to the problem of the original question).

Best regards,
Peter

Soxware Support

Here you get official product support by the developer and the community for all Soxware Products for Unity®.

Post as guest, login via Facebook or create an account.

Ask questions, report bugs or provide feedback. Please use the correct category and always post in english.

For private email support, please use the Support Form to create a support ticket.

Copyright © 2017 Soxware Interactive | All Rights Reserved | Impressum

...