Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

malloc_consolidate(): unaligned fastbin chunk detected



  • when I close application by Qapplication::quit() ,there is a error occurred : "malloc_consolidate(): unaligned fastbin chunk detected "

    I don't know how to solve it and I can't search any problems about it by using Google .


  • Lifetime Qt Champion

    Hi @JoseLpd,

    which platform are you on? Which Qt version and which compiler are you using?

    Does this error happen on a minimal example program too?

    Regards



  • @aha_1980
    Sorry, first of all I have a Linux system, the version of qt is 5.19, I created a small project and it is correct. Now that this problem occurs, I suspect that I may have implemented a singleton mode (created a local static variable) and called "instance" from outside. But I am not sure where is the problem


  • Lifetime Qt Champion

    Hi @JoseLpd,

    the version of qt is 5.19

    Really? The latest one is 5.15.x...

    Now that this problem occurs, I suspect that I may have implemented a singleton mode (created a local static variable) and called "instance" from outside. But I am not sure where is the problem

    If it works with a minimal project, but not with your full app, then you can either remove functions from your full app, or integrate more functions into the minimal app until you see that problem.

    You can also try to run your app in valgrind, that often gives good hints what's going wrong with the memory.

    Regards



  • @aha_1980
    ... well, let me try to run it on Windows... At the same time I found that the malloc_consolidate function is located in the glic library...


Log in to reply