Using a source list in more than one viewer

View: New views
5 Messages — Rating Filter:   Alert me  

Using a source list in more than one viewer

by philk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I keep getting this error:

java.util.ConcurrentModificationException: Cannot begin a new event while another event is in progress by thread, main
        at ca.odell.glazedlists.event.ListEventAssembler$AssemblerHelper.beginEvent(ListEventAssembler.java:347)
        at ca.odell.glazedlists.event.ListEventAssembler.beginEvent(ListEventAssembler.java:94)
        at ca.odell.glazedlists.FilterList.listChanged(FilterList.java:167)
        at ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter$ListEventFormat.fire(ListEventAssembler.java:781)
        at ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter$ListEventFormat.fire(ListEventAssembler.java:773)
        at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
        at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
        at ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter.fireEvent(ListEventAssembler.java:767)
        at ca.odell.glazedlists.event.ListEventAssembler$AssemblerHelper.commitEvent(ListEventAssembler.java:416)
        at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:249)
        at ca.odell.glazedlists.BasicEventList.set(BasicEventList.java:210)
        at ca.odell.glazedlists.impl.GlazedListsImpl.replaceAll(GlazedListsImpl.java:104)
        at ca.odell.glazedlists.GlazedLists.replaceAllSorted(GlazedLists.java:124)
        at de.topsystem.common.ui.glazedlists.viewers.AbstractEventListProvider.getList(AbstractEventListProvider.java:70)
        at de.topsystem.common.ui.part.DynamicTableViewPart$3.run(DynamicTableViewPart.java:493)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

since I am using a source list in 2 different viewers. Is that a problem? I should be able to use the sourcelist in different viewers and update the sourcelist from a different thread (using replaceAllSorted)

Thanks,
Phil

re: Using a source list in more than one viewer

by Kevin Day-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Are you locking and unlocking the list while making ANY change?  And performing ANY read?

Are the lists in your views wrapped at some point in a swing event thread proxy list?

see GlazedListsSwing#swingThreadProxyList(EventList)

- K


----------------------- Original Message -----------------------
 
From: philk phil.kursawe@...
To: users@...
Cc:
Date: Mon, 13 Jul 2009 08:41:23 -0700 (PDT)
Subject: Using a source list in more than one viewer
 

Hello,

I keep getting this error:

java.util.ConcurrentModificationException: Cannot begin a new event while
another event is in progress by thread, main
   at
ca.odell.glazedlists.event.ListEventAssembler$AssemblerHelper.beginEvent(ListEventAssembler.java:347)
   at
ca.odell.glazedlists.event.ListEventAssembler.beginEvent(ListEventAssembler.java:94)
   at ca.odell.glazedlists.FilterList.listChanged(FilterList.java:167)
   at
ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter$ListEventFormat.fire(ListEventAssembler.java:781)
   at
ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter$ListEventFormat.fire(ListEventAssembler.java:773)
   at
ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
   at
ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
   at
ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter.fireEvent(ListEventAssembler.java:767)
   at
ca.odell.glazedlists.event.ListEventAssembler$AssemblerHelper.commitEvent(ListEventAssembler.java:416)
   at
ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:249)
   at ca.odell.glazedlists.BasicEventList.set(BasicEventList.java:210)
   at
ca.odell.glazedlists.impl.GlazedListsImpl.replaceAll(GlazedListsImpl.java:104)
   at ca.odell.glazedlists.GlazedLists.replaceAllSorted(GlazedLists.java:124)
   at
de.topsystem.common.ui.glazedlists.viewers.AbstractEventListProvider.getList(AbstractEventListProvider.java:70)
   at
de.topsystem.common.ui.part.DynamicTableViewPart$3.run(DynamicTableViewPart.java:493)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

since I am using a source list in 2 different viewers. Is that a problem? I
should be able to use the sourcelist in different viewers and update the
sourcelist from a different thread (using replaceAllSorted)

