Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Unable to load geoimages #1359

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

Unable to load geoimages #1359

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: deejay1
[Submitted to the original trac issue database at 10.45am, Saturday, 22nd November 2008]

When I try to open a geo localized image I get:

deejay1@sulaco:~/PRACA/osm/merkaartor$ merkaartor
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Exiv2::Error'
what(): /foobar/Multimedia/Zdj?cia/2008/11/12/imgp2614.jpg: Failed to open the data source: (2)
Aborted

The error is in GeoImageDock.cpp line 144 while transcoding to ASCII, file/path names with UTF or any other charset characters will fail.

@openstreetmap-trac
Copy link
Author

Author: deejay1
[Added to the original trac issue at 1.05pm, Saturday, 22nd November 2008]

Using

image = Exiv2::ImageFactory::open(file.toUtf8().constData());

helps but it still doesn't cover some cases I think. Any thoughts?

@openstreetmap-trac
Copy link
Author

Author: schluessler
[Added to the original trac issue at 11.16pm, Tuesday, 24th February 2009]

Thanks for your report and the recommended suggestion.
Finally I solved it by giving the filenames as std::string to Exiv2::ImageFactory::open(), because std::string is the form open() wants to have the filenames and because it can store at least the commonly used encodings (probably it can store them all).
Also GeoImageDock fetches now exceptions sent by that open() function so that qt will not complain about unhandled exceptions for that function.

regards, timo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant