Hi Dersomn,
You have already initialized XMPFiles by calling "SXMPFiles::Initialize();" why are you again trying to initialize with the following statement
if(!myfile.Initialize(opts)){
qDebug()<<"FailedtoinitializeSXMPFile.";
}
This code is not required. However theorecticaly there shouldn't be any issue by calling the above statement. But if you can please remove it.
I tried on my end to reproduce the issue but I couldn't find any issue. You have the same statement which XMP SDK provides in ReadingXMP example.
So could you please let me know
1. Is the above code failes first time on the a file and second time runs successfully on the same file
or 2. There are a set of files. And when you runs the above code it runs fine for some files not for all but next time passes for those files.
If you can please send me the file(s) and steps to reproduce the issue.
-Sunil