Impossible to cancel the Average Path Length Statistic calculation

Bug #590226 reported by Paul-Antoine Bittner on 2010-06-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gephi
Fix Released
Low
Unassigned
0.7
Fix Released
Low
Unassigned

Bug Description

- Open a graph with a large number of nodes (Power Grid.gml for instance)
- Run the average path length statistic (undirected)
- While the operation is running, clicking on "cancel" has no effect (The only way to cancel the calculation is with the cross button next to the progress bar)

Changed in gephi:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Mathieu Bastian (mathieu.bastian)
milestone: none → 0.7alpha4
Changed in gephi:
assignee: Mathieu Bastian (mathieu.bastian) → Paul-Antoine Bittner (pbittner)

The bug arises when more than one StatisticsUI is associated to one Statistic. It comes from the fact that all StatisticsFrontEnd are refreshed each time one StatiscticsUI is set running (line 103 of StatisticsControllerImpl). This refreshing process has for effect to set the currentStatistic variable to null of the StatisticsFrontEnd associated with the "Average Path Length" Statistic. And because of that, it is impossible to cancel the Statistic.

The fix provided makes sure all StatisticsUI are added to the runningList before firing the ChangeEvent that refresh all StatisticsFrontEnd. By doing so it is now possible to cancel the "Average Path Length" Statistic by clicking on "Cancel" next to the name of the Statistic. However, it is not possible to do so by clicking on "Cancel" next to the "Network Diameter" Statistic. To make that possible, one way would be to add a getStatistic method in the StatisticsUI class so that each StatisticsFrontEnd could update its currentStatistic variable with the instance of Statistic contained in its statisticsUI variable.

Changed in gephi:
status: Confirmed → In Progress

Hi thanks for your help!

There is no other way than changing StatisticsUI to fix it? I would prefer not to change the API.

I hadn't realized that there was an easier way.

I pushed a fix that completely solves the issue.

Changed in gephi:
status: In Progress → Fix Committed
Changed in gephi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers