articy: draft 2 import problem

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
irve
Posts: 53
Joined: Fri Jan 15, 2016 9:35 am

articy: draft 2 import problem

Post by irve »

We are experiencing an occasional total lockup of Unity. We made our import script so that we skip the import window and just set the right parameters for conversion so we can automate it in our build script. We can also run it from the menu.

Code: Select all

Assertion failed on expression: 's_ProgressBar.dialog'
UnityEditor.AssetDatabase:CreateAsset(Object, String)
PortraitImportHelper:ConvertAndBundle() (at Assets/FO Dialogue/Scripts/Import/Editor/BundlingImportHelper.cs:35)
It may be that the conversion leaves the progress bar in a weird state if not run from the editor window:

Code: Select all

DialogueDatabase db = ArticyConverter.ConvertXmlDataToDatabase(rawXML, prefs, null);
And the subsequent creation of the asset then fails:

Code: Select all

UnityEditor.AssetDatabase.CreateAsset(db, assetPathAndName);
It might also be an unity bug, since it only rarely happens and it feels like a race condition.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: articy: draft 2 import problem

Post by Tony Li »

Hi Irve,

I'll send you a patch today that skips the progress bar unless the import is running through the articy converter window. If the problem is the progress bar, this should avoid it.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: articy: draft 2 import problem

Post by Tony Li »

Irve,

The Pixel Crushers customer download site now has a patch version that may prevent the lockup you described. The onProgressCallback was previously a simple delegate. It's now a delegate event. There's also now an infinite recursion safeguard in the converter in case articy produces malformed data in its XML file.
irve
Posts: 53
Joined: Fri Jan 15, 2016 9:35 am

Re: articy: draft 2 import problem

Post by irve »

Thanks. Since it happened rarely we are unsure if this is fixed, but it currently seems like we have had a clear run so far.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: articy: draft 2 import problem

Post by Tony Li »

Great to hear! If you do notice any issues, please check the console / output log. I added a little more error reporting.
irve
Posts: 53
Joined: Fri Jan 15, 2016 9:35 am

Re: articy: draft 2 import problem

Post by irve »

The bug persists, but conversion itself is successful and completes, when I go and look at the logs. I still get the progressbar warning, though. It happens upon asset creation.

I create an asset immediately after the conversion and portrait linking ( ArticyEditorTools.FindPortraitTexturesInAssetDatabase(); )

Code: Select all

		string assetPathAndName = string.Format("{0}/{1}.asset", prefs.OutputFolder, name);
		UnityEditor.AssetDatabase.CreateAsset(db, assetPathAndName);
		UnityEditor.AssetDatabase.SaveAssets();
Relevant warning is:

Code: Select all

(Filename: Assets/FO Dialogue/Scripts/Import/Editor/BundlingImportHelper.cs Line: 29)

Updating Assets/Dialogue Databases/No Truce With The Furies.asset - GUID: caf0b89f10cbea94f957cfd30e8941a1...
Assertion failed on expression: 's_ProgressBar.dialog'
UnityEditor.AssetDatabase:CreateAsset(Object, String)
PortraitImportHelper:ConvertAndBundle() (at Assets\FO Dialogue\Scripts\Import\Editor\BundlingImportHelper.cs:35)
Yet the thing that confuses me is that Unity continues to convert a few assets after that. It just does not become available again. Might be a Unity thing after all? It mostly happens when people start browsing the internet while they wait for the program to complete converting.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: articy: draft 2 import problem

Post by Tony Li »

The error appears to be in Unity's progress bar code, although I won't discount the possibility that it's a bug in the Dialogue System. Several of the "solutions" recommend closing your Unity project, deleting the Library folder, and re-opening your project -- essentially running an Assets > Reimport All. According to Unity's Issue Tracker, some of the related bugs should be fixed in Unity 2017.2, although I certainly wouldn't recommend changing Unity versions this late in your project.

If your code is hooking into the ArticyConverter.onProgressCallback event, as a test you could comment that out. You won't get progress callbacks, but you could instead call Debug.Log() when the conversion method finishes to let the user know it's done.
Post Reply