Summary: | Panorama tool segfault with non-ascii characters in file paths | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | bug400 |
Component: | Plugin-Generic-Panorama | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | benjamin.girault, caulier.gilles |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kipi-plugins/b84ddbef6f43ec764fa975ba5c7b33d466ef720a | Version Fixed In: | 3.1.0 |
Sentry Crash Report: | |||
Attachments: |
GDB Output
Panorama temporary files |
Description
bug400
2013-02-10 17:55:53 UTC
The error happens at a very strange place, and I'm not sure if it is a problem with the panorama code. Can you provide the debug output also? Thanks. Created attachment 77100 [details]
GDB Output
Created attachment 77101 [details]
Panorama temporary files
I cannot reproduce this bug with two images of a random panorama. Could you send me the original (by private email if you prefer) so that I can pinpoint the problem? After investigation with your files, it appears that the segfault comes from non-ascii characters (accented characters for example) in the file paths. I confirmed this on my computer. This is a bug with the panorama plugin (maybe with the new parser) that will need to be fixed for a future version. For now, the only way to use the plugin is to avoid non-ascii characters in file paths. Typically, with Qt, to pass const char* string to C ANSI code and respect encoding, use QFile::encodeName() as here : https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/common/libkipiplugins/tools/imageio/kpwriteimage.cpp#L267 With KUrl, don't forget to use KUrl::toLocalFile() to prevent problem under Windows as here : https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/rawconverter/manager/task.cpp#L121 Gilles (In reply to comment #6) > Typically, with Qt, to pass const char* string to C ANSI code and respect > encoding, use QFile::encodeName() as here : Thanks for the tip, this might be the problem (I'll look into it this week-end). > With KUrl, don't forget to use KUrl::toLocalFile() to prevent problem under > Windows as here : I always use this function to get the file path, so for this part, it should be fine. I confirm that there are no problems with the panorama plugin if I use an album path without german umlaute Git commit b84ddbef6f43ec764fa975ba5c7b33d466ef720a by Benjamin Girault. Committed on 02/03/2013 at 22:21. Pushed by girault into branch 'master'. Panorama: bugfix Fixes char* filename conversion from and to QString M +2 -3 panorama/ptoparser/ptofile.cpp M +1 -1 panorama/ptoparser/tparser.c M +1 -1 panorama/ptoparser/tparser.h M +1 -1 panorama/ptoparser/tparserprivate.c M +1 -1 panorama/ptoparser/tparserprivate.h http://commits.kde.org/kipi-plugins/b84ddbef6f43ec764fa975ba5c7b33d466ef720a (In reply to comment #7) > (In reply to comment #6) > > Typically, with Qt, to pass const char* string to C ANSI code and respect > > encoding, use QFile::encodeName() as here : > > Thanks for the tip, this might be the problem (I'll look into it this > week-end). For information, this was half of the problem. The other half was that a char* string of a filename needs to be converted into a QString with QString::fromLocal8Bit. |