gephi / gephi-plugins

Repository for Gephi Plugins maintained by the team. Each plugin has it's branch.
269 stars 622 forks source link

Gephi Deadlock #215

Closed harrismirza closed 2 years ago

harrismirza commented 4 years ago

Hi,

I am writing a plugin that performs some calculations on an attribute column and then creates a new Graph in another workspace but I am having issues with a deadlock.

I cannot share the exact code but essentially it does the following when the user clicks a button in a panel:

1) Get graph from GraphController 2) Get the attribute column 3) Loop over the nodes and create a map from a value to a set of node ids 4) Duplicate the current workspace 5) Get the new graph from the graph controller 6) Loop over the entries in the map and create nodes based on the calculated mapping 7) Loop over the edges of the original graph, create some new edges in the new graph.

The code works fine, and if I am on the data laboratory I can see the new graph being created.

The issue is when I try to change back to the other workspace or view the graph, the whole program freezes, and this from what I can see is related to the UpdateAnimator class waiting for a Table Lock on one of the columns.

mbastian commented 2 years ago

Hi @harrismirza, thanks for the report. We made some fixes in Gephi related to some deadlocks between table and graph lock so I would recommend to try again now, based on the Gephi 0.9.6 version. You can update your plugin "base" version of Gephi by depending on the 0.9.6 version of the plugin parent:

<parent>
        <artifactId>gephi-plugin-parent</artifactId>
        <groupId>org.gephi</groupId>
        <version>0.9.6</version>
    </parent>
mbastian commented 2 years ago

Closing as we didn't hear back. Feel free to reopen if it's still the case.