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

Editor: Add Stop Button #45

Closed
bakercp opened this issue Jun 9, 2014 · 5 comments
Closed

Editor: Add Stop Button #45

bakercp opened this issue Jun 9, 2014 · 5 comments

Comments

@bakercp
Copy link
Member

bakercp commented Jun 9, 2014

The stop button needs to call the task manager to cancel the task with the task UUID generated by the run button. This is less important in desktop development and very important during remote / Raspberry Pi development.

@bakercp bakercp added this to the v0.3.0 milestone Jun 9, 2014
@bakercp bakercp self-assigned this Jun 9, 2014
@bakercp
Copy link
Member Author

bakercp commented Aug 4, 2014

@brannondorsey I just fixed the stop button ... it was pretty simple :)

f7f2d99

The issue now is that when re-compiling via the play button, if the _currentRunTaskId is valid, stop-project needs to be stopped. Currently the easiest way to do this will be to call this on the client side before you set the _currentRunTaskId to the new value (see SketchEditor.js around line ...383 / 397).

I'll leave it to you to figure out the best way to keep track of that ...

After we get that fixed and update the changelog, I'd say we should release 0.3.0.

brannondorsey added a commit to brannondorsey/ofSketch that referenced this issue Aug 4, 2014
@brannondorsey
Copy link
Member

hmm... it seems like the stop button doesn't work on linux at v0.3.0-RC1.

@brannondorsey brannondorsey reopened this Aug 4, 2014
@bakercp
Copy link
Member Author

bakercp commented Aug 4, 2014

Darn. Will look at it again timing or tomorrow morning.

@bakercp
Copy link
Member Author

bakercp commented Aug 6, 2014

I can confirm that this is giving on / off behavior on OSX as well. Strangely, it seems to depend on which project you are running ... let's try to get this figured out form both back and front ends tomorrow in the olab.

@bakercp
Copy link
Member Author

bakercp commented Aug 7, 2014

OK. I'm pretty sure it's working in all cases on both OSX and linux. A few things had to be fixed:

  • Apps that had no output were blocking when I was trying to run getline on the standard input, preventing them from closing. To get around this I started checking the Poco::Pipe's readability using ::select. This is not cross platform compatible, but it is POSIX compatible, so as long as we compile ofSketch on Windows with MinGW, we should be OK.
  • Process IDs were getting mixed up in some cases when apps were launched with make run. In this case several process IDs are created for the make command and later for the bash and actual app command. Only the make command PID was being returned during launch, so we successfully killed that process, but the child processes (for us, the app) was hanging in some cases. This is now fixed by running the app directly with a new RunTask. Thus we are no longer using the make run command to run the apps.

@bakercp bakercp closed this as completed Aug 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants