Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.1.1
-
None
-
Win32, VS2012
-
qtactiveqt: 0d29579baffd4f31a3ec39590117f4fee821694d (5.2.1, stable, 9.12.2013) Qt: 4: 3bef845f4623e0edcd52ddcffee3612f4f7f6779 (20.12.2013, 4.8.6)
Description
IEnumConnectionPoints->Clone method makes a clone that crashes during the second call to it's Next method. The first call succeeds.
// // crash in the next method of a cloned enumerator // void crash7( IQTCrashPtr qtObject ) { IEnumConnectionPointsPtr connectionPointEnum; IConnectionPointContainerPtr( qtObject )->EnumConnectionPoints( &connectionPointEnum ); connectionPointEnum->Reset(); if( connectionPointEnum->Skip(1) == S_OK ) { IEnumConnectionPointsPtr connectionPointEnumClone; if( SUCCEEDED( connectionPointEnum->Clone( &connectionPointEnumClone ) ) ) { IConnectionPointPtr connectionPoint; DWORD fetched; while( connectionPointEnumClone->Next( 1, &connectionPoint, &fetched ) == S_OK ) // crash here during the second iteration { } } } }
Example project demonstrating the error is attached