Opened 11 years ago

Closed 10 years ago

#1359 closed defect (fixed)

Unable to load geoimages

Reported by: Łukasz Jernaś Owned by: cbro@…
Priority: critical Milestone:
Component: merkaartor Version:
Keywords: Cc: deejay1@…

Description

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.

Change History (2)

comment:1 Changed 11 years ago by Łukasz Jernaś

Using

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

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

comment:2 Changed 10 years ago by schluessler

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.