In case of here, I have found this deadlock defect at DWFToolkit-7.6. Example::
using namespace DWFCore;
int main()
{
DWFString testString( L"\\\\FoundMe\\BlockHere" );
DWFString toFindString( L"\\\\FoundMe" );
//Looking for FindLast equivalent
off_t index;
index = DWFString::Find( testString, toFindString, 0, true );
return 0;
}
The problem comes from DWFString::Find and the reverse lookup based on last parameter.
To fix it only change the line 2846/47 of DWFToolkit-7.6\develop\global\src\dwfcore\ansi\String.cpp
From:
for (;iFound != -1;
iFound = DWFString::Find(zString, zFind[0], iFound+1, bReverse))
To:
for (;iFound != -1;
iFound = Find(zString, zFind[0], ( bReverse ? (off_t)nStringCharLen - iFound : iFound+1 ), bReverse))
Regards
Juande
Thank you for letting us know about this defect. Reporting it as you did here in the Discussion Group is the perfect place to report it because the DWF team monitors this Discussion Group. That, plus the fact that you also published a solution to the defect, helps us fix it in the code, plus it helps other users correct it in their own copy.
Thank You!
-Sue