Skip to content
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

Photo Scan stops when $pelIfdGPS->getEntry(PelTag::GPS_LATITUDE_REF) is null. #671

Closed
zhangguojvn opened this issue Dec 12, 2021 · 17 comments

Comments

@zhangguojvn
Copy link

Error: Call to a member function getValue() on null in /var/www/html/custom_apps/maps/lib/Service/PhotofilesService.php:479

Stack trace:

#0 /var/www/html/custom_apps/maps/lib/Service/PhotofilesService.php(384): OCA\Maps\Service\PhotofilesService->getExifPelBackup(Object(OC\Files\Node\File))

#1 /var/www/html/custom_apps/maps/lib/Service/PhotofilesService.php(264): OCA\Maps\Service\PhotofilesService->getExif(Object(OC\Files\Node\File))

#2 /var/www/html/custom_apps/maps/lib/BackgroundJob/AddPhotoJob.php(56): OCA\Maps\Service\PhotofilesService->addPhotoNow(Object(OC\Files\Node\File), 'user')

#3 /var/www/html/lib/public/BackgroundJob/Job.php(79): OCA\Maps\BackgroundJob\AddPhotoJob->run(Array)

#4 /var/www/html/lib/public/BackgroundJob/QueuedJob.php(47): OCP\BackgroundJob\Job->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))

#5 /var/www/html/cron.php(128): OCP\BackgroundJob\QueuedJob->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))

#6 {main}

@zhangguojvn
Copy link
Author

I found that this keyword is optional. How should we deal with the situation that the keyword is empty?

https://dicom.innolitics.com/ciods/vl-photographic-image/vl-photographic-geolocation/00160071

@kovge
Copy link
Contributor

kovge commented Feb 3, 2022

Hi @zhangguojvn ,

i have made a pull request regarding exif data issues: #586
There is a refactor with robost error handling.
Do you have a chance to test if this pull request resolves your problem?

Thank you

@umgfoin umgfoin added bug and removed bug labels Mar 3, 2022
@tacruc
Copy link
Collaborator

tacruc commented Jun 16, 2022

Could you check if v0.2.0-1-nightly solves the Issue.
It can be installed by
occ app:install maps --allow-unstable
or updated
occ app:update maps --allow-unstable

@elearningdienst
Copy link

Try to do that. System installed not the nightly build.

sudo -u www-data php /var/www/nextcloud/occ app:install maps --allow-unstable
maps 0.1.10 installed
maps enabled

What can I do to let nextcloud recognise the nightly build?

@tacruc
Copy link
Collaborator

tacruc commented Jun 23, 2022

Can you try
sudo -u www-data php /var/www/nextcloud/occ app:install --allow-unstable maps

@elearningdienst
Copy link

That has the same issue.

sudo -u www-data php /var/www/nextcloud/occ app:install --allow-unstable maps
maps 0.1.10 installed
maps enabled

@elearningdienst
Copy link

Installed manually. But can't test. I'm on PHP8.1, so the app could not be activated. Didn't realized the PHP Version requirement before.

@adripo
Copy link
Contributor

adripo commented Jul 31, 2022

I am not having this same error, but I have some photos on map at 0N,0W. I checked with ExifTool and found out that the GPS fields are present but have null values. I think this issue might be related. Can those be excluded from the map?

image
image

@kovge
Copy link
Contributor

kovge commented Jul 31, 2022

Hi @adripo

i added in my old commit a parameter to the validate function in ExifGeoData class.
Here: public function validate( $invalidate_zero_iland = false )
If this parameter is true, than the photo won't go through the validation in case if it has invalid or NULL geoocoordinates.

This parameter is not configurable in settings at the moment.

If it is true, than you have the issue, that the photo is not shown on map at all.

If it is shown (like now) you have a chance to add a location for it.

I guess it could be also a nice change , that the Zero Island checking is confifurable via the app's settings.

@tacruc
Copy link
Collaborator

tacruc commented Jul 31, 2022

@kovge
The zero island should be invalid by default in version v0.2.0? See

$exif_geo_data->validate(true);

So there are two reasons for the images to still show up.

  1. The scan was done before v0.2.0.

Then it should be resolved by
occ maps:scan-photos
(optionally with --now)

  1. I am missing something.

@adripo
Copy link
Contributor

adripo commented Aug 1, 2022

  1. The scan was done before v0.2.0.

Then it should be resolved by occ maps:scan-photos (optionally with --now)

I did the manual scan once I installed the app 2 days ago, already with 0.2.0.
Anyway I lunched the scan again but nothing changed. If can be helpful I can share an image with this issue with you.

@adripo
Copy link
Contributor

adripo commented Aug 1, 2022

@tacruc I sent you an email with one file having this issue.

@tacruc
Copy link
Collaborator

tacruc commented Aug 1, 2022

@adripo would it be OK for you, if I include a downscaled Version of the image as a testcase?
You can check https://github.com/nextcloud/maps/tree/master/tests/test_files/Photos/WithDateAndLocation how far I scale them down sofar. I probably go down to 1x1 pixel, but I would like to keep the metadata.

@adripo
Copy link
Contributor

adripo commented Aug 2, 2022

@tacruc Sure, no problem. I'm ok with scaling it down.

@tacruc
Copy link
Collaborator

tacruc commented Aug 4, 2022

@adripo can you confirm that #811 resolves the issue?
Probably you will have to rescan.

@adripo
Copy link
Contributor

adripo commented Aug 5, 2022

@tacruc I just checked and it solves the issue.
I tested it by uploading a photo with the 2.0.0 version and then the same photo with the version from your pr. As you can see in the db, with the new version the lat and long are correctly set to null for the same photo.
image
I will do a full rescan as soon as the new version will be released because it takes several hours.
Thank you

@tacruc
Copy link
Collaborator

tacruc commented Aug 7, 2022

OK I will try to publish a New release soon, but I don't make it this week.

@tacruc tacruc closed this as completed Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants