Modify

Opened 10 years ago

Closed 10 years ago

#10045 closed defect (fixed)

Could not rename file! when writing geolocation data

Reported by: pnorman Owned by: bastiK
Priority: normal Milestone:
Component: Plugin photo_geotagging Version: tested
Keywords: Cc:

Description (last modified by Don-vip)

This is probably something specific to one of my files, but when you've got 2k images in a directory it's a bit hard to be specific.

Steps to produce:

Load GPX files
Load and correlate images to the 3-4 files

Write to header, altering timestamps, no backup

The error "Could not rename file!" appears

This is the console output

INFO: Open 1951 files
INFO: GET https://api.openstreetmap.org/api/0.6/user/details (get number of unread messages)
INFO: GET https://api.openstreetmap.org/api/0.6/user/details (get number of unread messages)
ERROR:  Invalid image
java.io.IOException: Could not rename file!
        at org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingAction$GeoTaggingRunnable.chooseFilesNoBackup(GeotaggingAction.java:290)
        at org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingAction$GeoTaggingRunnable.chooseFiles(GeotaggingAction.java:251)
        at org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingAction$GeoTaggingRunnable.realRun(GeotaggingAction.java:212)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:150)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)

Version 7000

Attachments (0)

Change History (14)

comment:1 by Don-vip, 10 years ago

Component: Core image mappingPlugin photo_geotagging
Owner: changed from team to bastiK

comment:2 by Don-vip, 10 years ago

Description: modified (diff)

comment:3 by Don-vip, 10 years ago

Description: modified (diff)

comment:4 by Don-vip, 10 years ago

As file renaming is OS-dependent, could you please attach your status report? (first three blocks of Help->Show Status report). Thanks.

in reply to:  4 comment:5 by bastiK, 10 years ago

In [o30457].

Please try again.

Also this:

Replying to Don-vip:

As file renaming is OS-dependent, could you please attach your status report? (first three blocks of Help->Show Status report). Thanks.

comment:6 by Don-vip, 10 years ago

@bastiK: If needed, Java 7 has introduced a new method to rename files, with proper exceptions when something goes wrong.

comment:7 by pnorman, 10 years ago

Updated to 7146, error still occurs, but it now gives more information

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-05-20 01:35:44
Last Changed Author: simon04
Revision: 7146
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-05-19 18:17:18 +0200 (Mon, 19 May 2014)
Last Changed Rev: 7146

Identification: JOSM/1.5 (7146 en) Windows 7 64-Bit
Memory Usage: 1963 MB / 1963 MB (1060 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
VM arguments: [-Xmx2G]
ERROR:  Invalid image
java.io.IOException: Could not rename file H:\osm\photos\245_0518\IMG_0258.JPG to H:\osm\photos\245_0518\imga7b0f250-b12
9-463c-affb-8529c0966584.jpg!
        at org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingAction$GeoTaggingRunnable.chooseFilesNoBackup(Geota
ggingAction.java:292)
        at org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingAction$GeoTaggingRunnable.chooseFiles(GeotaggingAct
ion.java:251)
        at org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingAction$GeoTaggingRunnable.realRun(GeotaggingAction.
java:212)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:150)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
INFO: GET https://api.openstreetmap.org/api/0.6/user/details (get number of unread messages)

Potentially related: I have thumbnails on, but one image doesn't show the thumbnail, it shows the small camera icon. That image is IMG_0257.JPG, the one before the one the error reports.

comment:8 by pnorman, 10 years ago

Note: When rerunning it, I now get it erroring on

java.io.IOException: Could not rename file H:\osm\photos\245_0518\IMG_1297.JPG to H:\osm\photos\245_0518\imgcab15738-107
d-442d-80c0-c843e9602a20.jpg!}}}

in reply to:  7 comment:9 by bastiK, 10 years ago

Replying to pnorman:

Potentially related: I have thumbnails on, but one image doesn't show the thumbnail, it shows the small camera icon. That image is IMG_0257.JPG, the one before the one the error reports.

This sounds indeed suspicious.

Please make a copy of your folder before running it again. With the new information on the console, try to reproduce the error when geotagging only 1-3 photos and attach those photos (or send to phaaurlt@…).

comment:10 by pnorman, 10 years ago

Please make a copy of your folder before running it again. With the new information on the console, try to reproduce the error when geotagging only 1-3 photos and attach those photos (or send to phaaurlt@…)

I did some tests, and it doesn't always error on the same photos. The complete directories of 2k images are ~4GB

I've been unable to produce the error on a directory with just a few photos, but this could just be statistics.

comment:11 by bastiK, 10 years ago

In [o30462].

Ok, let's try the new Java 8 IO. Otherwise I have no idea what could be the problem, sorry.

comment:12 by Don-vip, 10 years ago

@pnorman: is the problem fixed?

comment:13 by anonymous, 10 years ago

Looks like it's working now - I tried a folder of 1500 twice without errors.

comment:14 by pnorman, 10 years ago

Resolution: fixed
Status: newclosed

Above was me.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain bastiK.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.