JGoSelection additions freeze my application

Hello all,

My application processes thousands of JGoObjects within a large tree. Repeatedly clearing the selection and then setting, expanding or adding a new list of JGoObjects to be selection eventually results in the entire application freezing.

Everything else works fine when I comment-out the single “add to selection” line. I’ve tried using addArray, addCollection and extendSelection, but these all result in freezing.

My application is handling the display threads correctly. I have tried refactoring the code inside and outside of a Runnable display thread, but the application still freezes when I try to set selections…

Unfortunately I don’t have time to build a demo application for you, but I’d love some suggestions of what might cause this?

I am desperate for a solution because this issue has consumed far too much project time already.

I’ve just tested adding 10,000 nodes to a diagram and selecting them all and unselecting them all 100 times:

<span =“apple-tab-span”="" style=“white-space:pre”> for (int i = 0; i < 10000; i++){
<span =“apple-tab-span”="" style=“white-space:pre”> JGoBasicNode n = new JGoBasicNode(“test”);
<span =“apple-tab-span”="" style=“white-space:pre”> n.setLocation(i10, i10);
<span =“apple-tab-span”="" style=“white-space:pre”> goView.getDocument().add(n);
<span =“apple-tab-span”="" style=“white-space:pre”> }
<span =“apple-tab-span”="" style=“white-space:pre”> for (int i = 0; i < 100; i++) {
<span =“apple-tab-span”="" style=“white-space:pre”> goView.selectAll();
<span =“apple-tab-span”="" style=“white-space:pre”> goView.getSelection().clearSelection();
<span =“apple-tab-span”="" style=“white-space:pre”> }

I’m not seeing any problems. Is your application handling selection events or overriding any selection methods? If so, try temporarily removing your selection code and see if you can still reproduce the problem.