patchGnash - The GNU Flash player - Patches: patch #8858, Patch to avoid freeze when SWF...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8858: Patch to avoid freeze when SWF caused gtk-gnash to exit on first frame

Submitted by:  Nutchanon Wetchasit <nachanon>
Submitted on:  Thu 14 Jan 2016 03:54:06 PM UTC  
 
Category:  gui Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Sandro Santilli <strk> Open/Closed:  Closed

Sat 16 Jan 2016 11:05:51 AM UTC, comment #2: 

commit 17a8452d9691d87ca4dda9f4e7edc872ff29c9ea
commit 62cfdfe81d6d9a17c722558dc6046b6596342e98

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 15 Jan 2016 10:13:25 AM UTC, comment #1: 

Patch 2 of 2:
See the attached `0002_defer-cleanup-to-after-gtk-main.patch`.

Both window-related assertion warnings in this case are originated from screen
redrawing code that is run after ActionScript executed, which at the time,
display window was already destroyed by `GtkGui::quitUI()` as a result of `fscommand("quit")`.

This patch addressed this by deferring window cleanup to after `gtk_main()` end,
which should ensure that there will be no drawing operation take place after it. 

Gnash: 0.8.11dev (patched against git e8b111c 13-Jan-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #36047)

Nutchanon Wetchasit <nachanon>
Thu 14 Jan 2016 03:54:06 PM UTC, original submission:  

Patch 1 of 2:
See the attached `0001_avoid-gtk-main-if-first-frame-exit.patch`.

Current Gnash's GTK GUI implementation have a problem when the rendering
of SWF finished in first frame (whether this is due to `fscommand("quit")`
code or using `--once` option with single-frame SWF), it will result in Gnash
freezing instead of exiting normally.

This is caused by gtk-gnash's `GtkGui::quitUI()` which tried to call
`gtk_main_quit()` before the `gtk_main()` loop was entered in `GtkGui::run()`.
So when the GTK main loop was run, it didn't stop.

The patch addressed this by:

  • Making `GtkGui:quitUI()` call `gtk_main_quit()` only when GTK main loop is running.
  • Making `GtkGui:quitUI()` set an `_exiting` flag in `GtkGui`.
  • Making `GtkGui::run()` skip calling `gtk_main()` if `_exiting` flag in `GtkGui` is set.

This fixes bug #46308 and freezing part of bug #27981;
window-related assertion warnings part of bug #27981 still remains.

Might need a review since I'm not sure if there is a nicer way to do this.

Gnash: 0.8.11dev (patched against git e8b111c 13-Jan-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>

 

Attached Files
file #36047:  0002_defer-cleanup-to-after-gtk-main.patch added by nachanon (798B - text/x-patch - Patch to make gtk-gnash clean up window at `gtk-main()` end)
file #36033:  0001_avoid-gtk-main-if-first-frame-exit.patch added by nachanon (1KiB - text/x-patch - Patch to make `GtkGui::run()` avoid entering `gtk_main() if an exit was pending)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by nachanon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-01-16 strk StatusNone => Done
        Assigned toNone => strk
        Open/ClosedOpen => Closed
    2016-01-15 nachanon Attached File- => Added 0002_defer-cleanup-to-after-gtk-main.patch, #36047
    2016-01-14 nachanon Attached File- => Added 0001_avoid-gtk-main-if-first-frame-exit.patch, #36033

    Back to the top


    Powered by Savane 3.7