I know I made a couple of changes in one of the libraries to fix this issue. My MFG tool only crashes rarely now, I think usually after I've left it running all night.
I made the switch statement in OpUtpUpdate.cpp
case OPEVENT_VOLUME_ARRIVAL:
if ( m_CurrentDeviceState == UCL::DeviceState::Updater )
{
if (m_pUTP != NULL)
{
delete m_pUTP;
m_pUTP = NULL;
}
Sleep(2000);
m_pUTP = new UpdateTransportProtocol((Volume*)m_pUSBPort->_device);
}
break;
case OPEVENT_VOLUME_REMOVAL:
if (m_pUTP != NULL)
{
delete m_pUTP;
m_pUTP = NULL;
Sleep(2000);
and in UpdateTransportProtocol.h I added a private member
DWORD dwUtpDeviceAddr;
then edited UpdateTransportProtocol(Volume* pDevice)
to have:
{
m_pUtpDevice = pDevice;
dwUtpDeviceAddr = (DWORD)m_pUtpDevice;
m_MaxPacketSize = Volume::MaxTransferSizeInBytes;
UtpCommand(CString cmd) to have:
if ((UINT32)(m_pUtpDevice->m_pBuffer) & 0xF0000000)
return FALSE;
if(m_pUtpDevice != NULL)
((Volume*)m_pUtpDevice)->Notify(cmdProgress);
and finally UtpWrite(...) to have
dwUtpDeviceAddr = (DWORD)m_pUtpDevice;
instead of DWORD dwUtpDeviceAddr = (DWORD)m_pUtpDevice;
Not sure if that I had the exact same issue but I can recall there being a null-reference that was crashing the app.
Offtopic:
Also any idea how I can get the source for the 1.6.2.055 for the binary that is available in this group?