Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF Transaction] Issue on TransactionalAdapterFactoryLabelProvider and reentrant calls to viewer
[EMF Transaction] Issue on TransactionalAdapterFactoryLabelProvider and reentrant calls to viewer [message #649418] Wed, 19 January 2011 08:09 Go to next message
Jan Mauersberger is currently offline Jan MauersbergerFriend
Messages: 120
Registered: July 2009
Senior Member
Hi,

I frequently encounter the message "Ignored reentrant call while viewer
is busy." logged in the eclipse log. Checking the stack trace it seems
to be produced by some EMF read-transactions, e.g. as started by the
TransactionalAdapterFactoryLabelProvider. The relevant stack looks as
the following:

at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3660)
at
org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.run EventLoop(EventLoopProgressMonitor.java:123)
at
org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isC anceled(EventLoopProgressMonitor.java:97)
at org.eclipse.core.internal.jobs.ThreadJob.isCanceled(ThreadJo b.java:146)
at org.eclipse.core.internal.jobs.ThreadJob.waitForRun(ThreadJo b.java:235)
at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.j ava:199)
at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJo bs.java:92)
at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManag er.java:286)
at org.eclipse.emf.transaction.util.Lock.uiSafeAcquire(Lock.jav a:359)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl.acquire(TransactionalEditingDomainImpl.java:580)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl.activate(TransactionalEditingDomainImpl.java:508)
at
org.eclipse.emf.transaction.impl.TransactionImpl.start(Trans actionImpl.java:204)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl.startTransaction(TransactionalEditingDomainImpl.java:424 )
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl.runExclusive(TransactionalEditingDomainImpl.java:321)
at
org.eclipse.emf.transaction.util.TransactionUtil.runExclusiv e(TransactionUtil.java:328)

The issue here is that starting a transaction implies the acquisition of
a lock. Internally 'Lock.uiSafeAcquire' is used which from my
understanding means, the call was made from UI thread and the framework
tries to no block it. Anyway, in the end it leads to the execution of
other asynchronously scheduled UI runnables waiting in the queue which
may collide with currently running code that actually did start the
transaction, in my case the refresh of the label.

So I have two questions:
* Did anyone encounter the same problem?
* Can I prevent in any way that other asynchronous events are executed?
* Does that mean that I am not allowed to schedule runnables that will
open a read transaction asynchronously to the UI thread?

Thanks for any kind of help
Jan
Re: [EMF Transaction] Issue on TransactionalAdapterFactoryLabelProvider and reentrant calls to viewe [message #649552 is a reply to message #649418] Wed, 19 January 2011 16:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Jan,

I'm really not sure there are any active developers on the transaction
project. I don't think any of them monitor this newsgroup. :-(

Jan Mauersberger wrote:
> Hi,
>
> I frequently encounter the message "Ignored reentrant call while
> viewer is busy." logged in the eclipse log. Checking the stack trace
> it seems to be produced by some EMF read-transactions, e.g. as started
> by the TransactionalAdapterFactoryLabelProvider. The relevant stack
> looks as the following:
>
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:4041)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3660)
> at
> org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.run EventLoop(EventLoopProgressMonitor.java:123)
>
> at
> org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isC anceled(EventLoopProgressMonitor.java:97)
>
> at
> org.eclipse.core.internal.jobs.ThreadJob.isCanceled(ThreadJo b.java:146)
> at
> org.eclipse.core.internal.jobs.ThreadJob.waitForRun(ThreadJo b.java:235)
> at
> org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.j ava:199)
> at
> org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJo bs.java:92)
> at
> org.eclipse.core.internal.jobs.JobManager.beginRule(JobManag er.java:286)
> at org.eclipse.emf.transaction.util.Lock.uiSafeAcquire(Lock.jav a:359)
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl.acquire(TransactionalEditingDomainImpl.java:580)
>
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl.activate(TransactionalEditingDomainImpl.java:508)
>
> at
> org.eclipse.emf.transaction.impl.TransactionImpl.start(Trans actionImpl.java:204)
>
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl.startTransaction(TransactionalEditingDomainImpl.java:424 )
>
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl.runExclusive(TransactionalEditingDomainImpl.java:321)
>
> at
> org.eclipse.emf.transaction.util.TransactionUtil.runExclusiv e(TransactionUtil.java:328)
>
>
> The issue here is that starting a transaction implies the acquisition
> of a lock. Internally 'Lock.uiSafeAcquire' is used which from my
> understanding means, the call was made from UI thread and the
> framework tries to no block it. Anyway, in the end it leads to the
> execution of other asynchronously scheduled UI runnables waiting in
> the queue which may collide with currently running code that actually
> did start the transaction, in my case the refresh of the label.
>
> So I have two questions:
> * Did anyone encounter the same problem?
> * Can I prevent in any way that other asynchronous events are executed?
> * Does that mean that I am not allowed to schedule runnables that
> will open a read transaction asynchronously to the UI thread?
>
> Thanks for any kind of help
> Jan


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EMF Transaction] Issue on TransactionalAdapterFactoryLabelProvider and reentrant calls to viewe [message #649580 is a reply to message #649552] Wed, 19 January 2011 19:05 Go to previous messageGo to next message
Jan Mauersberger is currently offline Jan MauersbergerFriend
Messages: 120
Registered: July 2009
Senior Member
Oh, that's really a pity. There isn't any other group that would fit
better though. Anyway, thanks Ed for the hint.

Maybe I really have to check the latest activities in the project...

Jan

> Jan,
>
> I'm really not sure there are any active developers on the transaction
> project. I don't think any of them monitor this newsgroup. :-(
>
Re: [EMF Transaction] Issue on TransactionalAdapterFactoryLabelProvider and reentrant calls to viewe [message #649607 is a reply to message #649580] Wed, 19 January 2011 21:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Jan,

If you can produce a small test case and open a bugzilla for that, it
might get more immediate attention...


Jan Mauersberger wrote:
> Oh, that's really a pity. There isn't any other group that would fit
> better though. Anyway, thanks Ed for the hint.
>
> Maybe I really have to check the latest activities in the project...
>
> Jan
>
>> Jan,
>>
>> I'm really not sure there are any active developers on the transaction
>> project. I don't think any of them monitor this newsgroup. :-(
>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Problem save xml resource
Next Topic:[EMF Edit] Cut Command and dangling HREF
Goto Forum:
  


Current Time: Thu Apr 18 08:54:58 GMT 2024

Powered by FUDForum. Page generated in 0.01682 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top