Toybrick

标题: 退出程序时打印mpp_buffer有缓冲区未释放,请问该如何处理 [打印本页]

作者: whx_huxin    时间: 2020-10-16 09:26
标题: 退出程序时打印mpp_buffer有缓冲区未释放,请问该如何处理
mpp[15410]: mpp_buffer: mpp_group 0x7f70001d60 tag unknown caller readIPC_GetImage_FromRtsp mode internal type ion deinit with 9216000 bytes not released
mpp[15410]: mpp_buffer:
dumping buffer group 0x7f70001d60 id 2 from put_group
mpp[15410]: mpp_buffer: mode internal
mpp[15410]: mpp_buffer: type ion
mpp[15410]: mpp_buffer: limit size 1843200 count 24
mpp[15410]: mpp_buffer: used buffer count 5
mpp[15410]: mpp_buffer: buffer 0x7f680024c0 fd   24 size    1843200 ref_count   1 discard 0 caller try_proc_dec_task
mpp[15410]: mpp_buffer: buffer 0x7f68002ba0 fd   25 size    1843200 ref_count   1 discard 0 caller try_proc_dec_task
mpp[15410]: mpp_buffer: buffer 0x7f68003280 fd   26 size    1843200 ref_count   1 discard 0 caller try_proc_dec_task
mpp[15410]: mpp_buffer: buffer 0x7f68003960 fd   27 size    1843200 ref_count   1 discard 0 caller try_proc_dec_task
mpp[15410]: mpp_buffer: buffer 0x7f680018a0 fd   21 size    1843200 ref_count   3 discard 0 caller try_proc_dec_task
mpp[15410]: mpp_buffer: unused buffer count 0
[ERR]channel(0) clearIPC_ImageMem free mem 14 blocks

mpp[15410]: mpp_buffer: ~MppBufferService cleaning leaked buffer
free(): invalid pointer


作者: whx_huxin    时间: 2020-10-16 13:33
退出前已经执行如下语句来释放资源,但是仍然会报错:

        if (pstHandle->pCtx != NULL)
        {
        mpp_destroy(pstHandle->pCtx);
        pstHandle->pCtx = NULL;
                pstHandle->pMpi = NULL;
    }
    if (pstHandle->pfrm_grp)
        {
                mpp_buffer_group_put(pstHandle->pfrm_grp);
        pstHandle->pfrm_grp = NULL;
    }
作者: whx_huxin    时间: 2020-10-16 13:34
RK3399PRO的网上资料很少,请版主协助定位一下
作者: whx_huxin    时间: 2020-10-16 14:00
这是用gdb打印的BT信息:

mpp[24318]: mpp_buffer: ~MppBufferService cleaning leaked buffer
free(): invalid pointer

Thread 1 "ipc_invserv_mai" received signal SIGABRT, Aborted.
0x0000007fb5181714 in raise () from /lib/aarch64-linux-gnu/libc.so.6
(gdb) bt
#0  0x0000007fb5181714 in raise () from /lib/aarch64-linux-gnu/libc.so.6
#1  0x0000007fb516f8e8 in abort () from /lib/aarch64-linux-gnu/libc.so.6
#2  0x0000007fb51bb6f8 in ?? () from /lib/aarch64-linux-gnu/libc.so.6
#3  0x0000007fb51c1cb4 in ?? () from /lib/aarch64-linux-gnu/libc.so.6
#4  0x0000007fb51c356c in ?? () from /lib/aarch64-linux-gnu/libc.so.6
#5  0x0000007fb6301e48 in mpp_osal_free (
    caller=caller@entry=0x7fb632f0b0 <deinit_buffer_no_lock(MppBufferImpl_t*, char const*)::__FUNCTION__> "deinit_buffer_no_lock",
    ptr=ptr@entry=0x5555649bb8) at ./osal/mpp_mem.cpp:719
#6  0x0000007fb62f4960 in deinit_buffer_no_lock (buffer=0x5555649bb8,
    caller=caller@entry=0x7fb632f160 <MppBufferService::~MppBufferService()::__FUNCTION__> "~MppBufferService")
    at ./mpp/base/mpp_buffer_impl.cpp:222
#7  0x0000007fb62f5e00 in MppBufferService::~MppBufferService (this=0x7fb6350018 <MppBufferService::get_instance()::instance>,
    __in_chrg=<optimized out>) at ./mpp/base/mpp_buffer_impl.cpp:655
#8  0x0000007fb5183cc8 in ?? () from /lib/aarch64-linux-gnu/libc.so.6
#9  0x0000007fb5183e2c in exit () from /lib/aarch64-linux-gnu/libc.so.6
#10 0x0000007fb516fd28 in __libc_start_main () from /lib/aarch64-linux-gnu/libc.so.6
#11 0x000000555557ce08 in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
作者: zhuo799154051    时间: 2020-11-17 13:48
兄弟我也碰到这个问题了,你解决了吗?怎么处理掉这问题
作者: yangng    时间: 2022-3-22 13:58
按顺序
mpi->reset(ctx);
mpp_buffer_group_put(group);
mpp_destroy(ctx);




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3