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

Proxy object was destroyed improperly! が発生する可能性があり、もし発生するとUnity再起動かNDMFのReimport以外で復帰不可 #496

Open
Sayamame-beans opened this issue Jan 4, 2025 · 2 comments

Comments

@Sayamame-beans
Copy link
Contributor

詳細

確認済みの発生例

  • Unity Package Managerからのインポート操作
  • Tools/TextransTool/Debug/Migration/Migrate Project → Scene開き直しでYes

以下の警告が無限に発生する。

Proxy object was destroyed improperly! Resetting pipeline...
UnityEngine.Debug:LogWarning (object)
nadena.dev.ndmf.preview.ProxyObjectController:OnPreFrame () (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/Rendering/ProxyObjectController.cs:146)
nadena.dev.ndmf.preview.ProxyPipeline:OnFrame (bool) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/Rendering/ProxyPipeline.cs:342)
nadena.dev.ndmf.preview.ProxySession:OnPreCull (bool) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/Rendering/ProxySession.cs:125)
nadena.dev.ndmf.preview.PreviewSession:OnPreCull (bool) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/PreviewSession.cs:51)
nadena.dev.ndmf.preview.ProxyManager:OnPreCull (UnityEngine.Camera) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/ProxyManager.cs:65)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Tools/NDM Framework/Debug Tools/Show Preview Sceneで__NDMF Preview__Sceneを表示させると、中のオブジェクトが無限に再生成されることによりHierarchy上でオブジェクトが点滅している様子が見られる。

NDMF Previewを無効化することで警告の発生は抑制される(それはそう)
この警告が発生し始めた状態では、Sceneの再読み込みや__NDMF Preview__のRemove等では復帰できない。
Unityの再起動で復帰可能。

なお、本現象が発生している状態でNDMFを選択してUnity上でReimportすると

The following open scene(s) have been changed on disk:
 Packages/nadena.dev.ndmf/Runtime/___NDMF Preview___.unity

Do you want to reload the scene(s)?

を聞かれる。これをIgnoreし、その後Reimportが走ることでも直る。

環境

Unity: 2022.3.22f1
NDMF: 1.6.2


補足

TexTransToolを使用している場合、付随して以下のエラーも無限に発生する。

