Skip to content
Snippets Groups Projects
  • Alexandre Lision's avatar
    bebb2c5d
    osx: fix crash on quit · bebb2c5d
    Alexandre Lision authored
    On exit, ContactMethod are destroyed by their QObject parent,
    PhoneDirectoryModel instance.
    
    Implemeting a unique_ptr on top of it for m_pDialNumber caused a double free.
    
    First the PhoneDirectoryModel is destroyed, and so all of its children.
    Then Calls are destroyed by the CallModel, and the unique_ptr mechanism is
    called, but on dealloced ContactMethod.
    
    Issue: #79948
    Change-Id: I68fb966d080f4c993ca83c68703d5dfb470f5ad9
    bebb2c5d
    History
    osx: fix crash on quit
    Alexandre Lision authored
    On exit, ContactMethod are destroyed by their QObject parent,
    PhoneDirectoryModel instance.
    
    Implemeting a unique_ptr on top of it for m_pDialNumber caused a double free.
    
    First the PhoneDirectoryModel is destroyed, and so all of its children.
    Then Calls are destroyed by the CallModel, and the unique_ptr mechanism is
    called, but on dealloced ContactMethod.
    
    Issue: #79948
    Change-Id: I68fb966d080f4c993ca83c68703d5dfb470f5ad9
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
call.cpp 86.66 KiB
/****************************************************************************
 *   Copyright (C) 2009-2015 by Savoir-Faire Linux                          *
 *   Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com>          *
 *            Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
 *                                                                          *
 *   This library is free software; you can redistribute it and/or          *
 *   modify it under the terms of the GNU Lesser General Public             *
 *   License as published by the Free Software Foundation; either           *
 *   version 2.1 of the License, or (at your option) any later version.     *
 *                                                                          *
 *   This library is distributed in the hope that it will be useful,        *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      *
 *   Lesser General Public License for more details.                        *
 *                                                                          *
 *   You should have received a copy of the GNU General Public License      *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
 ***************************************************************************/

//Parent
#include "call.h"

//Std include
#include <time.h>
#include <memory>

//Qt
#include <QtCore/QFile>
#include <QtCore/QTimer>
#include <QtCore/QDateTime>

//DRing
#include <account_const.h>
#include <security_const.h>
#include <call_const.h>

//Ring library
#include "dbus/callmanager.h"

#include "collectioninterface.h"
#include "person.h"
#include "uri.h"
#include <mime.h>
#include "account.h"
#include "accountmodel.h"
#include "availableaccountmodel.h"
#include "private/videorenderermanager.h"
#include "localrecordingcollection.h"
#include "categorizedhistorymodel.h"
#include "useractionmodel.h"
#include "callmodel.h"
#include "certificate.h"
#include "numbercategory.h"
#include "certificatemodel.h"
#include "phonedirectorymodel.h"
#include "contactmethod.h"
#include "video/renderer.h"
#include "tlsmethodmodel.h"
#include "audio/settings.h"
#include "personmodel.h"
#include "private/contactmethod_p.h"

#include "media/audio.h"
#include "media/video.h"
#include "media/text.h"
#include "media/file.h"

//TODO remove
#include "securityevaluationmodel.h"
#include "globalinstances.h"