A lot of times, when I switch to another stack (sort of "go to card x of anotherstack") the stack freezes, with no apparent reason.
After a while, I realized what's going on.
Let's say that you have two players in a card. They are started via buttons that contains "start player...". When leaving this card (going to another card in the same stack, or to a card in another stack) the players must be stopped, so I put on closeCard a list of players of the card that should be stopped:
stop player whatever
stop player uglyStuff
If only one player is playing, no problem. Revolution happily closes it. But the problem arises when 2 or more players are playing...
Going to another card while 2 or more players are working, causes that only one player is closed, the other(s) will remain open as processes, as reported typing 'ps -aux' in a terminal. Sometimes it's not needed to leave a card while 2 or more players are working, Rev only closes one and the others are left opened, even when they finished playing.
Going to other cards in the same stack and playing their own players causes no issues, the problem could go undetected. The problem arises when the app tries to go to a card located in another stack: the app hangs. If I kill the non-defunct mplayer process in a terminal, the app comes back to life!
Since this bug seems to be caused by bad management of Revolution of multiple players playing at one, I designed a script as a harsh fix to this behavior.
on closeCard, I request stopping all the players contained in a card, no matter if they are playing or not, and then invoke the procedure cleanMess:
...
stop player whatever
stop player badStuff
cleanMess
...
cleanMess in the stack script contains the following:
on cleanMess
if the platform is "Linux" then
get shell("ps -ef | grep mplayer | awk '{print $2}' | xargs kill")
end if
end cleanMess
This allowed me to get rid of the freezes in my app, and also avoid getting undesirable processes open.
This seems to be a Linux-only related problem, tested my app on Mac OSX and no problems there, and I guess that the Windows folks don't have these problems either.
Buggy, buggy, bad, bad...
Bad, bad behavior of Rev2.9/3.0 with Mplayer
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Atroboy,
This is not the place to report bugs. Only bugs entered in http://quality.runrev.com/qacenter/ are noticed by RunRev Ltd.
Best,
Mark
This is not the place to report bugs. Only bugs entered in http://quality.runrev.com/qacenter/ are noticed by RunRev Ltd.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
http://www.runrev.com/support/quality-control-center/
Please take the time to register this bug at the quality control center. Unless people keep raising bugs against the Linux version it will always lag behind and be more buggy.
Let's make Rev a better tool for Linux.
Bernard
Please take the time to register this bug at the quality control center. Unless people keep raising bugs against the Linux version it will always lag behind and be more buggy.
Let's make Rev a better tool for Linux.
Bernard
Hi Mark and Bernard
Oh, I was already registered to Quality Control Center. Nevertheless, I comment about these issues before posting there just to be sure some other users can confirm this behavior, and to discard the possibility that this could be some hardware o distro related issue. Also, I posted here in order to share the workaround that worked for me, and to find if someone would have a better approach to it.
Best Regards,
Astroboy
Oh, I was already registered to Quality Control Center. Nevertheless, I comment about these issues before posting there just to be sure some other users can confirm this behavior, and to discard the possibility that this could be some hardware o distro related issue. Also, I posted here in order to share the workaround that worked for me, and to find if someone would have a better approach to it.
Best Regards,
Astroboy
And, that already happened! A user sent to my email a better solution.astroboy wrote: Also, I posted here in order to share the workaround that worked for me, and to find if someone would have a better approach to it.
Instead of using:
get shell("ps -ef | grep mplayer | awk '{print $2}' | xargs kill")
It is easier:
get shell("killall mplayer")