Report the correct crashed plugin

Closes #1980
This commit is contained in:
dail8859 2016-06-20 17:16:27 -04:00
parent ec433863c3
commit a3bb9d294a
2 changed files with 6 additions and 6 deletions

View File

@ -470,10 +470,10 @@ void PluginsManager::notify(const SCNotification *notification)
}
catch (...)
{
TCHAR funcInfo[128];
TCHAR funcInfo[256];
generic_sprintf(funcInfo, TEXT("notify(SCNotification *notification) : \r notification->nmhdr.code == %d\r notification->nmhdr.hwndFrom == %p\r notification->nmhdr.idFrom == %d"),\
scNotif.nmhdr.code, scNotif.nmhdr.hwndFrom, scNotif.nmhdr.idFrom);
pluginCrashAlert(_pluginsCommands[i]._pluginName.c_str(), funcInfo);
pluginCrashAlert(_pluginInfos[i]->_moduleName.c_str(), funcInfo);
}
}
}
@ -498,7 +498,7 @@ void PluginsManager::relayNppMessages(UINT Message, WPARAM wParam, LPARAM lParam
{
TCHAR funcInfo[128];
generic_sprintf(funcInfo, TEXT("relayNppMessages(UINT Message : %d, WPARAM wParam : %d, LPARAM lParam : %d)"), Message, wParam, lParam);
pluginCrashAlert(_pluginsCommands[i]._pluginName.c_str(), TEXT(""));
pluginCrashAlert(_pluginInfos[i]->_moduleName.c_str(), funcInfo);
}
}
}
@ -529,7 +529,7 @@ bool PluginsManager::relayPluginMessages(UINT Message, WPARAM wParam, LPARAM lPa
{
TCHAR funcInfo[128];
generic_sprintf(funcInfo, TEXT("relayPluginMessages(UINT Message : %d, WPARAM wParam : %d, LPARAM lParam : %d)"), Message, wParam, lParam);
pluginCrashAlert(_pluginsCommands[i]._pluginName.c_str(), funcInfo);
pluginCrashAlert(_pluginInfos[i]->_moduleName.c_str(), funcInfo);
}
return true;
}

View File

@ -142,9 +142,9 @@ private:
void pluginCrashAlert(const TCHAR *pluginName, const TCHAR *funcSignature)
{
generic_string msg = pluginName;
msg += TEXT(" just crash in\r");
msg += TEXT(" just crashed in\r");
msg += funcSignature;
::MessageBox(NULL, msg.c_str(), TEXT(" just crash in\r"), MB_OK|MB_ICONSTOP);
::MessageBox(NULL, msg.c_str(), TEXT("Plugin Crash"), MB_OK|MB_ICONSTOP);
}
bool isInLoadedDlls(const TCHAR *fn) const