[bitbake-devel] [PATCH 2/2] hob: fix segfault on second build
Paul Eggleton
paul.eggleton at linux.intel.com
Mon Sep 5 12:30:11 UTC 2011
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]
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
bitbake/lib/bb/ui/crumbs/runningbuild.py | 5 +++++
bitbake/lib/bb/ui/hob.py | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index 97d1ebd..c18bd87 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 f2a9ee5..76e9237 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):
--
1.7.4.1
More information about the bitbake-devel
mailing list