eaglexmw / seascope

Automatically exported from code.google.com/p/seascope
Other
0 stars 0 forks source link

Program hangs in an infinite loop when trying to update the history #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Select one item (other than the first row) on the history result page
2. Run a query so that you jump to a new location/file that trigger a new entry 
in the history page
3. Program hangs in a loop and can only be recovered by user interrupt to 
python interpreter.

What is the expected output? What do you see instead?
It shall never hang

What version of the product are you using? On what operating system?
0.3, on Linux

Please provide any additional information below.
It seems to be hanging in the while loop in history_update() in ResView.py:
  while (self.h_page.itemAbove(item)):
    self.h_page.removeItemWidget(self.h_page.itemAbove(item), 0)
It appears to me that removeItemWidget is not removing anything and hence the 
loop continues forever.

Original issue reported on code.google.com by shu.s...@gmail.com on 16 Nov 2011 at 9:18

GoogleCodeExporter commented 9 years ago
It may be preferable not to remove these items indeed. Does trying to mimic the 
web browser type of history really make sense in browsing source code? Most 
time we jump back and forth and maybe it makes sense to track all foot prints 
even with redundancy.

I simply removed this part of code in my installation.

Original comment by shu.s...@gmail.com on 16 Nov 2011 at 9:27

GoogleCodeExporter commented 9 years ago
Fixed in changeset:30:9f2496118b98

Original comment by shu.s...@gmail.com on 22 Nov 2011 at 9:58

GoogleCodeExporter commented 9 years ago
Solution is to use invisibleRootItem().removeChild() to remove the top level 
items above the current selected item.
for idx in range(self.h_page.indexOfTopLevelItem(self.h_page.currentItem())):
    self.h_page.invisibleRootItem().removeChild(self.h_page.topLevelItem(0))

Original comment by shu.s...@gmail.com on 22 Nov 2011 at 10:00