No image of person in People view
Nearly for all persons in the people view the image is missing. I get following error in the logs:
ImagickException: negative or zero image size `' @ error/image.c/CloneImage/794
/var/www/nextcloud/apps/memories/lib/Controller/FacesController.php - line 137:
Imagick->cropImage()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 225:
OCA\Memories\Controller\FacesController->preview()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 133:
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php - line 172:
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php - line 298:
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.php - line 1047:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 36:
OC::handleRequest()
It worked in the past, so I do not understand, why it stopped working.
Can you try commenting out the $image->cropImage line in FacesController.php? You also need to clear the browser cache to test (or use a private window).
What I tried:
- reindex photos
- clear browser cache
- use different browser (chromium instead of firefox)
I always got the same result. My setup NC: 25.0.1 memories versions: 4.7.2, 4.8.0 and 4.8.1 were all affected
I will also test also commenting out the Facecontroller.
I tested it with commenting out the line. It did not resolve the issue, the error persists. The three working face images (3 of arround 100 persons work correctly) had no zoom on the face. This was tested with a private browser window.
one additional comment: the working images seem to be always an .png image. All none working images seem to be always a .jpg image. In other views (the timeline view, or the view of all images of one person, the Tag view) this problem doesn't occur. Only the person list view is affected.
Hmm. How have you installed Nextcloud? Version of PHP (and if you can get it) Imagemagick? Also can you provide a sample image? This seems like a bug in Imagick maybe.
I installed Nextlcloud with nextcloudpi. php version: 8.1.12 imagemagick version: 6.9.11
It seem to occur for all .jpg images. It is hard to provide a sample picture, because I don't know which image is used to create the thumbnail for the person.
I tested it with commenting out the line. It did not resolve the issue, the error persists.
I just looked at this more carefully. You should at least have a different error, since the line the error is ocurring at is now commented out. Can you check on this?
Also do comment out scaleImage along with the cropImage line.
First Test only with cropImage. Commented line:
/*$image->cropImage(
(int) $faceDim,
(int) $faceDim,
(int) ($dcx * $iw - $faceDim / 2)
(int) ($dcy * $ih - $faceDim / 2)
); */
Error:
ImagickException: negative or zero image size `' @ error/image.c/CloneImage/794
/var/www/nextcloud/apps/memories/lib/Controller/FacesController.php - line 145:
Imagick->scaleImage()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 225:
OCA\Memories\Controller\FacesController->preview()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 133:
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php - line 172:
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php - line 298:
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.php - line 1047:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 36:
OC::handleRequest()
Test with commenting out cropImage and scaleImage:
/*$image->cropImage(
(int) $faceDim,
(int) $faceDim,
(int) ($dcx * $iw - $faceDim / 2)
(int) ($dcy * $ih - $faceDim / 2)
);
$Image->scaleImage(256, 256, true); */
Error:
TypeError: OC\AppFramework\Middleware\MiddlewareDispatcher::beforeOutput(): Argument #3 ($output) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 178
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 178:
OC\AppFramework\Middleware\MiddlewareDispatcher->beforeOutput()
/var/www/nextcloud/lib/private/AppFramework/App.php - line 172:
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php - line 298:
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.php - line 1047:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 36:
OC::handleRequest()
One additional idea. Sometimes I have images in the people view which can't be loaded:
Is it possible that Imagemagick fails for all images when one image which can't be loaded produces an error?
I hope this is helpfull. Thank you for your great work.
Ahh, now that makes a lot of sense. There are some images failing preview generation (high-res images by any chance?) and these are being used for face generation. This is a bug.
v4.9 should likely fix this, but keeping open until confirmed.
Thanks for the fast reply. Indeed these images seem to have a high resolution (6000*8000 48MP). I'm looking forwrad for the next release
Thanks for the fast reply. Indeed these images seem to have a high resolution (6000*8000 48MP). I'm looking forwrad for the next release
In that case you need to do the configuration for high-res images in the wiki. Then they should work fine. For such a big image you might need even more memory.
I found an image which can't be loaded with following resolution: 1440x1920 So there must be still also a different issue. I tried to manually generate a preview (occ preview:pre-generate), but in memories there is still the preview missing. Of cause, this was also tested with a private window to make sure this isn't a cache issue. Any idea? size: 2.8M resolution: 1440x1920 filetype: .jpg
Does the same image show up in the Files app? It's possible there's something wrong with the JPEG.
I can open the file without any problem on my PC and it gets correctly classified by recognize. The image does not show up in the file manager and I get following error in the logs:
[PHP] Fehler: Error: file_put_contents(/media/myCloudDrive/ncdata/appdata_ochvelgsn5v1/preview/3/2/e/8/9/4/a/750152/1440-1920-max.jpg): Failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#311 at <<closure>>
0. <<closure>>
OC\Log\ErrorHandler::onError()
1. /var/www/nextcloud/lib/private/Files/Storage/Local.php line 311
file_put_contents()
2. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 258
OC\Files\Storage\Local->file_put_contents()
3. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 258
OC\Files\Storage\Wrapper\Wrapper->file_put_contents()
4. /var/www/nextcloud/lib/private/Files/View.php line 1179
OC\Files\Storage\Wrapper\Wrapper->file_put_contents()
5. /var/www/nextcloud/lib/private/Files/View.php line 705
OC\Files\View->basicOperation()
6. /var/www/nextcloud/lib/private/Files/Node/Folder.php line 192
OC\Files\View->file_put_contents()
7. /var/www/nextcloud/lib/private/Files/SimpleFS/NewSimpleFile.php line 121
OC\Files\Node\Folder->newFile()
8. /var/www/nextcloud/lib/private/Preview/Generator.php line 363
OC\Files\SimpleFS\NewSimpleFile->putContent()
9. /var/www/nextcloud/lib/private/Preview/Generator.php line 162
OC\Preview\Generator->getMaxPreview()
10. /var/www/nextcloud/lib/private/Preview/Generator.php line 114
OC\Preview\Generator->generatePreviews()
11. /var/www/nextcloud/lib/private/PreviewManager.php line 185
OC\Preview\Generator->getPreview()
12. /var/www/nextcloud/core/Controller/PreviewController.php line 144
OC\PreviewManager->getPreview()
13. /var/www/nextcloud/core/Controller/PreviewController.php line 113
OC\Core\Controller\PreviewController->fetchPreview()
14. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225
OC\Core\Controller\PreviewController->getPreviewByFileId()
15. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133
OC\AppFramework\Http\Dispatcher->executeController()
16. /var/www/nextcloud/lib/private/AppFramework/App.php line 172
OC\AppFramework\Http\Dispatcher->dispatch()
17. /var/www/nextcloud/lib/private/Route/Router.php line 298
OC\AppFramework\App::main()
18. /var/www/nextcloud/lib/base.php line 1047
OC\Route\Router->match()
19. /var/www/nextcloud/index.php line 36
OC::handleRequest()
GET /index.php/core/preview?fileId=750152&x=1920&y=1080&a=true
from 141.70.9.150 by user at 2022-12-09T11:20:20+00:00
I updated today to version 4.9.2. The issue is not fixed for me. Only a few Persons have an image:
This was tested with a private window. Following error occured in the log while opening the person view:
[core] Fehler: Sabre\VObject\Recur\MaxInstancesExceededException: Recurring events are only allowed to generate 3500 at <<closure>>
0. /var/www/nextcloud/apps/dav/lib/CalDAV/Reminder/ReminderService.php line 485
Sabre\VObject\Recur\EventIterator->valid()
1. /var/www/nextcloud/apps/dav/lib/CalDAV/Reminder/ReminderService.php line 198
OCA\DAV\CalDAV\Reminder\ReminderService->deleteOrProcessNext()
2. /var/www/nextcloud/apps/dav/lib/BackgroundJob/EventReminderJob.php line 68
OCA\DAV\CalDAV\Reminder\ReminderService->processReminders()
3. /var/www/nextcloud/lib/public/BackgroundJob/Job.php line 78
OCA\DAV\BackgroundJob\EventReminderJob->run()
4. /var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php line 103
OCP\BackgroundJob\Job->start()
5. /var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php line 93
OCP\BackgroundJob\TimedJob->start()
6. /var/www/nextcloud/cron.php line 152
OCP\BackgroundJob\TimedJob->execute()
at 2022-12-09T11:32:39+00:00
I made some more tests:
- other users on the cloud are also affected
- Person (Face Recognition) is also affected
I am currently having the issue of no thumbnails under People (Face Recognition), did anyone ever resolve this somehow?
Is it only facerecognition or also recognize? I did not resolve it and it's still an issue for me.i think it's somehow related to the image file format. You could try .jpg .png to verify this. Are you talking about the people timeline or the person list?
Am 16. März 2023 08:58:22 MEZ schrieb MikeDuncan1 @.***>:
I am currently having the issue of no thumbnails under People (Face Recognition), did anyone ever resolve this somehow?
-- Reply to this email directly or view it on GitHub: https://github.com/pulsejet/memories/issues/230#issuecomment-1471476094 You are receiving this because you authored the thread.
Message ID: @.***>
Fixed. Solution is here: https://github.com/pulsejet/memories/issues/495#issuecomment-1495470631