Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353372 - UI Hangs after model crash.
Summary: UI Hangs after model crash.
Status: NEW
Alias: None
Product: AMP
Classification: Modeling
Component: AXF UI (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jonas Ruttimann CLA
QA Contact: Miles Parker CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-28 17:57 EDT by Miles Parker CLA
Modified: 2011-12-29 22:56 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miles Parker CLA 2011-07-28 17:57:19 EDT
If you execute a model that fails with an exception of some kind, the UI hangs. It should close gracefully. (It will close after a period if you open the progress monitor and kill it there.) This snippet demonstrates the issue:

package test;

import org.ascape.model.Agent;
import org.ascape.model.Scape;
import org.ascape.model.rule.Rule;

public class BadModel extends Scape {
	@Override
	public void createScape() {
		super.createScape();
		addRule(new Rule("Bad Model!") {

			@Override
			public void execute(Agent agent) {
				throw new RuntimeException("I'm a very bad model.");
			}
			
		});
		
	}
}
Comment 1 Jonas Ruttimann CLA 2011-08-05 05:41:19 EDT
When hitting the restart-buttons repeatedly and like mad, I can even provoke the GUI to freeze with an absolute correct model. Looks like this is the same bug.
Comment 2 Jonas Ruttimann CLA 2011-08-05 10:42:32 EDT
Just committed a bug fix to avoid deadlocks when using simulation control buttons. I'm not quite sure if this solves the "Bad Model" problem as well. I'm still on it.
Comment 3 Miles Parker CLA 2011-08-05 13:04:07 EDT
BTW, we do have SWTBot tests for these, I was just never able to get them automated. Might be worth resurecting them.
Comment 4 Miles Parker CLA 2011-12-29 22:39:12 EST
This change introduced really serious problems with the update mechanism. There was a lot of discussion on the mailing list about this issue. I do _not_ believe that switching to an asynchronous mechanism will work. In any case, things are very definitely quite broken now. :)

For now, I'm going to back these changes out. I've created a branch called "SynchronousExperiment" -- please continue any other changes that you'd like to try out there, and/or we can try to discuss here or on mailing list. I'm going to have my hands full now with some other projects, but I'll try to respond to any followup as soon as I can. Until we agree on a course of action, please do not make any more update related changes to the main branch.
Comment 5 Miles Parker CLA 2011-12-29 22:56:23 EST
(In reply to comment #4)
> This change introduced really serious problems with the update mechanism. There
> was a lot of discussion on the mailing list about this issue. I do _not_
> believe that switching to an [asynchronous mechanism will work]. In any case,

sorry, please replace above with "synchronous mechanism is the correct solution"