Summary: | Exiv2 cannot open file on NTFS within non-english directory | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Konstantin <Shtirliz.Shtepa> |
Component: | Metadata-Engine | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | caulier.gilles, metzpinguin |
Priority: | NOR | ||
Version: | 4.9.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.3.0 | |
Sentry Crash Report: |
Description
Konstantin
2015-04-11 17:22:24 UTC
From the backtrace, the crash pass to libkexiv2 and down to Exiv2 shared lib. I recommend to forward this file to Exiv2 bugzilla. Sound like the problem is relevant of this library. See http://www.exiv2 .org Gilles Caulier (In reply to Gilles Caulier from comment #1) > From the backtrace, the crash pass to libkexiv2 and down to Exiv2 shared lib. > I recommend to forward this file to Exiv2 bugzilla. Sound like the problem > is relevant of this library. > Gilles Caulier Well. I don't think that this is so simple to think that this is just EXIV2 bug(if it even was). I tested it more and there a full log with my coomments: https://drive.google.com/file/d/0B0HrM03esTe-V0NpTUliWlRJN2c/view?usp=sharing You see there a 4 step when Exiv2 is called when output set to XFS Linux. (3 call from toolOperations, after first one call file size changed from 0 MB to 2,7 MB) And only two steps when Exiv2 is called when you output set to NTFS(only one call(and this call doesn't throw any exceptions!) from tool operations! After this call file size is unchanded and = 0 MB). I can't just create bug on EXIV2 bugtracker if I don't know that this is EXIV2 fault for sure. And I don't know inner structure of digikam and cannot understand where and what does wrong in digilkam so I can track problem. Can you give me some hints what can go wrong after first step when output set to NTFS so file size remains zero? Ugh. Doesn't pay attention to fact that in log names of temfiles in calls and names of tempfiles in my comments may differ. It kind of my fault. I append them from my other gdb session and forget to change them. In digiKam we handle metadata through libkexiv2, which is a Qt wrapper around Exiv2 library. libkexiv2 use Qt. File paths are stored in QString which use UTF8. Exiv2 is pure C++ lib. I don't know how UTF-8 is managed and if all way respected this encoding. To be sure just try to use Exiv2 CLI tool to change a metadata to a file stored in NTFS with non ASCII char as file path. If problem is reproducible with Exiv2 CLI tool, it's clear problem is located in this lib. Note : your backtrace indicate that crash down to Exiv2. This must never happen. Exiv2 use C++ exception to handle problem. Exception are catch by libkexiv2 in top level. So, outside the char encoding problem, the crash from Exiv2 is abnormal and must be reported to Exiv2 bugzilla. This cannot be fixed in libkexiv2. Gilles Caulier (In reply to Gilles Caulier from comment #4) Sorry, you are right. I just messed up with mount options - writed fmask=113,dmask=022 instead of fmask=113,dmask=002. So file can be creared and readed, but cannot be writed. >_< But! It would be really good to add to function JPEGLoader::load in digikam/core/libs/dimg/loaders/jpegloader.cpp:111 string kDebug() << "Failed to open file \"" << filePath << "\" with flags 'rb'"; and to function JPEGLoader::save in digikam/core/libs/dimg/loaders/jpegloader.cpp:641 string kDebug() << "Failed to open file \"" << filePath << "\" with flags 'wb'"; Maik, Since you have implmented UNC support for Windows, perhaps this file can be turned as Resolved/Fixed ? Gilles Well, under Windows we now use UTF16 for Windows throughout. This is about NTFS on Linux. We use UTF8 under Linux, even when QFile::encodeName() was used back then. The problem is more on the side of mounting NTFS on Linux, I mean knowing that you can specify the code page. So from our side we can't do anything anymore, we fully support UTF8/16. We should close ... Maik |