Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Dlclose fails when using with QNetworkAccessManager on QNX
Forum Updated to NodeBB v4.3 + New Features

Dlclose fails when using with QNetworkAccessManager on QNX

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 498 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lseshagiri
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved