{"record":{"id":"6338ef0b86bb6536","repo":"HMCL-dev/HMCL","slug":"interrupted-while-waiting-for-pending-instance-wri","errorCode":null,"errorMessage":"Interrupted while waiting for pending instance writes","messagePattern":"Interrupted while waiting for pending instance writes","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java","lineNumber":138,"sourceCode":"        return (HMCLGameInstance) super.getInstance(id);\n    }\n\n    /// Returns the indexed instance for the given id, or `null` when it is not loaded.\n    ///\n    /// @param id the instance id\n    /// @return the instance, or `null` when absent\n    public @Nullable HMCLGameInstance findInstance(GameInstanceID id) {\n        return (HMCLGameInstance) getSnapshot().findInstance(id);\n    }\n\n    /// {@inheritDoc}\n    @Override\n    protected void flushPendingInstanceWrites() throws IOException {\n        try {\n            FileSaver.waitForAllSaves();\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            throw new IOException(\"Interrupted while waiting for pending instance writes\", e);\n        }\n    }\n\n    /// Returns the persistent game directory for this repository.\n    public GameDirectory getGameDirectory() {\n        return gameDirectory;\n    }\n\n    /// Returns the selected instance resolved from the current repository snapshot.\n    ///\n    /// The property is `null` when the persisted selection is absent or is not registered in the\n    /// current snapshot. Publishing a new snapshot replaces the value with that snapshot's member,\n    /// even when the selected ID is unchanged.\n    ///\n    /// @return the read-only selected-instance property\n    public ReadOnlyObjectProperty<@Nullable HMCLGameInstance> selectedInstanceProperty() {\n        return selectedInstance.getReadOnlyProperty();\n    }","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/HMCL-dev/HMCL/blob/24702dc5a0214034f4c27166d5fd30cad08cec19/HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java#L120-L156","documentation":"Validation failure: the manifest's addons array must be present (it records loader/mod dependencies like Forge). validate() throws JsonParseException when addons is null. An empty array is acceptable; a missing one is not.","triggerScenarios":"Importing an Mcbbs pack whose manifest JSON omits the \"addons\" field or sets it to null.","commonSituations":"Minimal hand-written manifests; tools exporting without addon metadata; manifests for vanilla packs that dropped the addons key instead of using [].","solutions":["Add \"addons\": [] (with loader entries if needed) to the manifest JSON","Re-export the pack with a compliant exporter","Check that the JSON was not truncated mid-file"],"exampleFix":"// before\n{\"addons\": null}\n// after\n{\"addons\": [{\"id\": \"forge\", \"version\": \"14.23.5.2859\"}]}","handlingStrategy":"validation","validationCode":"if (!manifest.has(\"addons\") || manifest.get(\"addons\").isJsonNull())\n    throw new IllegalArgumentException(\"Manifest missing addons array\");","typeGuard":null,"tryCatchPattern":"try { manifest.validate(); } catch (JsonParseException e) { /* report missing field to user */ }","preventionTips":["Always emit \"addons\": [] even for vanilla packs","Validate exported manifests before shipping","Re-export rather than hand-patching manifests"],"tags":["modpack","manifest","validation"],"backgroundTag":"missing-required-config-field","analyzedSha":"24702dc5a0214034f4c27166d5fd30cad08cec19","analyzedAt":"2026-09-10T12:36:46.680Z","contentChangedAt":"2026-09-10T12:36:46.680Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}