<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<br>
<div class="moz-cite-prefix">On 1/20/23 13:27, Carsten Grzemba via
oi-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:bf4b7a72236a.63ca96c2@contac-dt.de">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div>The current Gimp can't load image files format which support
EXIF data.</div>
<div><br>
</div>
<div>eg the file-jpeg or file-png command crashs on current Gimp
if it attempts to open a image file.</div>
<div><br>
</div>
<div>The crashing function is Exiv2::XmpProperties::nsInfoUnsafe</div>
<div><br>
</div>
<div>There is an old closed BUG <br>
</div>
<div>ttps://github.com/Exiv2/exiv2/pull/959</div>
<div><br>
</div>
<div>The bug is related the Error class in throwing an exception.<br>
</div>
<div>The simple test source shows our problem:</div>
<div><br>
</div>
<div>
<pre class="notranslate"><code class="notranslate">// file: jens.cpp
// <a class="moz-txt-link-freetext" href="https://github.com/Exiv2/exiv2/issues/644#issuecomment-452472029">https://github.com/Exiv2/exiv2/issues/644#issuecomment-452472029</a>
/*
Linux:
$ c++ -std=c++98 jens.cpp -I/usr/local/include -L/usr/local/lib -lexiv2 -o jens
$ ./jens
Caught error No namespace info available for XMP prefix `gnome'
<a class="moz-txt-link-freetext" href="http://www.gnome.org/xmp/">http://www.gnome.org/xmp/</a>
$
*/
#include <exiv2/exiv2.hpp>
#include <iostream>
int main(int argc, char *argv[])
{
try {
Exiv2::XmpProperties::ns("gnome");
} catch (Exiv2::Error &error) {
std::cerr << "Caught error " << error.what() << "\n";
Exiv2::XmpProperties::registerNs(<a class="moz-txt-link-rfc2396E" href="http://www.gnome.org/xmp">"http://www.gnome.org/xmp"</a>, "gnome");
}
std::cout << Exiv2::XmpProperties::ns("gnome") << std::endl;
}</code></pre>
</div>
<div>If I test with exiv2</div>
<div><br>
</div>
<div><a class="moz-txt-link-abbreviated" href="mailto:pkg://openindiana.org/image/library/exiv2@0.27.5-2020.0.1.0:20211030T093809Z">pkg://openindiana.org/image/library/exiv2@0.27.5-2020.0.1.0:20211030T093809Z</a></div>
<div><br>
</div>
<div>and compile the test source with g++ 7 it works:</div>
<div> ./jens <br>
Caught error No namespace info available for XMP prefix `gnome'<br>
<a class="moz-txt-link-freetext" href="http://www.gnome.org/xmp/">http://www.gnome.org/xmp/</a><br>
<br>
</div>
<div>and if I compile the test source with g++ 10 it crashes:</div>
<div><br>
</div>
<div> ./jens <br>
terminate called after throwing an instance of
'Exiv2::BasicError<char>'<br>
what(): No namespace info available for XMP prefix `gnome'<br>
Abort (core dumped)<br>
</div>
<div><br>
</div>
<div>Anyone how have an idea what the problem here? <br>
</div>
<div><br>
</div>
-- <br signature="separator">
<div><signatureafterquotedtext>Carsten</signatureafterquotedtext></div>
<div><signatureafterquotedtext><br>
</signatureafterquotedtext></div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
oi-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a>
<a class="moz-txt-link-freetext" href="https://openindiana.org/mailman/listinfo/oi-dev">https://openindiana.org/mailman/listinfo/oi-dev</a>
</pre>
</blockquote>
Hi Carsten,<br>
try setting CFLAGS including -fcommon<br>
Rgds<br>
Klaus<br>
</body>
</html>