{"record":{"id":"4167c677042d66a2","repo":"Intervention/image","slug":"failed-to-create-new-core","errorCode":null,"errorMessage":"Failed to create new core","messagePattern":"Failed to create new core","errorType":"exception","errorClass":"DriverException","httpStatus":null,"severity":"error","filePath":"src/Drivers/Imagick/Driver.php","lineNumber":91,"sourceCode":"            throw new DriverException('Failed to create new image', previous: $e);\n        }\n\n        return new Image($this, new Core($imagick));\n    }\n\n    /**\n     * {@inheritdoc}\n     *\n     * @see DriverInterface::createCore()\n     *\n     * @throws DriverException\n     */\n    public function createCore(array $frames): CoreInterface\n    {\n        try {\n            $core = new Core(new Imagick());\n        } catch (ImagickException $e) {\n            throw new DriverException('Failed to create new core', previous: $e);\n        }\n\n        foreach ($frames as $frame) {\n            $core->add($frame);\n        }\n\n        $this->applyDefaultSettings($core->native());\n\n        return $core;\n    }\n\n    /**\n     * {@inheritdoc}\n     *\n     * @see DriverInterface::colorProcessor()\n     */\n    public function colorProcessor(ImageInterface $image): ColorProcessorInterface\n    {","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Drivers/Imagick/Driver.php#L73-L109","documentation":"Constructing the internal Core around a fresh new Imagick() threw an ImagickException inside Driver::createCore(). This is an internal/low-level path used when assembling multi-frame cores; it is rare and almost always signals an Imagick object state problem rather than bad arguments. The native exception is chained as previous.","triggerScenarios":"Animation composition paths that call createCore() with frames while the Imagick extension/environment is in a degraded state; passing frames that leave the core in an inconsistent state.","commonSituations":"Long-running workers whose Imagick state degraded after prior errors; mismatched imagick extension vs ImageMagick library versions.","solutions":["Read $e->getPrevious()->getMessage() for the native reason","Ensure every entry in $frames is a valid Imagick single-frame object","If the imagick extension version is out of sync with the ImageMagick library, reinstall/align them and restart the worker"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    $core = $driver->createCore($frames);\n} catch (\\Intervention\\Image\\Exceptions\\DriverException $e) {\n    $native = $e->getPrevious()?->getMessage() ?? 'unknown';\n    throw new RuntimeException('Core creation failed: ' . $native, 0, $e);\n}","preventionTips":["Ensure frames passed to core assembly are valid single-frame Imagick objects","Restart long-running workers after imagick extension or library updates"],"tags":["imagick","core","internal","animation"],"backgroundTag":"image-create-failed","analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}