Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VFX] Crash with subgraph #5104

Merged
merged 51 commits into from
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
01e8e42
Add regression test on basic sanitize
PaulDemeulenaere Jun 17, 2021
43b4832
Move SanitizeForImport
PaulDemeulenaere Jun 24, 2021
e228f63
*Minor : Missing InvariantCultureIgnoreCase flag in EndsWith
PaulDemeulenaere Jun 24, 2021
4d22c94
*Update changelog.md
PaulDemeulenaere Jun 24, 2021
99ab5fb
*Fix HDRP warning
PaulDemeulenaere Jun 24, 2021
d0d9438
Revert "*Fix HDRP warning"
PaulDemeulenaere Jun 25, 2021
cbfa99c
More conservative way of workaround Preprocess issue
PaulDemeulenaere Jun 27, 2021
508d713
Remove DestroyImmediate
PaulDemeulenaere Jun 30, 2021
1fb0835
Revert "Remove DestroyImmediate "
PaulDemeulenaere Jun 30, 2021
ff51dcf
Add HDRPUserSettings
PaulDemeulenaere Jun 30, 2021
6c5f90b
Revert "Add HDRPUserSettings"
PaulDemeulenaere Jun 30, 2021
a569cbe
Force m_WizardPopupAtStart to false
PaulDemeulenaere Jun 30, 2021
4f90950
Merge branch 'master' into vfx/fix/1344645-sanitize-failure
PaulDemeulenaere Jun 30, 2021
ded88dc
Improvement of this workaround after discussion with @julienf
PaulDemeulenaere Jul 1, 2021
9e94d07
Minor : Editor Test cleanup
PaulDemeulenaere Jul 2, 2021
8d4cdec
Gather all ImportAsset after all Sanitize from the same batch
PaulDemeulenaere Jul 2, 2021
f5a6be5
Minor changes : Change log & Safe execption handling
PaulDemeulenaere Jul 7, 2021
d17ddef
Merge branch 'master' into vfx/fix/1344645-sanitize-failure
PaulDemeulenaere Jul 7, 2021
2d1fa12
Add regression test (which is expecting to crash on master)
PaulDemeulenaere Jul 8, 2021
c643c1e
Merge branch 'vfx/fix/1344645-sanitize-failure' into vfx/fix/1345426-…
PaulDemeulenaere Jul 8, 2021
5e6c3ea
Merge branch 'master' into vfx/fix/1344645-sanitize-failure
PaulDemeulenaere Jul 8, 2021
15059cf
Fix sanitize issue during the very first loading
PaulDemeulenaere Jul 9, 2021
8f944a6
Merge branch 'master' into vfx/fix/1344645-sanitize-failure
PaulDemeulenaere Jul 9, 2021
b0219a1
Merge branch 'vfx/fix/1344645-sanitize-failure' into vfx/fix/1345426-…
PaulDemeulenaere Jul 12, 2021
da1d40e
*Revert this* : OnSRPChanged & PrepareSubgraphs are public
PaulDemeulenaere Jul 12, 2021
a105d01
Not a valid fix : prepare subgraphs just before reimport
PaulDemeulenaere Jul 12, 2021
90ea420
Rename ToSubGraphOperator to ConvertToSubGraphOperator
PaulDemeulenaere Jul 12, 2021
ad447b1
Experiment : trying with a force double import
PaulDemeulenaere Jul 12, 2021
bbcf70d
Test : Don't know what PrepareSubgraph does better
PaulDemeulenaere Jul 12, 2021
2b8a971
Remove dirty PrepareSubgraphs in VFXViewWindow
PaulDemeulenaere Jul 12, 2021
2027002
*Add comment about reason behind PrepareSubgraphs requirement
PaulDemeulenaere Jul 12, 2021
0fb7316
*Update changelog
PaulDemeulenaere Jul 12, 2021
8e1c455
Remove unexpected public/private
PaulDemeulenaere Jul 12, 2021
8c442a8
*Minor* Replace `return` by `continue`
PaulDemeulenaere Jul 12, 2021
2c0bde7
Merge branch 'master' into vfx/fix/1344645-sanitize-failure
PaulDemeulenaere Jul 12, 2021
e19d404
Extend test & Add some notes
PaulDemeulenaere Jul 12, 2021
9ffde33
Remove ClearRuntimeData
PaulDemeulenaere Jul 12, 2021
6dc0d56
*Add note about reason of failure for playmodeXR
PaulDemeulenaere Jul 13, 2021
3aa94cc
Merge branch 'master' into vfx/fix/1344645-sanitize-failure
PaulDemeulenaere Jul 13, 2021
d726339
Merge branch 'vfx/fix/1344645-sanitize-failure' into vfx/fix/1345426-…
PaulDemeulenaere Jul 13, 2021
d2eb21c
Simpler solution : Use backup system instead of reimporting twice
PaulDemeulenaere Jul 13, 2021
da7d41e
Restore test which wasn't working before
PaulDemeulenaere Jul 13, 2021
f47bbd7
Minor : update comment
PaulDemeulenaere Jul 13, 2021
404df89
Merge branch 'master' into vfx/fix/1345426-crash-with-subgraph
PaulDemeulenaere Jul 13, 2021
dec84fa
*Fix bad conflict resolution
PaulDemeulenaere Jul 13, 2021
2421bc5
Restored previously skipped PrepareSubgraphs
PaulDemeulenaere Jul 13, 2021
31f756c
Revert "Restored previously skipped PrepareSubgraphs"
PaulDemeulenaere Jul 13, 2021
29c18b7
Fix missing ResyncSlots on the very first creation of the subgraph
PaulDemeulenaere Jul 13, 2021
ba445f8
Merge branch 'master' into vfx/fix/1345426-crash-with-subgraph
PaulDemeulenaere Jul 28, 2021
76db742
Merge branch 'master' into vfx/fix/1345426-crash-with-subgraph
julienf-unity Aug 2, 2021
c0a3e72
Merge branch 'master' into vfx/fix/1345426-crash-with-subgraph
julienf-unity Aug 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor changes : Change log & Safe execption handling
- Use a more explanotory message for the changelog
- Handle exception safely to avoid the import cancellation
- Fix issue : #4971 (comment)
- Fix issue : #4971 (comment)
  • Loading branch information
