Page 1 of 1

Unclickable Stop button (actually, stuck sound input) [FIXED]

Posted: Jul 3rd, '16, 16:05
by mguzdial
This may not be a bug as much as my misunderstanding of GP.

As I mentioned, I'm working on a sound recorder. Here's the When Clicked script for the Record button:
doesntWorkRecording.png
doesntWorkRecording.png (24.04 KiB) Viewed 10375 times
(The say "Clicked!" is my debugging.)

This would record successfully, but I could never get it to stop. Here was my original Stop button When Clicked script.
stopbutton.png
stopbutton.png (22.33 KiB) Viewed 10375 times
This one would never say "Clicked." I couldn't click it. Nothing would happen.

Then it occurred to me that variable's whose values are greater than zero might not actually be true. I changed it to this:
workingStop.png
workingStop.png (25.23 KiB) Viewed 10375 times
As I said, maybe this isn't a bug and I just had to learn that only logical operators are true or false. (Though if that's the case, I'd like the boolean constants as blocks "True" and "False," which would be better than using 1 and 0.) I think what led me astray was that I *could* drag the variable into the logical expression. But doing that make the script break completely -- no error messages, just not clickable.

Re: Unclickable Stop button

Posted: Aug 1st, '16, 15:11
by JohnM
I suspect that this was a bug in 'sound input' that causes that command to hang forever. I saw this several times at a workshop in June, always on Macs. I've addressed this in v54 by having the stop button reset the sound input process. That won't prevent sound input from getting stuck, but it makes it easier to recover -- just click the stop button (or hit escape) and try again.

I will tentative mark this as fixed. Let me know if you encounter stuck sound and the stop button does not reset it.