Just adding my two cents, since I got curious about this. My initial impression about this issue is that it is either caused by host (dcpp) side compiler optimizations being too aggressive for some PluginApiImpl functions due to type the casting and/or the unsafe handling of values passed to setConfig() from the plugin itself.
I am not overly familiar with the C++ side of plugins on the dll/plugin side (i.e. the various helpers) or this plugins source code but looking at it I'd say there is a risk of the plugin invalidating the rules vector when config changes are made that has always been there. Short version: why isn't Plugin::saveConfig() called under a lock to begin with? Right now if GUI::ok() is ever called twice for any reason, in succession (e.g. double click on the button perhaps, not familiar enough with DWT, let alone the version the plugin is compiled against, to say how those handlers work), there could be a tiny window where the plugin will send incorrect memory addresses to the host. Personally I would make Plugin::saveConfig() and equivalents to operate on a manual copy of the original data in every plugin using C++. -- You received this bug notification because you are a member of Dcplusplus-team, which is subscribed to DC++. https://bugs.launchpad.net/bugs/1656337 Title: DC++ crash when running DescriptionRotator plugin Status in DC++: Confirmed Bug description: After installing the DescriptionRotator plugin i was going to add my first description and when i pressed OK, DC++ crashed with this CrashLog: DC++ has crashed on 2017-01-13 at 16:11:01. Please report this data to the DC++ team for further investigation. DC++ version: DC++ v0.864 ("341276acc708 - 2017-01-09 22:09 +0100") TTH: UC56A33VPQ2B7V55ZOXKPRVEVGV27TJBQMIFFMY Compiled with MinGW-w64's GCC 6.2.0 (x64) Exception code: c0000005 Windows version: major = 6, minor = 2, build = 9200, SP = 0, type = 1 Processors: 8 * x64 System memory installed: 31,88 GiB Writing the stack trace... msvcrt: [Failed to load the debugging data into memory (error: 2)] strlen DCPlusPlus: H:/mingw64/lib/gcc/x86_64-w64-mingw32/6.2.0/include/c++/bits/basic_string.tcc (217), function: void/unknown setConfig(char const* guid, char const* setting, ConfigValuePtr val, PluginManager* pm) DescriptionRotator-x64: E:\DCDev\plugins\DescriptionRotator\projects\make/../../pluginsdk/Config.h (67), function: void/unknown setConfig(char const* name, string const& const value) DescriptionRotator-x64: e:/dcdev/compiler/mingw64/x86_64-w64-mingw32/include/c++/4.8.0/ext/atomicity.h (79), function: void/unknown saveConfig(Plugin* const this) DescriptionRotator-x64: E:\DCDev\plugins\DescriptionRotator\projects\make/../../src/Plugin.cpp (91), function: void/unknown setRules(vector<Rule, std::allocator<Rule> > const rules) DescriptionRotator-x64: E:\DCDev\plugins\DescriptionRotator\projects\make/../../dwt/include/dwt/widgets/../aspects/../Widget.h (274), function: void/unknown _M_invoke(_Any_data const& const __functor) DescriptionRotator-x64: e:/dcdev/compiler/mingw64/x86_64-w64-mingw32/include/c++/4.8.0/functional (2058), function: bool _M_invoke(_Any_data const& const __functor, tagMSG const& const __args#0, long long int& const __args#1) DescriptionRotator-x64: e:/dcdev/compiler/mingw64/x86_64-w64-mingw32/include/c++/4.8.0/bits/stl_list.h (155), function: bool handleMessage(Widget* const this, MSG const& const msg, LRESULT& const retVal) DescriptionRotator-x64: E:\DCDev\plugins\DescriptionRotator\projects\make/../../dwt/src/widgets/Control.cpp (104) DescriptionRotator-x64: E:\DCDev\plugins\DescriptionRotator\projects\make/../../dwt/src/Dispatcher.cpp (78) USER32: [Failed to load the debugging data into memory (error: 2)] DispatchMessageW USER32: [Failed to load the debugging data into memory (error: 2)] CharLowerBuffW USER32: [Failed to load the debugging data into memory (error: 2)] SendMessageW COMCTL32: [Failed to load the debugging data into memory (error: 2)] ImageList_SetOverlayImage COMCTL32: [Failed to load the debugging data into memory (error: 2)] ImageList_SetOverlayImage USER32: [Failed to load the debugging data into memory (error: 2)] DispatchMessageW USER32: [Failed to load the debugging data into memory (error: 2)] CallWindowProcW DescriptionRotator-x64: E:\DCDev\plugins\DescriptionRotator\projects\make/../../dwt/src/Dispatcher.cpp (274), function: LRESULT chain(ChainingDispatcher* const this, MSG const& const msg) DescriptionRotator-x64: E:\DCDev\plugins\DescriptionRotator\projects\make/../../dwt/src/Dispatcher.cpp (95) USER32: [Failed to load the debugging data into memory (error: 2)] DispatchMessageW USER32: [Failed to load the debugging data into memory (error: 2)] NotifyWinEvent DCPlusPlus: H:\Dev\DC++\repo/dwt/src/Application.cpp (217), function: bool dispatch(Application* const this, MSG msg) DCPlusPlus: H:\Dev\DC++\repo/dwt/src/widgets/ModalDialog.cpp (94), function: int show(ModalDialog* const this, Widget* root) DCPlusPlus: H:\Dev\DC++\repo/win32/SettingsDialog.cpp (94), function: int run(SettingsDialog* const this, void/unknown <lambda(dcpp::SettingsManager::IntSetting)>, <lambda(dcpp::SettingsManager::IntSetting)> sizeVal) To manage notifications about this bug go to: https://bugs.launchpad.net/dcplusplus/+bug/1656337/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp