taskGnash - The GNU Flash player - Tasks: task #6959, Properly shutdown all threads on...

 
 

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

task #6959: Properly shutdown all threads on exit (was: remove exit() calls)

Submitter:  Sandro Santilli <strk>
Submitted:  Thu 31 May 2007 12:20:53 PM UTC
   
 
Should Start On:  Wed 30 May 2007 10:00:00 PM UTC Should be Finished on:  Wed 30 May 2007 10:00:00 PM UTC
Category:  None Priority:  7 - High
Status:  In Progress Privacy:  Public
Assigned to:  strk Percent Complete:  100%
Open/Closed:  Closed Effort:  0.00

Sun 08 Nov 2009 12:29:14 AM UTC, comment #5: 

It's a long time I dont see segfaults on exit..

Sandro Santilli <strk>
Group Member
Sat 30 Jun 2007 06:24:41 PM UTC, comment #4: 

I implemented canceling of the loader thread. Seems effective.
We now have other threads to cancel (sound, loadvars, others?)

Within the same patch I removed the exit() call from gnash::clear(), so other missing thread removal should
be explicit (I bet youtube segfaults if you exit before it's finished loading the FLV for example :)

Sandro Santilli <strk>
Group Member
Thu 14 Jun 2007 10:23:55 PM UTC, comment #3: 

News: I found out that the destructors of static variables
ARE called on exit(). Just the automatic ones aren't destructed!

This means we should rethink all our singleton to possibly
use an heap object, and provide a cleanup function to remove it.

See the new attached testcase test_exit2.cpp

(file #13058)

Sandro Santilli <strk>
Group Member
Thu 31 May 2007 05:51:25 PM UTC, comment #2: 

Interesting article about signal handlers and threads:

http://www.linuxjournal.com/article/2121

Sandro Santilli <strk>
Group Member
Thu 31 May 2007 05:32:12 PM UTC, comment #1: 

Note that exit() doesn't call the destructors, see the attached exit_test.cpp

(file #12913)

Sandro Santilli <strk>
Group Member
Thu 31 May 2007 12:20:53 PM UTC, original submission:  


Calling exit() is unclear and probably results in segfaults due
to arbitrary deinitialization order of statics and threads.

We currently exit() from gnash.cpp and all guis.

Sandro Santilli <strk>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #13058:  exit_test2.cpp added by strk (423B - text/x-c++src - check that exit() calls dtors of static variables !)
file #12913:  exit_test.cpp added by strk (299B - text/x-c++src)

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 17 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-11-08 strk Percent Complete20% 100%
        Open/ClosedOpen Closed
    2008-06-19 strk Dependencies- bugs #23636 is dependent
    2007-10-10 strk Dependencies- bugs #21311 is dependent
    2007-10-10 strk Dependencies- bugs #21310 is dependent
    2007-07-24 strk Dependencies- bugs #20578 is dependent
    2007-06-30 strk StatusNone In Progress
        Percent Complete0% 20%
        Assigned toNone strk
    2007-06-18 strk Dependencies- bugs #20194 is dependent
    2007-06-18 strk DependenciesRemoved dependency to bugs #20194 -
    2007-06-18 strk Dependencies- Depends on bugs #20194
    2007-06-14 strk Attached File- Added exit_test2.cpp, #13058
    2007-06-06 strk SummaryRemove exit() calls Properly shutdown all threads on exit (was: remove exit() calls)
    2007-05-31 strk Attached File- Added exit_test.cpp, #12913
    2007-05-31 strk Dependencies- bugs #19886 is dependent
    2007-05-31 strk Dependencies- bugs #20016 is dependent

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code