Thanks,
Phil
--
View this message in context: http://www.nabble.com/Using-a-source-list-in-more-than-one-viewer-tp24464158p24464158.html
Sent from the GlazedLists - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@...

Re: re: Using a source list in more than one viewer

by philk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, my de.topsystem.common.ui.glazedlists.viewers.AbstractEventListProvider.getList does a writeLock and the viewers use the SWT proxy list transparently, I guess?

re[3]: Using a source list in more than one viewer

by Kevin Day-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
ahhh - SWT - sorry, I missed that.  I'm not nearly as familiar with SWT usage, so I'll leave that part of the discussion to others :-)  I know that there has been some recent work to remove the transparent proxy list generation from the Swing side of things...
 
 
One thing that you might want to try is to use a DebugList with lock checking enabled:
 
 
That may help find the lock problem...
 
- K
 
----------------------- Original Message -----------------------
  
From: philk phil.kursawe@...
Cc: 
Date: Mon, 13 Jul 2009 11:14:12 -0700 (PDT)
Subject: Re: re: Using a source list in more than one viewer
  

Yes, my
de.topsystem.common.ui.glazedlists.viewers.AbstractEventListProvider.getList
does a writeLock and the viewers use the SWT proxy list transparently, I
guess?
--
View this message in context: http://www.nabble.com/Using-a-source-list-in-more-than-one-viewer-tp24464158p24466661.html
Sent from the GlazedLists - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@...

Parent Message unknown Re: Using a source list in more than one viewer

by Holger Brands :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Phil,

I think it should be possible to have more than one view
connected to your source list.
As Kevin already suggested, one thing to look for is correct locking.

I've also seen this exception when another exception was thrown
before during event processing, such that the assembler/publisher
was left in an inconsistent state. So you should check your log,
if there are other thrown exceptions before the ConcurrentModificationException,
that might be the real cause.

If that doesn't help, we would need to know how your list pipeline
looks like, ideally with some sample code that demonstrates the issue.

Holger

>
> Hello,
>
> I keep getting this error:
>
> java.util.ConcurrentModificationException: Cannot begin a new event while
> another event is in progress by thread, main
> at
> ca.odell.glazedlists.event.ListEventAssembler$AssemblerHelper.beginEvent(ListEventAssembler.java:347)
> at
> ca.odell.glazedlists.event.ListEventAssembler.beginEvent(ListEventAssembler.java:94)
> at ca.odell.glazedlists.FilterList.listChanged(FilterList.java:167)
> at
> ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter$ListEventFormat.fire(ListEventAssembler.java:781)
> at
> ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter$ListEventFormat.fire(ListEventAssembler.java:773)
> at
> ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
> at
> ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
> at
> ca.odell.glazedlists.event.ListEventAssembler$ListSequencePublisherAdapter.fireEvent(ListEventAssembler.java:767)
> at
> ca.odell.glazedlists.event.ListEventAssembler$AssemblerHelper.commitEvent(ListEventAssembler.java:416)
> at
> ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:249)
> at ca.odell.glazedlists.BasicEventList.set(BasicEventList.java:210)
> at
> ca.odell.glazedlists.impl.GlazedListsImpl.replaceAll(GlazedListsImpl.java:104)
> at ca.odell.glazedlists.GlazedLists.replaceAllSorted(GlazedLists.java:124)
> at
> de.topsystem.common.ui.glazedlists.viewers.AbstractEventListProvider.getList(AbstractEventListProvider.java:70)
> at
> de.topsystem.common.ui.part.DynamicTableViewPart$3.run(DynamicTableViewPart.java:493)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
> since I am using a source list in 2 different viewers. Is that a problem? I
> should be able to use the sourcelist in different viewers and update the
> sourcelist from a different thread (using replaceAllSorted)
>
> Thanks,
> Phil
> --
> View this message in context: http://www.nabble.com/Using-a-source-list-in-more-than-one-viewer-tp24464158p24464158.html
> Sent from the GlazedLists - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...