diff --git a/checkin_notes b/checkin_notes index 97658eceb1..8e1126a74c 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4874,3 +4874,16 @@ David 14 June 2008 clientgui/ WelcomePage.cpp,h BOINCWizards.h + +David 16 June 2008 + - client: fix crashing bug when detach from project. + The problem: the variable ordered_scheduled_results + has a list of pointers to RESULTs. + These pointers become dangling when the project is detached. + It's not sufficient to do schedule_cpus() because this returns + immediately if # projects == 0. + So clear the list directly. + Rom: please port to 6.2 + + client/ + client_state.C diff --git a/client/client_state.C b/client/client_state.C index 2fb57295a9..7f2875d89e 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -1407,8 +1407,12 @@ int CLIENT_STATE::reset_project(PROJECT* project, bool detaching) { garbage_collect_always(); - // forcibly remove apps and app_versions - // (but not if anonymous platform) + // "ordered_scheduled_results" may contain pointers (now dangling) + // to tasks of this project. + // + ordered_scheduled_results.clear(); + + // remove apps and app_versions (but not if anonymous platform) // if (!project->anonymous_platform || detaching) { avp_iter = app_versions.begin();