• Jan-Marek Glogowski's avatar
    Workaround static Task destruction error · 06ce312f
    Jan-Marek Glogowski yazdı
    A task has to get the SchedulerLock to remove itself from the
    Scheduler list. This doesn't work, if the Task is static, as the
    static Scheduler might be destroyed earlier. In this case we fail
    with the following backtrace:
    
     #0 SchedulerMutex::acquire
     #1 Task::~Task
     #2 __run_exit_handlers
    
    Thanks to Michael Stahl to catching this backtrace.
    
    As a workaround this marks static tasks, so they ignore the
    SchedulerMutex in the destructor, We also mark all scheduled Tasks
    as "static" in DeInitScheduler, as their cleanup was already done.
    
    In the end all Tasks should be removed from static objects.
    
    Change-Id: I38be3206378b9449193efaccbc96896ac8de9478
    Reviewed-on: https://gerrit.libreoffice.org/42574Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
    06ce312f
task.hxx 3.92 KB