crash on startup: duplicate GeoTagHandler registrations

Steven Robbins steve at sumost.ca
Sun Mar 10 03:26:56 GMT 2024


Hi,

I pulled the current git sources to see how things are progressing.  Was able 
to build fine but it crashed immediately on startup due to the first assert in 
the following code:

void GeoTagHandler::registerHandler(const GeoParser::QualifiedName& qName, 
const GeoTagHandler* handler)
{
    qDebug() << "Inserting: " << qUtf8Printable(qName.first) << " / " << 
qUtf8Printable(qName.second);
    TagHash* hash = tagHandlerHash();
    Q_ASSERT(!hash->contains(qName));  <---- this one
    hash->insert(qName, handler);
    Q_ASSERT(hash->contains(qName));

#if DUMP_TAG_HANDLER_REGISTRATION > 0
    qCDebug(DIGIKAM_MARBLE_LOG) << "[GeoTagHandler] -> Recognizing" << 
qName.first << "tag with namespace" << qName.second;
#endif
}

The qDebug() code was put there by me to figure out that the duplicate is:

    address  /  http://earth.google.com/kml/2.0


This leads me to wonder: why the assert?  Is there any issue with either 
silently ignoring the second insert; or silently accepting the second insert, 
overwriting the first?

Notes: I'm building this on a Debian linux "sid"/"unstable" distribution, up 
to date as of today.  Building against Qt 5.15.10 (qtbase-opensource-src 
(5.15.10+dfsg-7)).

Thanks,
-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20240309/ba084cee/attachment.sig>


More information about the Digikam-devel mailing list