{"record":{"id":"3ab5ca82fb041a16","repo":"EllanJiang/GameFramework","slug":"there-is-no-resource-group-being-updated","errorCode":null,"errorMessage":"There is no resource group being updated.","messagePattern":"There is no resource group being updated\\.","errorType":"validation","errorClass":"GameFrameworkException","httpStatus":null,"severity":"error","filePath":"GameFramework/Resource/ResourceManager.ResourceUpdater.cs","lineNumber":474,"sourceCode":"            {\n                if (m_DownloadManager == null)\n                {\n                    throw new GameFrameworkException(\"You must set download manager first.\");\n                }\n\n                if (!m_CheckResourcesComplete)\n                {\n                    throw new GameFrameworkException(\"You must check resources complete first.\");\n                }\n\n                if (m_ApplyingResourcePackStream != null)\n                {\n                    throw new GameFrameworkException(Utility.Text.Format(\"There is already a resource pack '{0}' being applied.\", m_ApplyingResourcePackPath));\n                }\n\n                if (m_UpdatingResourceGroup == null)\n                {\n                    throw new GameFrameworkException(\"There is no resource group being updated.\");\n                }\n\n                m_UpdateWaitingInfo.Clear();\n                m_UpdatingResourceGroup = null;\n            }\n\n            /// <summary>\n            /// 更新指定资源。\n            /// </summary>\n            /// <param name=\"resourceName\">要更新的资源名称。</param>\n            public void UpdateResource(ResourceName resourceName)\n            {\n                if (m_DownloadManager == null)\n                {\n                    throw new GameFrameworkException(\"You must set download manager first.\");\n                }\n\n                if (!m_CheckResourcesComplete)","sourceCodeStart":456,"sourceCodeEnd":492,"githubUrl":"https://github.com/EllanJiang/GameFramework/blob/d0c010b05167c58e92350449d04864a91ca13fd2/GameFramework/Resource/ResourceManager.ResourceUpdater.cs#L456-L492","documentation":"Thrown by ResourceUpdater.StopUpdateResources when UpdateResources was never started, i.e. no resource group is currently in an updating state. It is a state guard preventing a meaningless stop; only call StopUpdateResources after UpdateResources has begun an update.","triggerScenarios":"Calling StopUpdateResources() when no UpdateResources call is currently in progress — before any update started, or after the group already finished updating.","commonSituations":"Defensive 'stop everything' teardown called when updates already completed; user hits cancel after downloads finished; double-invoking StopUpdateResources.","solutions":["Track whether an update is running (via ResourceUpdateStart/ResourceUpdateAllComplete events) and only call StopUpdateResources in that window.","Treat this as a non-error in your flow: check your own started/stopped state before calling, or catch and ignore.","Debounce the stop call so repeated cancel clicks only invoke it once."],"exampleFix":"// before\nresourceComponent.StopUpdateResources();\n// after\nif (m_UpdateStarted && !m_UpdateFinished)\n{\n    resourceComponent.StopUpdateResources();\n    m_UpdateStarted = false;\n}","handlingStrategy":"validation","validationCode":"if (m_UpdateStarted && !m_UpdateFinished) { resourceComponent.StopUpdateResources(); m_UpdateStarted = false; }","typeGuard":"bool CanCallStopUpdate => m_UpdateStarted && !m_UpdateFinished;","tryCatchPattern":"try { resourceComponent.StopUpdateResources(); }\ncatch (GameFrameworkException ex) when (ex.Message.Contains(\"no resource group\"))\n{\n    // no update running; treat as no-op\n}","preventionTips":["Flip a started flag on ResourceUpdateStart and clear it on ResourceUpdateAllComplete","Debounce cancel clicks to avoid duplicate stop calls","Treat redundant stop attempts as benign and suppress them with your own state"],"tags":["lifecycle","resource-group","gameframework"],"backgroundTag":"invalid-state-transition","analyzedSha":"d0c010b05167c58e92350449d04864a91ca13fd2","analyzedAt":"2026-09-15T13:37:15.352Z","contentChangedAt":"2026-09-15T13:37:15.352Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}