Bug 382133

Summary: processing fails, caused by too long filename
Product: [Applications] digikam Reporter: Paul Neuwirth <mail>
Component: BatchQueueManager-CoreAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: mail
Priority: NOR    
Version: 5.6.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.7.0

Description Paul Neuwirth 2017-07-08 17:31:39 UTC
There's obviously no check for too long filenames:
in my case processing works if there are no more than 4 steps. If a 5th step is added the job will fail:
digikam.general: Action Thread run  1  new jobs
digikam.general: Tool : index=  1  :: name=  "Resize"  :: group=  4  :: wurl=  QUrl("file:///storage/photos/")
digikam.general: path:  "/storage/photos/BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg"
digikam.general: Tool:        "Resize"
digikam.general: Input url:   QUrl("file:///storage/photos/IMG_20170616_151042.jpg")
digikam.general: Output url:  QUrl("file:///storage/photos/BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg")
digikam.dimg: "/storage/photos/IMG_20170616_151042.jpg"  : JPEG file identified
digikam.metaengine: Loading image history  ""
digikam.metaengine: DateTime => Exif.Photo.DateTimeOriginal =>  QDateTime(2017-06-16 15:10:42.000 CEST Qt::TimeSpec(LocalTime))
digikam.general: Detected change, triggering rescan of "/storage/photos//"
digikam.database: Starting scan!
digikam.metaengine: Exif color-space tag is sRGB. Using default sRGB ICC profile.
digikam.general: Tool : index=  2  :: name=  "AssignTemplate"  :: group=  8  :: wurl=  QUrl("file:///storage/photos/")
digikam.general: path:  "/storage/photos/BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg"
digikam.general: Tool:        "Apply Metadata Template"
digikam.general: Input url:   QUrl("file:///storage/photos/BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg")
digikam.general: Output url:  QUrl("file:///storage/photos/BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg")
digikam.general: Detected change, triggering rescan of "/storage/photos//"
[...]
digikam.general: Tool : index=  3  :: name=  "WaterMark"  :: group=  5  :: wurl=  QUrl("file:///storage/photos/")
digikam.general: path:  "/storage/photos/BatchTool-M29661-BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg"
digikam.general: Tool:        "Add Watermark"
digikam.general: Input url:   QUrl("file:///storage/photos/BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg")
digikam.general: Output url:  QUrl("file:///storage/photos/BatchTool-M29661-BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg")
digikam.general: Detected change, triggering rescan of "/storage/photos//"
digikam.database: No itemShortInfo could be retrieved from the database for image "BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg"
digikam.metaengine: Orientation => Exif.Image.Orientation =>  1
digikam.database: Starting scan!
digikam.database: No itemShortInfo could be retrieved from the database for image "BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg"
digikam.metaengine: Orientation => Exif.Image.Orientation =>  1
digikam.general: Tool : index=  4  :: name=  "WaterMark"  :: group=  5  :: wurl=  QUrl("file:///storage/photos/")
digikam.general: path:  ""
digikam.general: Tool:        "Add Watermark"
digikam.general: Input url:   QUrl("file:///storage/photos/BatchTool-M29661-BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg")
digikam.general: Output url:  QUrl("")
digikam.database: No itemShortInfo could be retrieved from the database for image "BatchTool-M29661-BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg

I assume this is caused by a too long filename:
~> touch Batchtool-A12345-BatchTool-M29661-BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg
touch: cannot touch 'Batchtool-A12345-BatchTool-M29661-BatchTool-T29661-BatchTool-J29661-IMG_20170616_151042.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg.digikamtempfile.jpg': File name too long

In this case filesystem is a NFS mount (v4, ext4 on host)

if you need any other data, i can try to deliver.. 


~> zypper if digikam
Loading repository data...
Reading installed packages...


Information for package digikam:
--------------------------------
Repository     : openSUSEKDEExtra                  
Name           : digikam                           
Version        : 5.6.0-176.1                       
Arch           : x86_64                            
Vendor         : obs://build.opensuse.org/KDE:Extra
Installed Size : 88.9 MiB                          
Installed      : Yes                               
Status         : up-to-date                        
Source package : digikam-5.6.0-176.1.src           
Summary        : A KDE Photo Manager               
Description    :                                   
    digiKam is a simple digital photo management application for KDE, which
    allows you to import and organize your digital photos easily. The
    photos can be organized in albums, which can be sorted chronologically,
    by directory layout, or by custom collections. An easy-to-use interface
    that enables you to connect to your camera and preview, download, or
    delete your images, is provided.
Comment 1 Maik Qualmann 2017-07-08 19:05:15 UTC
Git commit 78329a5b3edda0992974c7dba8d9692ef185c857 by Maik Qualmann.
Committed on 08/07/2017 at 19:04.
Pushed by mqualmann into branch 'master'.

fix growing the temporary batch tool filenames
FIXED-IN: 5.7.0

M  +2    -1    NEWS
M  +6    -5    utilities/queuemanager/manager/batchtool.cpp

https://commits.kde.org/digikam/78329a5b3edda0992974c7dba8d9692ef185c857