Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow latency analysis crashes when run from instance model editor #2013

AaronGreenhouse opened this issue Oct 8, 2019 · 2 comments · Fixed by #2016

Flow latency analysis crashes when run from instance model editor #2013

AaronGreenhouse opened this issue Oct 8, 2019 · 2 comments · Fixed by #2016


Copy link

Running "Check Flow Latency" analysis on my iMac fails with an exception

java.lang.IllegalStateException: Cannot modify resource set without a write transaction
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.assertWriting(
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.appendNotification(
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.processResourceNotification(
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.dispatchNotification(
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(
	at org.eclipse.emf.common.util.AbstractEList.add(
	at org.osate.analysis.flows.FlowLatencyUtil.saveAnalysisResult(
	at org.osate.analysis.flows.handlers.CheckFlowLatency.finalizeAnalysis(
	at org.osate.ui.handlers.AbstractInstanceOrDeclarativeModelReadOnlyHandler.doAaxlAction(
	at org.osate.ui.handlers.AbstractAaxlHandler.processAaxlAction(
	at org.osate.ui.handlers.AbstractAaxlHandler.actionBody(
	at org.osate.ui.handlers.AaxlReadOnlyHandlerAsJob$ActionAsJob.runInWorkspace(

Upon investigation the TransactionChangeRecorder's editing domain has a null transaction reference when assertWriting is called.

This doesn't seem to happen on any one's Windows machines, or on Joe's MacBook.

I found an old error report on the web that had the same error:

Basically this is a threading issue. There is some missing synchronization somewhere. This isn't an issue on the other computers, I think, because the threads are being managed differently. My computer is newer and has more cores and that is probably what is making the problem appear.

Copy link

lwrage commented Oct 8, 2019

I'm not sure why we even save the analysis result. As a workaround you can disable that.

Copy link

lwrage commented Oct 8, 2019

The analysis writes the analysis result to a file. For that it adds the result to the same resource set which contains the instance model. When run from the instance editor all modifications to the resource set require a transaction. This can be fixed by either not saving the analysis result (fast and easy) or by running the analysis as an EMF command (need to figure out how to do that).

@lwrage lwrage changed the title Flow Latency Analysis crashes on iMac Flow latency analysis crashes when run from instance model editor Oct 9, 2019
@lwrage lwrage self-assigned this Oct 9, 2019
@lwrage lwrage added this to the 2.6.0 milestone Oct 9, 2019
AaronGreenhouse added a commit that referenced this issue Oct 11, 2019
Run latency analysis as modify operation - fixes #2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

2 participants