Dlclose fails when using with QNetworkAccessManager on QNX



  • Hello,

    I am seeing a peculiar issue in my code with respect to dlclose.

    Background:
    I have created a DownloadManager as part of a plugin on QNX. The DownloadManager downloads a file from a http link that gets passed to it. Once my process completes, I unload the plugin and I see the error: "dlclose failed: Shared objects still referenced". On debugging, I found that the issue seems to be occurring due to the QNetworkAccessManager that is getting created. I have tried directly deleting the QNetworkAccessManager instance as well as using deleteLater() but to no avail. I still keep seeing the same problem.

    I have pasted a part of my code below:
    @
    DownloadFile::DownloadFile()
    : m_Manager( NULL ),
    m_Reply( NULL ),
    m_File( NULL ),
    m_DownloadSizeAtPause( 0 )
    {
    m_Manager = new QNetworkAccessManager();
    if( NULL == m_Manager )
    {
    qDebug() << "Qt Network manager is null";
    }

    };
    
    /**
        Destructor for DownloadFile
     */
    DownloadFile::~DownloadFile&#40;&#41;
    {
        if( NULL != m_Reply )
        {
            m_Reply->deleteLater();
            //delete m_Reply;
            m_Reply = NULL;
        }
    
        if( NULL != m_Manager )
        {
            qDebug() << "Manager not null";
            m_Manager->deleteLater();
            //delete m_Manager;
            m_Manager = NULL;
        }
    
        if( m_File->isOpen() )
        {
            m_File->close();
        }
    
        if( NULL != m_File )
        {
            delete m_File;
            m_File = NULL;
        }
    };
    

    @

    I am currently using Qt5.3.1 on QNX 6.6.
    I noticed at http://qt-project.org/wiki/Qt_Status_on_QNX that a dlclose issue has been fixed. I am not sure if this problem is related to the fixed bug in anyway.

    Appreciate any pointers to resolve this problem.

    Thanks,
    LN


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.