From a9325ecad889556b0043244509ed767eea363e1e Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 5 Sep 2011 13:30:11 +0100 Subject: hob: fix segfault on second build Some internal lists were not being cleared, resulting in incorrect program flow on the second build, causing a structure to be accessed incorrectly which resulted in a segfault. Fixes [YOCTO #1332] (Bitbake rev: 71ac7fda51ed80e9ef6d1a3bca653683893e4770) Signed-off-by: Paul Eggleton Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/runningbuild.py | 5 +++++ bitbake/lib/bb/ui/hob.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py index 247ed5d5af..e429715e08 100644 --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py @@ -68,6 +68,11 @@ class RunningBuild (gobject.GObject): self.model = RunningBuildModel() self.sequential = sequential + def reset (self): + self.pids_to_task.clear() + self.tasks_to_iter.clear() + self.model.clear() + def handle_event (self, event, pbar=None): # Handle an event from the event queue, this may result in updating # the model and thus the UI. Or it may be to tell us that the build diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index 38f8a7751a..84df37de73 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py @@ -484,7 +484,7 @@ class MainWindow (gtk.Window): def toggle_createview(self): self.set_menus_sensitive(True) - self.build.model.clear() + self.build.reset() self.nb.set_current_page(0) def build_complete_cb(self, running_build): -- cgit v1.2.3-54-g00ecf