<br /><br /><span>Am 20.01.23 13:30 schrieb <b class="name">Klaus Ziegler </b> <klausz@haus-gisela.de>:</span><blockquote cite="mid:62774bdc-07df-debc-6eb1-47d53562bd2b@haus-gisela.de" class="iwcQuote" style="border-left: 1px solid #00F; padding-left: 13px; margin-left: 0;" type="cite"><div class="mimetype-multipart-mixed"><span><p>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
</p><table style="width:100%"><tbody><tr><td><p>
<br />
<br />
</p><div class="moz-cite-prefix">On 1/20/23 13:27, Carsten Grzemba via
oi-dev wrote:<br />
</div>
<blockquote cite="mid:bf4b7a72236a.63ca96c2@contac-dt.de" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<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" target="1">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/" target="1">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" target="1">"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" target="1">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/" target="1">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>Carsten</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" target="1">oi-dev@openindiana.org</a>
<a class="moz-txt-link-freetext" href="https://openindiana.org/mailman/listinfo/oi-dev" target="1">https://openindiana.org/mailman/listinfo/oi-dev</a>
</pre>
</blockquote>
Hi Carsten,<br />
try setting CFLAGS including -fcommon<br />
Rgds<br />
Klaus<br />
</td></tr></tbody></table>
</span>
</div></blockquote><div><span>Hi Klaus,</span></div><div><span><br /></span></div><div><span>no difference</span></div><div><span><br /></span></div><div><span>$ /usr/gcc/10/bin/g++ -fcommon -g -o jens -l exiv2 jens.cpp <br />grzemba@oi-sr ~/Tests $ ./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 /> </span></div><div><span>For completeness the stack</span></div><div><span><br /></span></div><div><span>$ mdb ./jens core<br />Loading modules: [ libc.so.1 ld.so.1 ]<br />> $G<br />C++ symbol demangling enabled<br />> ::stack<br />libc.so.1`_lwp_kill+0xa()<br />libc.so.1`raise+0x1e(6)<br />libc.so.1`abort+0x58()<br />libstdc++.so.6.0.28`__gnu_cxx::__verbose_terminate_handler+0x65()<br />libstdc++.so.6.0.28`__cxxabiv1::__terminate+9()<br />0x7fffad7071d1()<br />0x7fffaec8155c()<br />libexiv2.so.0.27.5`Exiv2::XmpProperties::nsInfoUnsafe+0x15a()<br />libexiv2.so.0.27.5`Exiv2::XmpProperties::ns+0xf8()<br />main+0xbf()<br />_start_crt+0x87()<br />_start+0x18()<br /><br /></span></div><div><br /><span></span></div><div>Carsten<br /></div><span><br /></span>