Author Topic: [BUG] Substance Source plugin endless loops on reload  (Read 229 times)

This bug occurs 100% repeatably for me in Unity 2019.3.1f1 with the latest Substance for Unity plugin as of about last Friday.

Symptoms/Behavior:

On reloading a Unity project where there was a Subtance Source window or tab open as Unity exited and that page expected a Substance login session, the Substance Source window will loop endlessly. It complains that a login is required but will not stop refreshing to allow the login to happen. Furthermore, it seems that window or tab is impossible to close without fully exiting Unity. Even rapid-fire clicks on the window close button are ineffective (although I suspect there is some very tiny window of time during each refresh when the close button might work if I could hit it just then).

Steps to reproduce:
  • Create an empty Unity project.
  • Import Substance Plugin from the Asset Store.
  • Open a Substance Source window or tab in Unity and login.
  • In Substance Source, navigate to something that would require a login, for example, a page showing your purchased Substances
  • Exit Unity editor back to the desktop without closing that Substance Source tab.
  • Wait long enough for session cookies to expire (not sure if this step is required or not)
  • Reopen the Unity project

Level of bug:

Critical failure of Substance Source plugin; no apparent effect on SBSAR file support in the Unity project

Known workarounds:
  • With Unity closed, delete the subdirectory containing the Substance Source plugin (but not the rest of the Allegorithmic plugin directory tree), and be sure to delete the metadata file associated with the Substance Source subfolder from its parent folder. Reopen Unity, and it will function normally without Substance Source.
  • When importing Substance for Unity plugin, omit the Substance Source subfolder and its contents from the import.

With either of these workarounds, obtain Substance Source materials by directly downloading them with a standalone browser session.

Additional notes:

I attempted to report this bug through the formal Tech Support ticketing system, but the web form failed to post because it expected a Captcha to be completed, but my browser (latest version of Chrome, on Windows) did not display any Captcha fields. Captcha fields generally work fine for me, including the one on these forums. I attempted to refresh the page with my ad blocker disabled, but that also did not display the Captcha at all.

Furthermore, the error page showed my bug report text but would not allow me to copy it to the clipboard so I could resubmit the form. Please consider this note a request to fix the web form so an error page allows the text that failed to submit to be clipboarded by the user. I even used the page source view in my browser to try to recover my text to avoid retyping it by hand, but apparently the site uses some AJAX JavaScript thing and the form contents are not actually in traditional HTML sent to the browser.

FWIW, I'm copying this bug report to my system clipboard before I attempt to preview or post it.
Last Edit: February 20, 2020, 08:34:32 pm

Just wanted to add my two cents to this. I'm experiencing the exact same issue (literally word for word as the above post, including the web form on the ticketing system not working). except that I cannot fix the bug following those steps. Currently, any Unity project file that has touched the Substance for Unity plug-in on my end appears to be permanently corrupted.

Any Unity projects NOT using the plug-in are fine, so I'm assuming there's a major issue with the plug-in itself ...

Just wanted to add my two cents to this. I'm experiencing the exact same issue (literally word for word as the above post, including the web form on the ticketing system not working). except that I cannot fix the bug following those steps. Currently, any Unity project file that has touched the Substance for Unity plug-in on my end appears to be permanently corrupted.

Any Unity projects NOT using the plug-in are fine, so I'm assuming there's a major issue with the plug-in itself ...

What specific error are you seeing with the plugin after you deleted the Substance Source subfolder?

If the plugin itself is failing to install, you may want to check what version of .NET runtime is configured in your Unity project settings. I had all kinds of critical errors with the plugin until I realized it doesn't work with the legacy version of .NET that is still available in some versions of Unity and may have been kept in your project settings during a Unity upgrade.

Try right-clicking on the Allegorithmic top directory in your Project view and doing a Reimport (but *not* Reimport All) and make sure the plugin's DLLs come online, then if that works try one-by-one reimporting each of your SBSAR files. That worked for me once I had the .NET version correct. FWIW, I don't recommend a bulk reimport of all the SBSARs in a folder at once. For me -- and I still have no idea why -- in each folder the first reimport would fail, then once I retried that first import all other reimports in that folder worked until I moved on to another folder in the same project. Again, I have no idea why this was happening, but I always had to reimport the first file of each folder twice.
Last Edit: February 21, 2020, 11:45:30 pm

@scott_22 -

Thanks for your reply! Just got around to it. We didn't actually get any specific errors. The files simply wouldn't load. After a few restarts (and following your instructions), we got the projects to open, but the levels were empty. The assets were still present in the assets folder, and they were not corrupt, but the levels themselves were empty. We just had to drag the assets back into place and rebuild everything, but I guess that's better than starting from complete scratch. Again,this behavior only happened in instances where we used the Substance plug-in. We are simply avoiding it going forward until the integration is better repaired.

Thank you for all the details! We are looking in to a fix now though it will not be in our upcoming release (2.4.5) as its already packaged for beta with plans to release official next week. We will look to have the fix in the following release (2.5.0) in mid/late April.

Regards,
Jill
Substance Integrations Product Manager

Jill, thanks for the reply (especially its specificity about timing and versions, so I know what to expect).

Please reach out to me if you would like me to regression test 2.5.0 in a sandbox project before it is released; I will be glad to help if I can.