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

ErrorReportUIを背面で実行するとエラー #225

Closed
hitsub opened this issue Jun 14, 2023 · 3 comments · Fixed by #226
Closed

ErrorReportUIを背面で実行するとエラー #225

hitsub opened this issue Jun 14, 2023 · 3 comments · Fixed by #226

Comments

@hitsub
Copy link
Contributor

hitsub commented Jun 14, 2023

概要

実行時(PlayModeに入る直前)にErrorReportUIが見えていない状態で実行すると、以下2件のエラーが発生します。

NullReferenceException: Object reference not set to an instance of an object
Anatawa12.AvatarOptimizer.ErrorReporting.ErrorReportUI.RenderContent () (at Packages/com.anatawa12.avatar-optimizer/Internal/ErrorReporter/Editor/ErrorReportUI.cs:184)
Anatawa12.AvatarOptimizer.ErrorReporting.ErrorReportUI+<StartRenderTimer>d__14.MoveNext () (at Packages/com.anatawa12.avatar-optimizer/Internal/ErrorReporter/Editor/ErrorReportUI.cs:92)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <7d87237cea3743d093e22c5b98f74fba>:0)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
NullReferenceException: Object reference not set to an instance of an object
Anatawa12.AvatarOptimizer.ErrorReporting.ErrorReportUI.RenderContent () (at Packages/com.anatawa12.avatar-optimizer/Internal/ErrorReporter/Editor/ErrorReportUI.cs:184)
Anatawa12.AvatarOptimizer.ErrorReporting.ErrorReportUI.ReloadErrorReport () (at Packages/com.anatawa12.avatar-optimizer/Internal/ErrorReporter/Editor/ErrorReportUI.cs:15)
Anatawa12.AvatarOptimizer.ErrorReporting.BuildReport.SaveReport () (at Packages/com.anatawa12.avatar-optimizer/Internal/ErrorReporter/Editor/BuildReport.cs:80)
Anatawa12.AvatarOptimizer.ErrorReporting.BuildReport+AvatarReportScope.Dispose () (at Packages/com.anatawa12.avatar-optimizer/Internal/ErrorReporter/Editor/BuildReport.cs:90)
Anatawa12.AvatarOptimizer.OptimizerProcessor.ProcessObject (Anatawa12.AvatarOptimizer.OptimizerSession session) (at Packages/com.anatawa12.avatar-optimizer/Editor/OptimizerProcessor.cs:116)
Anatawa12.AvatarOptimizer.ApplyOnPlay.MaybeProcessAvatar (Anatawa12.AvatarOptimizer.RuntimeUtil+OnDemandSource source, UnityEngine.MonoBehaviour component) (at Packages/com.anatawa12.avatar-optimizer/Editor/ApplyOnPlay.cs:54)
Anatawa12.AvatarOptimizer.AvatarTagComponent.Awake () (at Packages/com.anatawa12.avatar-optimizer/Runtime/AvatarTagComponent.cs:21)

確認したバージョン

  • 1.0.0-beta3
@hitsub
Copy link
Contributor Author

hitsub commented Jun 15, 2023

恐らくこのエラーによってビルドがAbortedされるようです。
その際ErrorReportUIには何も表示されません。

ErrorReportUIを表示した状態でビルドすると正常にビルドされます。

ビルド失敗時のエラーは以下です。

The VRCSDK build was aborted because the VRCSDKPreprocessAvatarCallback 'EarlyOptimizerProcessor' reported a failure.
UnityEngine.Debug:LogError (object)
VRC.SDKBase.Editor.BuildPipeline.VRCBuildPipelineCallbacks:OnPreprocessAvatar (UnityEngine.GameObject)
VRC.SDK3.Builder.VRCAvatarBuilder:ExportCurrentAvatarResource (UnityEngine.Object,bool)
VRC.SDK3.Builder.VRCAvatarBuilder:ExportAndTestAvatarBlueprint (UnityEngine.GameObject)
VRC.SDKBase.Editor.VRC_SdkBuilder:ExportAndTestAvatarBlueprint (UnityEngine.GameObject)
VRC.SDK3.Editor.VRCSdkControlPanelAvatarBuilder3A:OnGUIAvatar (VRC.SDKBase.VRC_AvatarDescriptor) (at Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/VRCSdkControlPanelAvatarBuilder3A.cs:537)
VRC.SDKBase.Editor.VRCSdkControlPanelAvatarBuilder:ShowBuilder () (at Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/ControlPanel/VRCSdkControlPanelAvatarBuilder.cs:160)
VRCSdkControlPanel:ShowBuilders () (at Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/ControlPanel/VRCSdkControlPanelBuilder.cs:355)
VRCSdkControlPanel:OnGUI () (at Packages/com.vrchat.base/Editor/VRCSDK/Dependencies/VRChat/ControlPanel/VRCSdkControlPanel.cs:215)
UnityEngine.GUIUtility:ProcessEvent (int,intptr)

@anatawa12
Copy link
Owner

バッググラウンドかで画面が内部的に存在する状態を想定していませんでした。修正します。遅くなりすみません

@hitsub
Copy link
Contributor Author

hitsub commented Jun 16, 2023

修正ありがとうございます!

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

Successfully merging a pull request may close this issue.

2 participants