Results 1 to 13 of 13

Thread: Memory leak in QTGstreamer 0.10

  1. #1
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Memory leak in QTGstreamer 0.10

    I am using QTGstreamer in my application to play media files of .webm & .flv formats. The movies of length 5-10 secs play in a loop continuously.
    I have observed huge memory leak while playing these small movies. Instead if I play a long (approx 1 hour) movie, the leak is almost negligible.
    Please suggest some solution.
    Last edited by Monalisa; 19th February 2014 at 05:58.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Memory leak in QTGstreamer 0.10

    Show some relevant code or post an example that we can compile and reproduce this issue.

  3. #3
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Memory leak in QTGstreamer 0.10

    mediaapp.cpp:

    Qt Code:
    1. MediaApp::MediaApp(QWidget *parent)
    2. : QWidget(parent)
    3. {
    4. //create the player
    5. m_player = new Player(this);
    6. connect(m_player, SIGNAL(stateChanged()), this, SLOT(onStateChanged()));
    7.  
    8. //create the UI
    9. QVBoxLayout *appLayout = new QVBoxLayout;
    10. appLayout->setContentsMargins(0, 0, 0, 0);
    11. appLayout->addWidget(m_player);
    12.  
    13. setLayout(appLayout);
    14. }
    15.  
    16. void MediaApp :: openFile(const QString & fileName)
    17. {
    18. m_player->stop();
    19. m_player->setUri(fileName);
    20. m_player->play();
    21. }
    To copy to clipboard, switch view to plain text mode 


    player.cpp:

    Qt Code:
    1. Player :: Player(QWidget *parent)
    2. : QGst :: Ui :: VideoWidget(parent)
    3. {
    4. }
    5.  
    6.  
    7. void Player :: setUri(const QString & uri)
    8. {
    9. QString realUri = uri;
    10.  
    11. //if uri is not a real uri, assume it is a file path
    12. if (realUri.indexOf("://") < 0) {
    13. realUri = QUrl :: fromLocalFile(realUri).toEncoded();
    14. }
    15.  
    16. if (!m_pipeline)
    17. {
    18. m_pipeline = QGst :: ElementFactory :: make("playbin2").dynamicCast<QGst :: Pipeline>();
    19. if (m_pipeline)
    20. {
    21. //let the video widget watch the pipeline for new video sinks
    22. watchPipeline(m_pipeline);
    23. //watch the bus for messages
    24. QGst :: BusPtr bus = m_pipeline->bus();
    25. bus->addSignalWatch();
    26. QGlib::connect(bus, "message", this, &Player :: onBusMessage);
    27. }
    28. else
    29. {
    30. qCritical() << "Failed to create the pipeline";
    31. }
    32. }
    33.  
    34. if (m_pipeline)
    35. {
    36. m_pipeline->setProperty("uri", realUri);
    37. }
    38. }
    39.  
    40.  
    41.  
    42.  
    43. void Player :: play()
    44. {
    45. if (m_pipeline) {
    46. m_pipeline->setState(QGst::StatePlaying);
    47. }
    48. }
    49.  
    50.  
    51.  
    52.  
    53.  
    54. void Player :: onBusMessage(const QGst::MessagePtr & message)
    55. {
    56. switch (message->type()) {
    57. case QGst :: MessageEos: //End of stream. We reached the end of the file.
    58. {
    59. if (m_pipeline)
    60. {
    61. m_pipeline->setState(QGst::StateNull);
    62. m_pipeline->setState(QGst::StatePlaying);
    63. }
    64. }
    65. break;
    66. default:
    67. break;
    68. }
    69. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 3rd March 2014 at 08:57. Reason: missing [code] tags

  4. #4
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Memory leak in QTGstreamer 0.10

    Please help me in resolving memory leak issue

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Memory leak in QTGstreamer 0.10

    Qt Code:
    1. m_pipeline = QGst :: ElementFactory :: make("playbin2").dynamicCast<QGst :: Pipeline>();
    To copy to clipboard, switch view to plain text mode 

    This looks like it allocates memory for "m_pipeline". Your code does not show a destructor for your Player class, so if you aren't deleting the m_pipeline somewhere else, that's probably your leak. I don't see anywhere that you do delete it, although your code is impossible to read since you didn't use [CODE] tags.

  6. #6
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Memory leak in QTGstreamer 0.10

    I am attaching my code again,

    m_pipeline = QGst :: ElementFactory :: make("playbin2").dynamicCast<QGst :: Pipeline>(); is allocating memory but only only throughout the application. can you please suggest how to deallocate memory in its destructor.

    [MAIN.CPP]
    Qt Code:
    1. #include "mediaapp.h"
    2. #include <QtGui/QApplication>
    3. #include <QGst/init.h>
    4.  
    5. int main (int argc, char *argv [] )
    6. {
    7. QApplication app ( argc, argv );
    8. QGst :: init ( &argc, &argv );
    9.  
    10. MediaApp media;
    11. media .show();
    12. media .openFile ("file://XYZ.webm");
    13. return app .exec();
    14. }
    To copy to clipboard, switch view to plain text mode 


    [MEDIAAPP.H]
    Qt Code:
    1. #ifndef MEDIAAPP_H_
    2. #define MEDIAAPP_H_
    3.  
    4. #include <QtGui/QWidget>
    5. #include <QtGui/QStyle>
    6. #include <QtCore/QTimer>
    7.  
    8. class Player;
    9. class QBoxLayout;
    10. class QTimer;
    11.  
    12. class MediaApp : public QWidget
    13. {
    14. Q_OBJECT
    15. public:
    16. MediaApp(QWidget *parent = 0);
    17. ~MediaApp();
    18. void openFile(const QString & fileName);
    19.  
    20.  
    21.  
    22. private Q_SLOTS:
    23. void onStateChanged();
    24.  
    25. private:
    26. void createUI(QBoxLayout *appLayout);
    27. Player *m_player;
    28. };
    To copy to clipboard, switch view to plain text mode 

    [MEDIAAPP.CPP]
    Qt Code:
    1. #include "mediaapp.h"
    2. #include "player.h"
    3. #include <QtGui/QBoxLayout>
    4.  
    5. MediaApp::MediaApp (QWidget *parent)
    6. : QWidget (parent)
    7. {
    8. //create the player
    9. m_player = new Player (this);
    10. connect (m_player, SIGNAL ( stateChanged() ), this, SLOT( onStateChanged() ) );
    11.  
    12. //create the UI
    13. QVBoxLayout *appLayout = new QVBoxLayout;
    14. appLayout ->setContentsMargins (0, 0, 0, 0);
    15. appLayout ->addWidget (m_player);
    16.  
    17. setLayout (appLayout);
    18. setWindowFlags (Qt::FramelessWindowHint);/* enable this for frameless window */
    19. }
    20.  
    21. MediaApp::~MediaApp()
    22. {
    23. delete m_player;
    24. }
    25.  
    26. void MediaApp::openFile(const QString & fileName)
    27. {
    28. m_player->stop();
    29. m_player->setUri(fileName);
    30. m_player->play();
    31. }
    To copy to clipboard, switch view to plain text mode 


    [PLAYER.H]
    Qt Code:
    1. #ifndef PLAYER_H_
    2. #define PLAYER_H_
    3.  
    4. #include <QtCore/QTimer>
    5. #include <QtCore/QTime>
    6. #include <QGst/Pipeline>
    7. #include <QGst/Ui/VideoWidget>
    8.  
    9. class Player : public QGst :: Ui :: VideoWidget
    10. {
    11. Q_OBJECT
    12. public:
    13. Player(QWidget *parent = 0);
    14. ~Player();
    15.  
    16. void setUri(const QString & uri);
    17. QGst :: State state() const;
    18.  
    19. public Q_SLOTS:
    20. void play();
    21.  
    22. Q_SIGNALS:
    23. void positionChanged();
    24. void stateChanged();
    25.  
    26. private:
    27. void onBusMessage(const QGst :: MessagePtr & message);
    28. void handlePipelineStateChange(const QGst :: StateChangedMessagePtr & scm);
    29.  
    30. QGst :: PipelinePtr m_pipeline;
    31. QTimer m_positionTimer;
    32. };
    33.  
    34. #endif /* PLAYER_H_ */
    To copy to clipboard, switch view to plain text mode 


    [PLAYER.CPP]
    Qt Code:
    1. #include "player.h"
    2. #include <QtCore/QDir>
    3. #include <QtCore/QUrl>
    4. #include <QGlib/Connect>
    5. #include <QGlib/Error>
    6. #include <QGst/Pipeline>
    7. #include <QGst/ElementFactory>
    8. #include <QGst/Bus>
    9. #include <QGst/Message>
    10. #include <QGst/Query>
    11. #include <QGst/ClockTime>
    12. #include <QGst/Event>
    13. #include <QGst/StreamVolume>
    14.  
    15. Player::Player(QWidget *parent)
    16. : QGst :: Ui :: VideoWidget(parent)
    17. {
    18. //this timer is used to tell the ui to change its position slider & label
    19. //every 100 ms, but only when the pipeline is playing
    20. // connect ( &m_positionTimer, SIGNAL ( timeout () ), this, SIGNAL ( positionChanged () ) );
    21. }
    22.  
    23. Player :: ~Player ()
    24. {
    25. if (m_pipeline) {
    26. m_pipeline ->setState (QGst :: StateNull );
    27. stopPipelineWatch ();
    28. }
    29. }
    30.  
    31. void Player :: setUri (const QString & uri)
    32. {
    33. QString realUri = uri;
    34. //if uri is not a real uri, assume it is a file path
    35. if (realUri.indexOf("://") < 0) {
    36. realUri = QUrl :: fromLocalFile (realUri) .toEncoded();
    37. }
    38.  
    39.  
    40. if ( !m_pipeline )
    41. {
    42. m_pipeline = QGst :: ElementFactory :: make ("playbin2") .dynamicCast <QGst::Pipeline>();
    43. if (m_pipeline)
    44. {
    45. //let the video widget watch the pipeline for new video sinks
    46. watchPipeline (m_pipeline);
    47. //watch the bus for messages
    48. QGst :: BusPtr bus = m_pipeline ->bus();
    49. bus ->addSignalWatch();
    50. QGlib :: connect (bus, "message", this, &Player :: onBusMessage);
    51. }
    52. else
    53. {
    54. qCritical() << "Failed to create the pipeline";
    55. }
    56. }
    57.  
    58. if (m_pipeline)
    59. {
    60. m_pipeline- >setProperty ("uri", realUri);
    61. }
    62. }
    63.  
    64.  
    65. QGst :: State Player :: state() const
    66. {
    67. return m_pipeline ? m_pipeline->currentState() : QGst :: StateNull;
    68. }
    69.  
    70. void Player :: play()
    71. {
    72. if (m_pipeline)
    73. {
    74. m_pipeline ->setState(QGst :: StatePlaying);
    75. }
    76. }
    77.  
    78. void Player::onBusMessage(const QGst::MessagePtr & message)
    79. {
    80. switch ( message->type()) {
    81. case QGst :: MessageEos : //End of stream. We reached the end of the file.
    82. {
    83. if (m_pipeline)
    84. {
    85. m_pipeline->setState(QGst::StateNull);
    86. m_pipeline->setState(QGst::StatePlaying);
    87. }
    88. }
    89. break;
    90. default:
    91. break;
    92. }
    93. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 3rd March 2014 at 08:59. Reason: reformatted to look better

  7. #7
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Memory leak in QTGstreamer 0.10

    Can some body compile the above code and help me in identifying the cause for memory leak.

  8. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Memory leak in QTGstreamer 0.10

    There is no obvious smoking gun in your code. Run your program in valgrind and identify what is leaking. If it truly is huge then it should stand out clearly in the typical valgrind noise. We do not have exactly the same environment as you so any result we get may not be applicable in your case.
    http://valgrind.org/docs/manual/QuickStart.html

  9. #9
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Memory leak in QTGstreamer 0.10

    I used valgrind to run my code, it shows

    ==8624== Invalid read of size 4
    ==8624== at 0x84A30D3: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84A5464: FcConfigFilename (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8A15: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE176: FcInitLoadConfig (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE265: FcInitLoadConfigAndFonts (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE484: FcInit (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x5BC33D9: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1)
    ==8624== by 0x5B509C3: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1)
    ==8624== by 0x5B51283: QApplication::QApplication(int&, char**, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1)
    ==8624== by 0x404C53: main (in /data/homedirs/MB104598/Workspace/huclient/huvideo/Release/huvideo)
    ==8624== Address 0xb1c23d4 is 20 bytes inside a block of size 22 alloc'd
    ==8624== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8624== by 0x84A302C: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84A5464: FcConfigFilename (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8A15: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE176: FcInitLoadConfig (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE265: FcInitLoadConfigAndFonts (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE484: FcInit (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x5BC33D9: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1)
    ==8624== by 0x5B509C3: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1)
    ==8624== by 0x5B51283: QApplication::QApplication(int&, char**, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1)
    ==8624== by 0x404C53: main (in /data/homedirs/MB104598/Workspace/huclient/huvideo/Release/huvideo)
    ==8624==
    ==8624== Invalid read of size 4
    ==8624== at 0x84A30E8: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84A5464: FcConfigFilename (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8A15: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B90FD: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0xA4DD6F3: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DE950: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DB7C6: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DD17A: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4E075C: XML_ParseBuffer (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0x84B8B70: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE176: FcInitLoadConfig (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE265: FcInitLoadConfigAndFonts (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== Address 0xb1ca590 is 16 bytes inside a block of size 18 alloc'd
    ==8624== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8624== by 0x84A302C: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84A5464: FcConfigFilename (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8A15: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B90FD: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0xA4DD6F3: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DE950: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DB7C6: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DD17A: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4E075C: XML_ParseBuffer (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0x84B8B70: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE176: FcInitLoadConfig (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624==
    ==8624== Invalid read of size 4
    ==8624== at 0x84A30E8: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8A15: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8E77: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B90FD: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0xA4DD6F3: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DE950: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DB7C6: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DD17A: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4E075C: XML_ParseBuffer (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0x84B8B70: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE176: FcInitLoadConfig (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE265: FcInitLoadConfigAndFonts (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== Address 0xb1e0128 is 40 bytes inside a block of size 42 alloc'd
    ==8624== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8624== by 0x84A302C: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8A15: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8E77: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B90FD: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0xA4DD6F3: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DE950: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DB7C6: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DD17A: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4E075C: XML_ParseBuffer (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0x84B8B70: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE176: FcInitLoadConfig (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624==
    ==8624== Invalid read of size 4
    ==8624== at 0x84A30D3: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8A15: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8E77: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B90FD: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0xA4DD6F3: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DE950: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DB7C6: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DD17A: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4E075C: XML_ParseBuffer (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0x84B8B70: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE176: FcInitLoadConfig (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE265: FcInitLoadConfigAndFonts (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== Address 0xb213934 is 36 bytes inside a block of size 39 alloc'd
    ==8624== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8624== by 0x84A302C: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8A15: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B8E77: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84B90FD: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0xA4DD6F3: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DE950: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DB7C6: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4DD17A: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0xA4E075C: XML_ParseBuffer (in /lib/x86_64-linux-gnu/libexpat.so.1.5.2)
    ==8624== by 0x84B8B70: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    ==8624== by 0x84AE176: FcInitLoadConfig (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.4.4)
    Please help if you can make out anything.

    Thanks

  10. #10
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Memory leak in QTGstreamer 0.10

    There are no memory leaks in that output, but it also does not mention any code over which you have control.
    Is that the entire output of:
    Qt Code:
    1. valgrind --leakcheck=yes ./yourprogram
    To copy to clipboard, switch view to plain text mode 
    http://valgrind.org/docs/manual/quic...ck-start.mcrun

  11. #11
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Memory leak in QTGstreamer 0.10

    No, entire output is longer than 10000 character, I am posting the ending part


    ==8624== 705,063 bytes in 1 blocks are possibly lost in loss record 10,332 of 10,336
    ==8624== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8624== by 0x1BE06BDD: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE085DF: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE0B817: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE65778: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE6C5CE: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE5F6B1: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE05545: vpx_codec_decode (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1B9E67F7: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvp8.so)
    ==8624== by 0x1BBF290A: ??? (in /usr/lib/x86_64-linux-gnu/libgstbasevideo-0.10.so.0.0.0)
    ==8624== by 0x1BBF618C: ??? (in /usr/lib/x86_64-linux-gnu/libgstbasevideo-0.10.so.0.0.0)
    ==8624== by 0x7FFC229: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
    ==8624==
    ==8624== 705,063 bytes in 1 blocks are possibly lost in loss record 10,333 of 10,336
    ==8624== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8624== by 0x1BE06BDD: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE085DF: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE0B849: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE65778: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE6C5CE: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE5F6B1: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE05545: vpx_codec_decode (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1B9E67F7: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvp8.so)
    ==8624== by 0x1BBF290A: ??? (in /usr/lib/x86_64-linux-gnu/libgstbasevideo-0.10.so.0.0.0)
    ==8624== by 0x1BBF618C: ??? (in /usr/lib/x86_64-linux-gnu/libgstbasevideo-0.10.so.0.0.0)
    ==8624== by 0x7FFC229: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
    ==8624==
    ==8624== 705,063 bytes in 1 blocks are possibly lost in loss record 10,334 of 10,336
    ==8624== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8624== by 0x1BE06BDD: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE085DF: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE0B87B: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE65778: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE6C5CE: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE5F6B1: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE05545: vpx_codec_decode (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1B9E67F7: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvp8.so)
    ==8624== by 0x1BBF290A: ??? (in /usr/lib/x86_64-linux-gnu/libgstbasevideo-0.10.so.0.0.0)
    ==8624== by 0x1BBF618C: ??? (in /usr/lib/x86_64-linux-gnu/libgstbasevideo-0.10.so.0.0.0)
    ==8624== by 0x7FFC229: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
    ==8624==
    ==8624== 705,063 bytes in 1 blocks are possibly lost in loss record 10,335 of 10,336
    ==8624== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8624== by 0x1BE06BDD: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE085DF: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE0B909: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE65778: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE6C5CE: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE5F6B1: ??? (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1BE05545: vpx_codec_decode (in /usr/lib/libvpx.so.1.0.0)
    ==8624== by 0x1B9E67F7: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvp8.so)
    ==8624== by 0x1BBF290A: ??? (in /usr/lib/x86_64-linux-gnu/libgstbasevideo-0.10.so.0.0.0)
    ==8624== by 0x1BBF618C: ??? (in /usr/lib/x86_64-linux-gnu/libgstbasevideo-0.10.so.0.0.0)
    ==8624== by 0x7FFC229: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
    ==8624==
    ==8624== 1,409,024 bytes in 43 blocks are possibly lost in loss record 10,336 of 10,336
    ==8624== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8624== by 0x77AFA38: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
    ==8624== by 0x1D12064A: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideoscale.so)
    ==8624== by 0x19807B79: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
    ==8624== by 0x19807E13: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
    ==8624== by 0x19808009: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
    ==8624== by 0x1980982C: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
    ==8624== by 0x7FFC229: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
    ==8624== by 0x7FFFAE5: gst_pad_push (in /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
    ==8624== by 0x198098C7: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
    ==8624== by 0x7FFC229: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
    ==8624== by 0x7FFFAE5: gst_pad_push (in /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
    ==8624==
    ==8624== LEAK SUMMARY:
    ==8624== definitely lost: 21,075 bytes in 11 blocks
    ==8624== indirectly lost: 11,328 bytes in 352 blocks
    ==8624== possibly lost: 8,015,388 bytes in 12,686 blocks
    ==8624== still reachable: 3,241,022 bytes in 18,205 blocks
    ==8624== suppressed: 0 bytes in 0 blocks
    ==8624== Reachable blocks (those to which a pointer was found) are not shown.
    ==8624== To see them, rerun with: --leak-check=full --show-reachable=yes
    ==8624==
    ==8624== For counts of detected and suppressed errors, rerun with: -v
    ==8624== ERROR SUMMARY: 2610 errors from 2594 contexts (suppressed: 2 from 2)

  12. #12
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Memory leak in QTGstreamer 0.10

    Can any body help me on this..

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Memory leak in QTGstreamer 0.10

    There is no Qt code in this report so I don't know why you claim Qt leaks any memory. You can ask this on some GStreamer site however I wouldn't be suprised if these were false positives.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Qt example with memory leak
    By Squall in forum Qt Programming
    Replies: 5
    Last Post: 21st February 2011, 10:07
  2. memory leak - where?
    By Tomasz in forum Newbie
    Replies: 36
    Last Post: 5th September 2010, 23:47
  3. memory leak
    By mattia in forum Newbie
    Replies: 18
    Last Post: 16th January 2008, 10:22
  4. Memory leak?
    By Enygma in forum Qt Programming
    Replies: 10
    Last Post: 4th September 2007, 16:24
  5. Memory Leak in Qt
    By Krish_ng in forum Qt Programming
    Replies: 3
    Last Post: 22nd July 2007, 08:02

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.