Discussion:
[Gnash-commit] [bug #33780] Hostile Skies caused Gnash to freeze on dropping bombs on enemies' plane
Nachanon Vetjasit
2011-07-16 07:54:11 UTC
Permalink
URL:
<http://savannah.gnu.org/bugs/?33780>

Summary: Hostile Skies caused Gnash to freeze on dropping
bombs on enemies' plane
Project: Gnash - The GNU Flash player
Submitted by: nachanon
Submitted on: Sat 16 Jul 2011 07:54:10 AM GMT
Category: None
Severity: 3 - Normal
Release: 0.8.9
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any

_______________________________________________________

Details:

I've used Gnash 0.8.9 from getgnash.org APT repository on
Debian GNU/Linux 5.0 to play Hostile Skies game (Flash 9)

http://www.miniclip.com/games/hostile-skies/en/
(http://www.miniclip.com/games/hostile-skies/en/hostileskies.swf)

It played pretty fine in Gnash, albeit slowly, with uncontinuous airplane
sound which looks more or less like bug #24481 (actionscript sound loop
issue).
The game played fine, able to shoot enemies' plane, drop bombs on enemies'
ship and submarine,
and able to proceed to all levels.

Except, when I tried to drop the bomb onto enemies' plane (not ship),
as soon as the bomb reached enemies' plane, gnash froze,
gnash's menu didn't respond, gnash window didn't repaint,
and console didn't print anything too.


System: Debian GNU/Linux 5.0 "Lenny" (i386: Intel Celeron 2GHz)
Gnash: gnash 0.8.9-1~lenny (from getgnash.org apt repository)




_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?33780>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Benjamin Wolsey
2011-07-16 08:24:55 UTC
Permalink
Follow-up Comment #1, bug #33780 (project gnash):

It's still a bug. The problem appears to be a loop in an onEnterFrame clip
event:

j = 2;
while (j <= 3) {
// ...
// Under some condition:
this.removeMovieClip();
++j;
}

The call to removeMovieClip() makes j undefined, so incrementing it becomes
NaN, and the loop never terminates.

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?33780>

_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/
Sandro Santilli
2011-07-18 23:08:18 UTC
Permalink
Update of bug #33780 (project gnash):

Category: None => ActionScript
Status: None => Confirmed

_______________________________________________________

Follow-up Comment #2:

it should be tested if 'j' should be kept alive _or_ the loop be interrupted.
I'm pretty sure there's some test of us for "guarded" target, and we have code
implementing target guarding to stop execution (when abortOnUnload is given).
EventCode (in ExecutableCode.h) is passing abrtOnUnload=false, btw...

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?33780>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Sandro Santilli
2016-06-27 11:32:05 UTC
Permalink
Follow-up Comment #4, bug #33780 (project gnash):

you minght be able to bind a method/class to a sub-MovieClip before attaching
it to stage under libming (but not makeswf).

Or, you could provide a patch to libming to make it possible (we improved it a
lot already starting from Gnash testcases needs)

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?33780>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Nutchanon Wetchasit
2016-06-29 13:20:25 UTC
Permalink
Follow-up Comment #5, bug #33780 (project gnash):

Compare and contrast: If the handler function was declared from outside of the
affected MovieClip, then got assigned as an event handler, *this handler will
run till its end*, no matter that the MovieClip it got event from was removed
using `removeMovieClip()` in the middle or not.

Test SWFs, source code, build scripts, and player logs are attached as
`removemovie-events-fromroot.zip`.

So the termination is likely to be decided from code's _closure scope_: if
handler's closure was destroyed on `removeMovieClip()` (e.g. the handler
function was declared from inside the removed MovieClip itself), the affected
handler _terminates instantly_.

On the other hand, if handler's closure was not affected by the
`removeMovieClip()` call (e.g. it was declared on root or other MovieClip and
got assigned in), the handler code _runs until its end_.

Gnash: 0.8.11dev (git f6a0b38 2-Jun-2016)
Flash Player: 11.2.202.491 Standalone
System: Debian GNU/Linux 7.0 Wheezy i386

P.S. The `removemovie-keydown-fromroot.swf` is affected by the same onKeyDown
event issue as one mentioned in comment 3
<https://savannah.gnu.org/bugs/?33780#comment3>.


(file #37623)
_______________________________________________________

Additional Item Attachment:

File name: removemovie-events-fromroot.zip Size:9 KB


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?33780>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
Nutchanon Wetchasit
2016-06-29 13:25:27 UTC
Permalink
Follow-up Comment #6, bug #33780 (project gnash):

@strk:
Regarding libming, I think a good way to provide test coverage for Gnash in
this aspect, is hacking MakeSWF (or writing a new libming-based utility) to
provide an ability to _insert_ ActionScript code into _existing_ SWF:

* Insert/replace normal action and init action in individual frame of root
timeline
* Insert/replace normal action and init action in individual frame of any
sprite (MovieClip) symbol
* Bind ActionScript class to any sprite (MovieClip) symbol
* Bind ActionScript class to root movie (not sure if this is possible since
Macromedia Flash does not allow this; but it is surely convenient, and
commonly used in Flash 9+ AS3 movies)

This way users and testers could closely emulate Macromedia Flash workflow by
creating skeleton SWF using SWFmill Simple with arbitrary library symbol
combination and timeline structure, then add ActionScript to each part of them
(akin to selecting an object and bring up Action dialog under Macromedia
Flash).

MTASC currently allows this, but in a very limited fashion, as it does not
support multiple-frame timeline ActionScript, init action, sub-MovieClip
timeline ActionScript, sub-MovieClip class binding, or assembler directive.

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?33780>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/

Loading...