-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
avatar generation - disable setimageformat #35891
Conversation
Signed-off-by: Simon L <szaimen@e.mail.de>
/backport to stable25 |
This actually causes segfaults on cypress tests when creating a new user in text. nextcloud/text#3610 (comment) @szaimen Do you have any further technical insights on why the png conversion failed? The segfault is also weird, but more elaboration on this fix would be good. Is the Imagick format now kept as svg? In that case OC_Image further down server/lib/private/Avatar/Avatar.php Line 141 in a0f2180
server/lib/private/Avatar/UserAvatar.php Line 245 in f98ae2b
|
I actually also have the segfault on my dev instance. It happens when trying to get the image data from imagick using |
@szaimen Since you could reproduce the original issue can you maybe try if the following patch works instead of this one? diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php
index 791cb8b2e7f..fcec7f2dd27 100644
--- a/lib/private/Avatar/Avatar.php
+++ b/lib/private/Avatar/Avatar.php
@@ -126,7 +126,7 @@ abstract class Avatar implements IAvatar {
* Generate png avatar from svg with Imagick
*/
protected function generateAvatarFromSvg(int $size, bool $darkTheme): ?string {
- if (!extension_loaded('imagick')) {
+ if (!extension_loaded('imagick') || count(\Imagick::queryFormats('SVG')) === 0) {
return null;
}
try { |
I think I might have found the issue. |
It might be indeed an AIO issue: nextcloud/all-in-one#1624 |
Fix #34755
See #34755 (comment) and #34755 (comment) for context