PaulDemeulenaere committed Jul 7, 2021
commit f5a6be58f9efba2b28dfb6203d9e904fb847e262
2 changes: 1 addition & 1 deletion com.unity.visualeffectgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix unexpected Spawn context execution ordering
- Fix incorrect buffer type for strips
- Enabled an optimization for motion vectors, storing projected positions for vertices instead of the transform matrix
- Move Sanitize from PreProcess to PostProcess to avoid loss of data due to model migration [Case 1344645](https://issuetracker.unity3d.com/product/unity/issues/guid/1344645/)
- Unexpected operator and block removal during migration [Case 1344645](https://issuetracker.unity3d.com/product/unity/issues/guid/1344645/)

## [11.0.0] - 2020-10-21
### Added
Expand Down
31 changes: 24 additions & 7 deletions com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,25 @@ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAsse
if (graph != null)
{
bool wasGraphSanitized = graph.sanitized;
graph.SanitizeForImport();
if (!wasGraphSanitized && graph.sanitized)

try
{
graph.SanitizeForImport();
if (!wasGraphSanitized && graph.sanitized)
{
if (assetToReimport == null)
assetToReimport = new List<string>();
assetToReimport.Add(assetPath);
}
}
catch (Exception exception)
{
if (assetToReimport == null)
assetToReimport = new List<string>();
assetToReimport.Add(assetPath);
Debug.LogErrorFormat("Exception during sanitization of {0} : {1}", assetPath, exception);
}
}
else
{
Debug.LogError("VisualEffectGraphResource without graph");
Debug.LogErrorFormat("VisualEffectGraphResource without graph : {0}", assetPath);
}
}
}
Expand All @@ -56,7 +64,16 @@ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAsse
if (assetToReimport != null)
{
foreach (var assetPath in assetToReimport)
AssetDatabase.ImportAsset(assetPath, ImportAssetOptions.ForceUpdate);
{
try
{
AssetDatabase.ImportAsset(assetPath, ImportAssetOptions.ForceUpdate);
}
catch (Exception exception)
{
Debug.LogErrorFormat("Exception during reimport of {0} : {1}", assetPath, exception);
}
}
}
}

Expand Down