Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Debugging memory leak that happens on MacOS only
Forum Updated to NodeBB v4.3 + New Features

Debugging memory leak that happens on MacOS only

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 578 Views 3 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.
  • P Offline
    P Offline
    petr.bena
    wrote on last edited by petr.bena
    #1

    Hello,

    Some time ago I launched an open source called GrumpyChat, which is an IRC client. Source code can be found here: https://github.com/grumpy-irc/grumpy

    The problem I have is that while everything is running great and smooth on all platforms where I actively use it (Windows, Linux and Mac) there seems to be a memory leak, possibly somewhere within Qt itself, or caused by me using some Qt components in a wrong way, but visible only on MacOS.

    I keep using this app on Linux for months without restart and memory usage never exceeds 200MB, same with Windows. But on MacOS after several days of usage of app without restart its memory usage exceeds even 1GB at which point I always restart it and get back to between 100 - 200.

    There is no valgrind support for MacOS, so I even tried to implement my own primitive memory profiler that simply counts number of existing instances of various classes (increment in ctor, decrement in dtor), which on all platforms show that there is no memory leak - all my own classes get deleted as supposed so none of them causes this. But still on MacOS memory keeps on getting allocated and I have no idea why.

    Is there any way to debug this? I am currently working on Qt 5.12.0 but this problem exists for pretty much all Qt 5 versions.

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You can use Xcode tools to analyse your application.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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