Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

2018.3.0b8 and Substance Engine compile issue

Discussion in '2018.3 Beta' started by mgmhunt, Nov 2, 2018.

  1. mgmhunt

    mgmhunt

    Joined:
    Apr 1, 2013
    Posts:
    53
    Just for the record :)

    All packages (staging, preview) up-to-date as of today (see below), can't compile.

    Seems to be Substance Engine issue, but Allegorithmic don't support beta releases, which seems to mean can't test the new beta using the Substance Plugin.

    Seems way forward for b8+ is to remove Substance Plugin until official release/update.

    Spamming exception errors in the Console:


    System.Reflection.TargetParameterCountException: Number of parameters specified does not match the expected number.
    at System.Reflection.MonoMethod.ConvertValues (System.Reflection.Binder binder, System.Object[] args, System.Reflection.ParameterInfo[] pinfo, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) [0x00016] in <ac823e2bb42b41bda67924a45a0173c3>:0
    at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00011] in <ac823e2bb42b41bda67924a45a0173c3>:0
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <ac823e2bb42b41bda67924a45a0173c3>:0
    at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <ac823e2bb42b41bda67924a45a0173c3>:0
    at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <ac823e2bb42b41bda67924a45a0173c3>:0
    at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <ac823e2bb42b41bda67924a45a0173c3>:0
    at Substance.Game.NativeFunctionsShared.cppInitSubstance (System.String applicationDataPath) [0x00037] in <a7f324179b874bf6be743a4296b96d4e>:0
    at Substance.Game.NativeFunctions.cppInitSubstance (System.String applicationDataPath) [0x0001d] in <a7f324179b874bf6be743a4296b96d4e>:0
    at Substance.Game.NativeCallbacks.InitSubstance () [0x0004c] in <a7f324179b874bf6be743a4296b96d4e>:0
    at Substance.Game.SubstanceMain.Initialize () [0x00052] in <8dbf4539bab24c648c0b65d631ff5426>:0
    at Substance.Game.SubstanceMain..cctor () [0x000c8] in <8dbf4539bab24c648c0b65d631ff5426>:0



    Crashed Thread: 0 tid_160b Dispatch queue: com.apple.main-thread

    Exception Type: EXC_BAD_ACCESS (SIGABRT)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
    Exception Note: EXC_CORPSE_NOTIFY

    VM Regions Near 0:
    -->
    __TEXT 0000000100000000-00000001049d6000 [ 73.8M] r-x/rwx SM=COW bD4 [/Applications/Unity/2018.3.0b8/Unity.app/Contents/MacOS/Unity]

    Application Specific Information:
    abort() called

    Thread 0 Crashed:: tid_160b Dispatch queue: com.apple.main-thread
    0 libsystem_kernel.dylib 0x0000000113b80f06 __pthread_kill + 10
    1 libsystem_pthread.dylib 0x0000000113cdb4ec pthread_kill + 90
    2 libsystem_c.dylib 0x0000000113a8f6df abort + 129
    3 com.unity3d.UnityEditor5.x 0x000000010103b8c1 HandleSignal(int, __siginfo*, void*) + 81
    4 libmonobdwgc-2.0.dylib 0x0000000175c444e9 mono_chain_signal + 79
    5 libmonobdwgc-2.0.dylib 0x0000000175b15f77 mono_sigsegv_signal_handler + 414
    6 libsystem_platform.dylib 0x0000000113cc652a _sigtramp + 26
    7 ??? 000000000000000000 0 + 0
    8 Substance.Engine 0x0000000188c50848 std::__1::basic_string<char, std::__1::char_traits<char>, SubstanceAir::aligned_allocator<char, 16ul> >::__grow_by_and_replace(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*) + 184
    9 Substance.Engine 0x0000000188bf190e CSharpExchange::GetChannelNames() + 302
    10 ??? 0x000000019e5de91d 0 + 6951921949
    11 libmonobdwgc-2.0.dylib 0x0000000175b19390 mono_jit_runtime_invoke + 2519
    12 libmonobdwgc-2.0.dylib 0x0000000175cda96d do_runtime_invoke + 80
    13 libmonobdwgc-2.0.dylib 0x0000000175cddcb9 mono_runtime_try_invoke_array + 1143
    14 libmonobdwgc-2.0.dylib 0x0000000175c8ce28 ves_icall_InternalInvoke + 654
    15 ??? 0x0000000187402b50 0 + 6564096848



    {
    "dependencies" : {
    "com.unity.modules.screencapture" : "1.0.0",
    "com.unity.cinemachine" : "2.2.8-preview.10",
    "com.unity.modules.unitywebrequestassetbundle" : "1.0.0",
    "com.unity.modules.physics" : "1.0.0",
    "com.unity.ads" : "2.0.9",
    "com.unity.textmeshpro" : "1.3.0",
    "com.unity.modules.tilemap" : "1.0.0",
    "com.unity.modules.uielements" : "1.0.0",
    "com.unity.modules.ui" : "1.0.0",
    "com.unity.package-manager-ui" : "2.0.3",
    "com.unity.modules.director" : "1.0.0",
    "com.unity.modules.ai" : "1.0.0",
    "com.unity.modules.jsonserialize" : "1.0.0",
    "com.unity.modules.vehicles" : "1.0.0",
    "com.unity.addressables" : "0.4.8-preview",
    "com.unity.collections" : "0.0.9-preview.9",
    "com.unity.modules.wind" : "1.0.0",
    "com.unity.modules.physics2d" : "1.0.0",
    "com.unity.postprocessing" : "2.0.17-preview",
    "com.unity.progrids" : "3.0.3-preview.0",
    "com.unity.modules.imgui" : "1.0.0",
    "com.unity.modules.vr" : "1.0.0",
    "com.unity.shadergraph" : "4.1.0-preview",
    "com.unity.modules.animation" : "1.0.0",
    "com.unity.purchasing" : "2.0.3",
    "com.unity.modules.umbra" : "1.0.0",
    "com.unity.jobs" : "0.0.7-preview.5",
    "com.unity.modules.unitywebrequest" : "1.0.0",
    "com.unity.analytics" : "3.0.9",
    "com.unity.modules.assetbundle" : "1.0.0",
    "com.unity.modules.terrainphysics" : "1.0.0",
    "com.unity.vectorgraphics" : "1.0.0-preview.21",
    "com.unity.render-pipelines.core" : "4.1.0-preview",
    "com.unity.collab-proxy" : "1.2.11",
    "com.unity.modules.unityanalytics" : "1.0.0",
    "com.unity.modules.xr" : "1.0.0",
    "com.unity.assetbundlebrowser" : "1.7.0",
    "com.unity.entities" : "0.0.12-preview.19",
    "com.unity.modules.cloth" : "1.0.0",
    "com.unity.modules.particlesystem" : "1.0.0",
    "com.unity.modules.unitywebrequestwww" : "1.0.0",
    "com.unity.modules.audio" : "1.0.0",
    "com.unity.modules.unitywebrequestaudio" : "1.0.0",
    "com.unity.incrementalcompiler" : "0.0.42-preview.24",
    "com.unity.modules.video" : "1.0.0",
    "com.unity.modules.terrain" : "1.0.0",
    "com.unity.modules.imageconversion" : "1.0.0",
    "com.unity.mathematics" : "0.0.12-preview.19",
    "com.unity.modules.unitywebrequesttexture" : "1.0.0",
    "com.unity.probuilder" : "3.0.9",
    "com.unity.burst" : "0.2.4-preview.35"
    },
    "registry" : "https:\/\/staging-packages.unity.com"
    }
     
    Last edited: Nov 3, 2018
  2. Rallix

    Rallix

    Joined:
    Mar 17, 2016
    Posts:
    105
    Well, at least for me, since beta #4 (or sooner) substance materials don't work anymore and trying to (re)import them results in this:



    But I got a MissingMethodException instead of TargetParameterCountException.
    Allegorithmic team says they can't support beta releases because there are rapid changes and some stability issues, so, for the time being, I moved all substance materials out of the Assets folder until 2018.3 is out of beta and Allegorithmic updates their plugin.
     
    mgmhunt likes this.
  3. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    685
    I found this thread via Google, and same issue as OP for me on 2018.3.0b8.

    (Substance Engine plugin hasn't been updated for a month at this point, so I wasn't expecting it to magically work with beta release.)

    But does it really work with 2018.3.0b7? wondering if I should downgrade...
     
  4. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    522
    Same annoying issue here.
     
  5. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    522
    It kinda works with spamming tons of errors into console every time you select substance material and after run the player.
     
  6. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    772
    Same here
     
  7. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    772
    Wondering if this isn't in fact an issue caused by amplify shader editor's substance node. @iamarugin @mgmhunt are you using ASE?
     
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,241
    Here is a quote from the linked allegorithmic thread:
    https://forum.allegorithmic.com/index.php/topic,25167.0.html#msg101756

    It sounds like allegorithmic is aware of the issue and it's related to their software rather than Unity. If you need Substance to work, it seems you have to use Unity 2018.2 (at the time of writing).
     
  9. mgmhunt

    mgmhunt

    Joined:
    Apr 1, 2013
    Posts:
    53
    Nope. And I meant, the Substance plugin can exist in b7 and I can get a compile/no errors. But from b8 the plugin stops compile totally. As mentioned above, seems actually -using- Substance materials is dodgy from at least b4.

    Anyway it seems that the only way forward with b8+ is to remove the Substance Plugin until it's officially updated after/on release. (as per @Rallix). Have edited original post.

    Just created a thread for those Google searches :)
     
    Last edited: Nov 3, 2018
  10. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    Hi Everyone,

    At this time, we don't officially support the 2018.3 beta. We are in our own beta phase of development with the Substance plugin, so we have restricted ourselves to supporting only the official Unity build releases during the beta. There can be and often are API changes between the official and beta releases of Unity and our main goal is to focus support on official builds. However, we are definitely looking at the Unity beta releases internally to identify issues, so we can be ready with 2018.3 releases.

    I know this can be frustrating. Please continue to let us know of the issues you find. You can report bugs in our discord channel for integrations as well as our forums listed here.

    https://forum.allegorithmic.com/index.php/board,6.0.html
    https://discordapp.com/invite/010JCPblJTh3d6CXe

    Cheers,
    Wes
     
    MadeFromPolygons, mgmhunt and Peter77 like this.
  11. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    1,818
    @wesm, This has been Allegorithmic's stance on substance plugin also for UE4, which has been equally annoying there when you test on their previews etc. But the main difference now is that with UE4 plugin, you actually ship the c++ integration source code so one can manually fix the issues if needed. With Substance for Unity plugin you ship precompiled managed dll along with the native dll.

    What you could do is to at least ship the managed (c#) side sources with the plugin so people could manually work around the issues that are related to Unity side of things (when testing alphas and betas for Unity).
     
    Rich_A likes this.
  12. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    522
  13. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    Thanks very much for your feedback on this. We have been discussing this internally and we do agree providing source would be beneficial for power users and studios. We will continue to evaluate the options and what we can do to provide the best solution. We want to make sure that what we could provide in terms of source access is robust and automated, following CI/CD principles. Our focus at this time is to get Substance in Unity out of beta and production ready. However, we are always looking into ways to provide the best solution and providing source access is one route we will be discussing further.

    Cheers,
    Wes
     
    Peter77 and rz_0lento like this.
  14. artysta

    artysta

    Joined:
    Nov 15, 2009
    Posts:
    123
    I get this error(s) with the 2018.2.15f1 update today.
    I had to delete Allegorithmics plugins for it to go away.
     
  15. jeremedia

    jeremedia

    Joined:
    Apr 21, 2015
    Posts:
    29
    Same. Though I'll be reverting to .14 instead of removing the plugin.
     
  16. artysta

    artysta

    Joined:
    Nov 15, 2009
    Posts:
    123
    It was easier to replace the substance materials I had, this is like the 3rd time I've had issues with this. I need to move forward. Maybe I'll revisit this in the future.
    It was easy to not worry when it broke in a beta, understandable. But now its broken in a current shipping version of Unity.
     
  17. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    Hi,

    What errors are you getting? I checked the latest build which at this point is 2018.2f16 and I'm not getting any errors. The Unity updates are so frequent, it could there was some API issue in f15. I'm not seeing any issues in f16.

    Cheers,
    Wes
     
  18. artysta

    artysta

    Joined:
    Nov 15, 2009
    Posts:
    123
    I was getting the same error as posted above when running in the new beta. But in 2018.2f15.
    It would run duplicating in the editor 999+ errors.
    All I had to do was open the project and the errors would flow until I deleted the plugins folder.
    which of course led to errors of Unity needing the plugin for the materials that needed it.
    But in my case, I just replaced those materials until I sort how I'm going to deal with this.
    As I said I understood the problem, under the Beta, and I was not using the Beta for production,
    but when the error crept into the f15 release I had to delete it.
    I'm installing f16 right now, but not sure I'm going to be able to test this out right now.
     
  19. RPGia

    RPGia

    Joined:
    Jan 23, 2017
    Posts:
    11
    I'm seeing the same issue on 2018.2.15f1 and 2018.2.16f1. It is holding me back from upgrading from 2018.2f14.
     
  20. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    We can't seem to reproduce the error. It's looking like an API function change in 2018.3 has been pushed to 2018.2.15/16. This seems to be where the error is coming from. Is this when you try to import a sbsar into the project, adding the plugin or when building the project? Which platform are you building on. Is this a PC or mobile unity project?
     
    Last edited: Nov 16, 2018
  21. artysta

    artysta

    Joined:
    Nov 15, 2009
    Posts:
    123
    For me, I don't have to do anything, the minute the project is opened the errors start adding up without stop.
    I didn't need to import anything or create anything or even run the project. Just open. I'm on Mac with an iOS project build.
    For me the trigger was upgrading to 2018.2.15
     
  22. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    Thanks for this information. I am also trying this on Mac and can't seem to reproduce the issue. We have been made aware of a Unity API constructor change that we have made for our upcoming 2.2 update. This was something we did for supporting 2018.3. However, it seems like this change has been also pushed to 2018.2.15 and higher. It looks like this is causing the issue, however it's not happening 100% of the time in all configurations. What version of Mac OS are you on? I am running 10.14. Did you also try Unity 2018.2.16f?

    Cheers,
    Wes
     
  23. artysta

    artysta

    Joined:
    Nov 15, 2009
    Posts:
    123
    Latest OS 10.14.1, latest Unity Patch for 2108.2.16
    But I removed Substance while in 15 and haven't reinstalled it. When I get to a break I will try that out.
     
  24. RPGia

    RPGia

    Joined:
    Jan 23, 2017
    Posts:
    11
    I'm on OSX 10.13.6, targeting Android/iOS. I see this error spammed after upgrading a project past 2018.2.14f1 that contains substance files. Happened for me on two projects so far.
     
  25. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    46
    I deleted the "Editor" folder from "Allegorithmic/Plugins/Substance Engine" and the console error spam stopped. I'm on 2018.2.16.
     
  26. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    Are you on OSX or PC?

    Cheers,
    Wes
     
  27. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    46
    I'm on PC. I'm now getting the Substance not supported by Unity error message again, but that's better than the constant console spam.
     
  28. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    We can't seem to reproduce this issue at all. We are trying to find out what could be causing it in the 2018.2 builds. There has been an API change, which affected the 2018.3 beta for the plugin. We have this fixed in our 2.2 builds. However, if I use 2018.2.16f (PC or Mac) and import the substance plugin from the asset store, I am not getting any errors. I have tried switching to iOS/Android/PC builds and using IL2CPP, but can't seem to repro the issue.

    Is there anything else you can tell us about the project settings you have?

    Cheers,
    Wes
     
  29. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    46
    Do you have prefabs in your project that use substance materials that would throw the errors? Since this is an Editor error, so you'd have to test in Editor mode as opposed to creating a build.

    Removing those DLL's removed the errors for me. Do those have to be compiled DLL's? If it's Editor code I imagine that could just be .cs files? Then we could help debug the errors for you.
     
  30. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    317
    I'm in the same situation when I delete the Substance files on OSX targeting iOS. Seeing these errors on 2018.2.17f1 as well.
     
  31. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    Hi Everyone,

    We have found the issue that is causing the error. The error is caused when the Scripting Runtime is set to .NET 4x. Something in Unity changed from 2018.2.14f to 15f, which has broken the plugin when using .NET 4x.

    If you set your project to .NET 3.5 and you will not get these errors. We are working to get this issue fixed for .NET 4.

    Cheers,
    Wes
     
  32. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    Hi Everyone,

    I have an updated on the issue with .NET4. It turns out it's not actually a ".NET issue." The problem is that C#'s "DynamicInvoke" function does not work anymore as of Unity 2018.2.15. (we use that C# function to execute C++ functions from C# code). These types of changes between point releases are the type of problems we have been facing as we build the plugin. It makes the development process a bit of a moving target, so we greatly apologize for the issues you have had to deal with. In our 2.2 update, we will use C#'s "Invoke" function and as a bonus, "Invoke" is more performant than "DynamicInvoke."

    NOTES:
    - Our next plugin (v2.2) is for UNITY-2018.2.x. For those versions; the default .NET is 3.5.
    - The default .NET version for UNITY-2018.3.x is 4.x We've been testing .NET 3.5 and 4.s)
    - The user scripts are run with respect to UNITY's .NET version.

    Cheers,
    Wes
     
    jeremedia, hard_code and hungrybelome like this.
  33. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    522
    Good news, thanks. I hope the 2.2 version will arrive at the same time as 2018.3 release. It would be great.
     
  34. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    317
    Any ETA on when 2.2 will be released?
     
  35. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    302
    Hi,

    We are going into beta now and will 2.2 available in early January. We had planned to have it roll out with 2018.3, but we ran into errors with .NET4 and needed to make sure these issues were addressed before we released.

    Here is the changelist for the 2.2 update:

    Core Substance Plugin
    • Updated Substance Engine

    • Unity 2018.3 support

    • .NET 4.x support

    • Unity Pro skin GUI readability improvements

    • Fixed a bug where attempting to render Substances while changing parameters at runtime would only cause two to be able to rendered at a time

    • When importing a package that contains old Substance files, the plugin will now let the user know that it contains old Substance data and delete the package files when Unity is attempting to import them (this is so the user does not have to delete everything manually if it came in broken)

    • Added an 'About' button in the Substance menu to show Substance plugin related build information

    • Added mouse-over tooltips in the Substance GUI to show exposed Substance parameter names

    • Added Navigation buttons in the Substance GUI to link to Substance graph and materials

    • Added new icons for the Substance graph/material/textures in the Content Browser

    • Updated the Substance thumbnails in the content browser

    • Removed the .mat from the front of Substance material names

    • Added the ability to rename Substance graphs and materials

    • When changing Substance graph resolution, the apply/revert popup will no longer appear forcing the user to commit the change at that moment

    • Fixed a bug where the Reflection process would only use the default Substance resolution, instead of one defined by the user

    • Added a mouseover warning to the Substance GUI that informs the user if the color space is set to Gamma

    • Changed functionality of Substance graph instances: Users can now create graph instances in a Substance without being prompted for each created instance in the Substance graph GUI

    • Graph, and corresponding material, have the same object name.

    • Support material's output assignments.

    • Fixed sRGB handling (linear color space must be enabled).

    • Fixed "Standard (roughness setup) shader handling.
    Scripting
    • Added function to duplicate Substance graph instances through script: Duplicate()

    • Added function to query procedural input information via C#, returns an array of 'InputProperties' elements: GetInputProperties()

    • Added function to check if an input exists in a graph, returns true/false: HasInput(string inputName)

    • Added function to check if a visibleif input is visible, returns true/false: IsInputVisible(string inputName)

    • The rendering scheme has been re-designed. As such, RenderSubstancesAsync() has been deprecated, this has been changed to graphName.RenderAsync()

    • Hide functions not meant for script support.

    • Implemented Singleton

    • Re-designed rendering queue handling,

    • Re-designed transitions between editor & play modes,

    • Changed log mechanism

    • Improved loaded Substance memory management,

    Known Issues in 2.2.0
    Core Substance Plugin
    • User must disable 'Enable Bitcode' in the Build Settings menu in Xcode to build for iOS

    • Substance object previews in the Content Browser show up black when the build target is set to Android/iOS

    • The Alpha button and Mip Map preview slider are missing on the non-Substance texture GUI after importing the Substance plugin

    • The user has to use powers of two to define a Substance graph resolution through script

    • Substance materials are not persistent when exported/imported using a Unity package

    • Substances do not work with Asset Bundles

    • Substances are not restored back to their original state when going back from play to editor after changing them at runtime

    Scripting
    • Scripting does not work at runtime if the project is set to x86 in the build settings

    • Currently cannot use il2cpp scripting backend
     
unityunity