gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog gui/Player.cpp gui/gtk.cpp gui/...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog gui/Player.cpp gui/gtk.cpp gui/...
Date: Fri, 01 Jun 2007 11:02:18 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/06/01 11:02:18

Modified files:
        .              : ChangeLog 
        gui            : Player.cpp gtk.cpp gtksup.h 
        server         : impl.cpp 
        utilities      : processor.cpp 

Log message:
                * gui/Player.cpp (run): remove sound_handler cleanup, will
                  be done by gnash::clear().
                * gui/: gtk.cpp, gtksup.h: implement gui::quit()
                * server/impl.cpp (clear): report the problem with cleaning
                  up resources before all threads are completed, exit() rather
                  then cleanup and document the reason for doing so.
                * utilities/processor.cpp (main): call gnash::clear() again, 
that's
                  where proper threads cleanup is supposed to be implemented.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3432&r2=1.3433
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.91&r2=1.92
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtksup.h?cvsroot=gnash&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/gnash/server/impl.cpp?cvsroot=gnash&r1=1.107&r2=1.108
http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/processor.cpp?cvsroot=gnash&r1=1.57&r2=1.58

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3432
retrieving revision 1.3433
diff -u -b -r1.3432 -r1.3433
--- ChangeLog   1 Jun 2007 10:04:38 -0000       1.3432
+++ ChangeLog   1 Jun 2007 11:02:16 -0000       1.3433
@@ -1,5 +1,16 @@
 2007-06-01 Sandro Santilli <address@hidden>
 
+       * gui/Player.cpp (run): remove sound_handler cleanup, will
+         be done by gnash::clear().
+       * gui/: gtk.cpp, gtksup.h: implement gui::quit()
+       * server/impl.cpp (clear): report the problem with cleaning
+         up resources before all threads are completed, exit() rather
+         then cleanup and document the reason for doing so.
+       * utilities/processor.cpp (main): call gnash::clear() again, that's
+         where proper threads cleanup is supposed to be implemented.
+
+2007-06-01 Sandro Santilli <address@hidden>
+
        * server/vm/ActionExec.cpp (call operator): if pc == oldPc that's
          still to be considered a branch-back, so count it; Increment
          branch-back limit to 2^16 (65535).

Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- gui/Player.cpp      1 Jun 2007 09:27:50 -0000       1.52
+++ gui/Player.cpp      1 Jun 2007 11:02:17 -0000       1.53
@@ -359,10 +359,6 @@
     // Clean up as much as possible, so valgrind will help find actual leaks.
     gnash::clear();
 
-       // By setting the soundhandler to NULL we avoid it being used
-       // after it's been de-referenced
-       gnash::set_sound_handler(NULL);
-
     return EXIT_SUCCESS;
 }
 

Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- gui/gtk.cpp 14 May 2007 10:03:38 -0000      1.91
+++ gui/gtk.cpp 1 Jun 2007 11:02:17 -0000       1.92
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: gtk.cpp,v 1.91 2007/05/14 10:03:38 jgilmore Exp $ */
+/* $Id: gtk.cpp,v 1.92 2007/06/01 11:02:17 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -304,6 +304,12 @@
 }
 
 void
+GtkGui::quit()
+{
+       gtk_main_quit();
+}
+
+void
 GtkGui::setInterval(unsigned int interval)
 {
     _interval = interval;

Index: gui/gtksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gtksup.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- gui/gtksup.h        28 May 2007 15:41:00 -0000      1.42
+++ gui/gtksup.h        1 Jun 2007 11:02:17 -0000       1.43
@@ -59,7 +59,11 @@
     virtual bool init(int argc, char **argv[]);
     virtual bool createWindow(int width, int height);
     virtual bool createWindow(const char *title, int width, int height);
+
     virtual bool run();
+
+    void quit();
+
     virtual bool createMenu();
     virtual bool setupEvents();
     virtual void renderBuffer();

Index: server/impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/impl.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- server/impl.cpp     24 May 2007 20:10:42 -0000      1.107
+++ server/impl.cpp     1 Jun 2007 11:02:18 -0000       1.108
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: impl.cpp,v 1.107 2007/05/24 20:10:42 strk Exp $ */
+/* $Id: impl.cpp,v 1.108 2007/06/01 11:02:18 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -554,8 +554,30 @@
 void   clear()
     // Maximum release of resources.
 {
+    // Ideally, we should make sure that function properly signals all threads
+    // about exiting and giving them a chance to cleanly exit.
+    //
+    // If we clear shared memory here we're going to leave threads possibly
+    // accessing deleted memory, which would trigger a segfault.
+    //
+    // My experience is that calling exit(), altought it has the same problem,
+    // reduces the chances of segfaulting ...
+    //
+    // We want this fixed anyway as exit()
+    // itselt can also trigger segfaults.
+    //
+    // See task task #6959 and depending items
+    //
+    std::cerr << "Any segfault past this message is likely due to improper 
threads cleanup." << std::endl;
+    exit(EXIT_SUCCESS);
+
     clear_library();
     fontlib::clear();
+
+    // By setting the soundhandler to NULL we avoid it being used
+    // after it's been de-referenced
+    set_sound_handler(NULL);
+
 }
 
 

Index: utilities/processor.cpp
===================================================================
RCS file: /sources/gnash/gnash/utilities/processor.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- utilities/processor.cpp     15 May 2007 16:31:02 -0000      1.57
+++ utilities/processor.cpp     1 Jun 2007 11:02:18 -0000       1.58
@@ -289,8 +289,8 @@
        }
     }
 
-    // Clean up as much as possible, so valgrind will help find actual leaks.
-    //gnash::clear();
+    // Signal core lib we're willing to quit.
+    gnash::clear();
     
     return 0;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]