エラー文
Exception: what happened? preview texture has destroyed?!
net.rs64.TexTransTool.UnityDiskUtil+UnityImportedDiskTexture.get__previewTex () (at ./Packages/net.rs64.tex-trans-tool/Editor/Domain/TextureManager.cs:369)
net.rs64.TexTransTool.UnityDiskUtil+UnityImportedDiskTexture.get_Width () (at ./Packages/net.rs64.tex-trans-tool/Editor/Domain/TextureManager.cs:380)
net.rs64.TexTransCore.TTRenderTextureUtility.EqualSize (net.rs64.TexTransCore.ITTTexture l, net.rs64.TexTransCore.ITTTexture r) (at ./Packages/net.rs64.tex-trans-tool/TexTransCore/ITTRenderTexture.cs:17)
net.rs64.TexTransCore.EnginUtil.LoadTextureWidthAnySize[TTCE] (TTCE engine, net.rs64.TexTransCore.ITTRenderTexture renderTexture, net.rs64.TexTransCore.ITTDiskTexture diskTexture) (at ./Packages/net.rs64.tex-trans-tool/TexTransCore/ITTEngine.cs:181)
net.rs64.TexTransCore.MultiLayerImageCanvas.RasterLayer`1[TTCE].GetImage (TTCE engine, net.rs64.TexTransCore.ITTRenderTexture renderTexture) (at ./Packages/net.rs64.tex-trans-tool/TexTransCore/MultiLayerImageCanvas/RasterLayer.cs:24)
net.rs64.TexTransCore.MultiLayerImageCanvas.CanvasContext`1[TTCE].EvaluateForFlattened (net.rs64.TexTransCore.ITTRenderTexture canvasTex, net.rs64.TexTransCore.MultiLayerImageCanvas.EvaluateContext`1[TTCE] evalCtx, System.Collections.Generic.IEnumerable`1[T] flattened) (at ./Packages/net.rs64.tex-trans-tool/TexTransCore/MultiLayerImageCanvas/CanvasContext.cs:49)
net.rs64.TexTransCore.MultiLayerImageCanvas.CanvasContext`1[TTCE].EvaluateCanvas (net.rs64.TexTransCore.MultiLayerImageCanvas.Canvas`1[TTCE] canvas) (at ./Packages/net.rs64.tex-trans-tool/TexTransCore/MultiLayerImageCanvas/CanvasContext.cs:27)
net.rs64.TexTransTool.MultiLayerImage.MultiLayerImageCanvas.EvaluateCanvas[TTCE4U] (TTCE4U texTransCoreEngine, System.Int32 canvasWidth, System.Int32 canvasHeigh) (at ./Packages/net.rs64.tex-trans-tool/Runtime/MultiLayerImage/MultiLayerImageCanvas.cs:64)
net.rs64.TexTransTool.MultiLayerImage.MultiLayerImageCanvas.Apply (net.rs64.TexTransTool.IDomain domain) (at ./Packages/net.rs64.tex-trans-tool/Runtime/MultiLayerImage/MultiLayerImageCanvas.cs:42)
net.rs64.TexTransTool.TexTransBehaviorUtility.Apply (net.rs64.TexTransTool.TexTransBehavior texTransBehavior, net.rs64.TexTransTool.IDomain domain) (at ./Packages/net.rs64.tex-trans-tool/Editor/Utils/TexTransBehaivorUtility.cs:15)
net.rs64.TexTransTool.NDMF.TexTransPhaseNode.NodeExecuteAndInit (System.Collections.Generic.IEnumerable`1[T] flattenTTB, nadena.dev.ndmf.preview.ComputeContext ctx) (at ./Packages/net.rs64.tex-trans-tool/Editor/NDMF/TexTransPhaseNode.cs:50)
net.rs64.TexTransTool.NDMF.TexTransDomainFilter.Instantiate (nadena.dev.ndmf.preview.RenderGroup group, System.Collections.Generic.IEnumerable`1[T] proxyPairs, nadena.dev.ndmf.preview.ComputeContext context) (at ./Packages/net.rs64.tex-trans-tool/Editor/NDMF/TexTransDomainFilter.cs:166)
nadena.dev.ndmf.preview.NodeController.Create (nadena.dev.ndmf.preview.IRenderFilter filter, nadena.dev.ndmf.preview.RenderGroup group, nadena.dev.ndmf.ObjectRegistry registry, System.Collections.Generic.List`1[T] proxies, System.String trace) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/Rendering/NodeController.cs:133)
nadena.dev.ndmf.preview.ProxyPipeline+<>c__DisplayClass23_2.<Build>b__5 (System.Threading.Tasks.Task`1[TResult] items) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/Rendering/ProxyPipeline.cs:263)
nadena.dev.ndmf.preview.ProxyPipeline.Build (nadena.dev.ndmf.preview.ProxyObjectCache proxyCache, System.Collections.Generic.IEnumerable`1[T] filters, nadena.dev.ndmf.preview.ProxyPipeline priorPipeline) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/Rendering/ProxyPipeline.cs:325)
Rethrow as AggregateException: One or more errors occurred. (what happened? preview texture has destroyed?!)
UnityEngine.Debug:LogException(Exception)
nadena.dev.ndmf.preview.ProxyPipeline:ShowError() (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/Rendering/ProxyPipeline.cs:407)
nadena.dev.ndmf.preview.ProxySession:OnPreCull(Boolean) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/Rendering/ProxySession.cs:105)
nadena.dev.ndmf.preview.PreviewSession:OnPreCull(Boolean) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/PreviewSession.cs:51)
nadena.dev.ndmf.preview.ProxyManager:OnPreCull(Camera) (at ./Packages/nadena.dev.ndmf/Editor/PreviewSystem/ProxyManager.cs:65)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
@ReinaS-64892
Copy link
Contributor

これ TTT がマイグレーションのとき、NDMF のシーンも巻き込んでやっちゃってるのが原因の一つだと思うからいじらないようにするのを検討してみる

あと付随のエラーはおそらくNDMF関係ない、TTT の方でシーンのリロードに耐えれないバグかも

@Sayamame-beans
Copy link
Contributor Author

Sayamame-beans commented Jan 4, 2025

TTT関連の所はそうかも…
UPMのインポートでコケるのはどうでしょうね…(TTT無しで試すの忘れました…)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants