如上图所示的日志信息, 请问如何定位有问题代码的位置? 没问题的地方不会出现这些日志信息. 或者出现这些日志信息的时候是因为什么原因呢?
查看更多
一般用来查找内存泄漏或者破坏的地方, 打开后, 正常运行时, 不会打印, 直到出现内存申请, 释放失败, 就会打印出来所有已申请且未释放的内存用来查看. 你这截图不完整, 看不出什么来.
@1201 If your calculations require a large amount of RAM, use PSRAM for your arrays and variables. Solder the chip on top of the w801 board. When outputting to UART, reduce the transmission block size.
发布 问题
分享 好友
手机 浏览
回到 顶部
==" Memory was allocated from . . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c at line 126 with length 16, allocated size 28440, count 42
==" Memory was allocated size 28440, count 42
Block ( 1) : addr "200162A0" , file ". . /. . /. . /. . /. . /. . /. . /platform/sys/wm_main. c" , line "259" , length "3072"
Block ( 2) : addr "20016EB8" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/spi/wm_hostspi. c" , line "1327" , length "44"
Block ( 3) : addr "20016EF8" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/flash/wm_fls. c" , line "514" , length "16"
Block ( 4) : addr "20016F20" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "32"
Block ( 5) : addr "20016F58" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/spi/wm_hostspi. c" , line "1405" , length "1024"
Block ( 6) : addr "20017370" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/internalflash/wm_internal_fls. c" , line "1314" , length "16"
Block ( 7) : addr "20017398" , file "" , line "536906272" , length "756"
Block ( 8) : addr "200176A0" , file "" , line "536906272" , length "504"
Block ( 9) : addr "200178B0" , file " (m 臀 w4ゥゥh. 'V9 " , line "0" , length "36"
Block (10) : addr "200178E8" , file "" , line "0" , length "2872"
Block (11) : addr "20018438" , file "" , line "536906272" , length "300"
Block (12) : addr "20018578" , file "" , line "0" , length "256"
Block (13) : addr "20018690" , file "" , line "536875476" , length "248"
Block (14) : addr "200187A0" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "80"
Block (15) : addr "20018808" , file "" , line "0" , length "1416"
Block (16) : addr "20018DA8" , file "" , line "0" , length "284"
Block (17) : addr "20018ED8" , file "`@; " , line "1023" , length "20"
Block (18) : addr "20018F00" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "273" , length "24"
Block (19) : addr "20018F30" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "279" , length "24"
Block (20) : addr "20019050" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "256"
Block (21) : addr "20019168" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "227" , length "84"
Block (22) : addr "200191D0" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "233" , length "84"
Block (23) : addr "20019238" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (24) : addr "20019260" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (25) : addr "200192B0" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "80"
Block (26) : addr "20019318" , file ". . /. . /. . /. . /. . /. . /. . /platform/sys/tls_sys. c" , line "581" , length "1536"
Block (27) : addr "20019930" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "389" , length "12"
Block (28) : addr "20019950" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "128"
Block (29) : addr "20019A08" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/uart/wm_uart. c" , line "925" , length "4096"
Block (30) : addr "200199E8" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "389" , length "12"
Block (31) : addr "2001BA38" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "128"
Block (32) : addr "2001BAD0" , file ". . /. . /. . /. . /. . /. . /. . /src/app/httpclient/wm_httpclient_task. c" , line "165" , length "4096"
Block (33) : addr "2001CAE8" , file ". . /. . /. . /. . /. . /. . /. . /. . /code/src/uart1_rt. c" , line "2543" , length "28"
Block (34) : addr "2001CB18" , file ". . /. . /. . /. . /. . /. . /. . /. . /code/src/uart1_rt. c" , line "2549" , length "1025"
Block (35) : addr "2001CF30" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "128"
Block (36) : addr "2001CFC8" , file ". . /. . /. . /. . /. . /. . /. . /. . /code/src/uart1_rt. c" , line "101" , length "6"
Block (37) : addr "2001CFE0" , file ". . /. . /. . /. . /. . /. . /. . /. . /code/src/uart1_rt. c" , line "117" , length "16"
Block (38) : addr "2001D008" , file ". . /. . /. . /. . /. . /. . /. . /. . /code/src/uart1_rt. c" , line "133" , length "1024"
Block (39) : addr "2001AA20" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/uart/wm_uart. c" , line "925" , length "4096"
Block (40) : addr "20019288" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (41) : addr "20018FB0" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (42) : addr "20019028" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
==" Memory was allocated from . . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c at line 126 with length 16, allocated size 28412, count 41
==" Memory was allocated size 28412, count 41
Block ( 1) : addr "200162A0" , file ". . /. . /. . /. . /. . /. . /. . /platform/sys/wm_main. c" , line "259" , length "3072"
Block ( 2) : addr "20016EB8" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/spi/wm_hostspi. c" , line "1327" , length "44"
现在是程序运行后开始一直循环打印这段内容, 昨天是间隔打印的这段内容
请问这是什么原因
Memory 20047FEC was deallocated from . . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c at line 153
Memory tailer corruption due to overflow detected at 20047FE8
Tailer pattern 0 (0x0)
Memory was allocated from . . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c at line 126 with length 16
==" Memory was allocated size 27488, count 44
Block ( 1) : addr "200166A0" , file ". . /. . /. . /. . /. . /. . /. . /platform/sys/wm_main. c" , line "259" , length "3072"
Block ( 2) : addr "200172B8" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/spi/wm_hostspi. c" , line "1327" , length "44"
Block ( 3) : addr "200172F8" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/flash/wm_fls. c" , line "514" , length "16"
Block ( 4) : addr "20017320" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "32"
Block ( 5) : addr "20017358" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/spi/wm_hostspi. c" , line "1405" , length "1024"
Block ( 6) : addr "20017770" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/internalflash/wm_internal_fls. c" , line "1314" , length "16"
Block ( 7) : addr "20017798" , file "" , line "536907296" , length "756"
Block ( 8) : addr "20017AA0" , file "" , line "536907296" , length "504"
Block ( 9) : addr "20017CB0" , file " (m 臀 w4ゥゥ豺'V9N" , line "0" , length "36"
Block (10) : addr "20017CE8" , file "" , line "0" , length "2872"
Block (11) : addr "20018838" , file "" , line "536907296" , length "300"
Block (12) : addr "20018978" , file "" , line "0" , length "256"
Block (13) : addr "20018A90" , file "" , line "536875476" , length "248"
Block (14) : addr "20018BA0" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "80"
Block (15) : addr "20018C08" , file "" , line "0" , length "1416"
Block (16) : addr "200191A8" , file "" , line "0" , length "284"
Block (17) : addr "200192D8" , file "`@; " , line "1023" , length "20"
Block (18) : addr "20019300" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "273" , length "24"
Block (19) : addr "20019330" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "279" , length "24"
Block (20) : addr "20019450" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "256"
Block (21) : addr "20019568" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "227" , length "84"
Block (22) : addr "200195D0" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "233" , length "84"
Block (23) : addr "20019638" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (24) : addr "20019660" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (25) : addr "200196B0" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "80"
Block (26) : addr "20019718" , file ". . /. . /. . /. . /. . /. . /. . /platform/sys/tls_sys. c" , line "581" , length "1536"
Block (27) : addr "20019D30" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "389" , length "12"
Block (28) : addr "20019D50" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "128"
Block (29) : addr "20019E08" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/uart/wm_uart. c" , line "925" , length "4096"
Block (30) : addr "20019DE8" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/netif/wm_ethernet. c" , line "389" , length "12"
Block (31) : addr "2001BE38" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "128"
Block (32) : addr "2001BED0" , file ". . /. . /. . /. . /. . /. . /. . /src/app/httpclient/wm_httpclient_task. c" , line "165" , length "4096"
Block (33) : addr "2001CEE8" , file ". . /. . /. . /. . /. . /. . /. . /. . /code/src/uart1_rt. c" , line "1049" , length "28"
Block (34) : addr "2001CF18" , file ". . /. . /. . /. . /. . /. . /. . /. . /code/src/uart1_rt. c" , line "1055" , length "1025"
Block (35) : addr "2001D330" , file ". . /. . /. . /. . /. . /. . /. . /src/os/rtos/wm_osal_rtos. c" , line "592" , length "128"
Block (36) : addr "2001D3C8" , file ". . /. . /. . /. . /. . /. . /. . /. . /code/src/uart1_rt. c" , line "103" , length "6"
Block (37) : addr "2001D3E0" , file ". . /. . /. . /. . /. . /. . /. . /. . /code/src/uart1_rt. c" , line "120" , length "16"
Block (38) : addr "2001AE20" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/uart/wm_uart. c" , line "925" , length "4096"
Block (39) : addr "20045AB8" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (40) : addr "20047278" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (41) : addr "20047E58" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (42) : addr "20047E80" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (43) : addr "20047EA8" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Block (44) : addr "20047FC0" , file ". . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c" , line "126" , length "16"
Memory 20047FEC was deallocated from . . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c at line 153
Memory tailer corruption due to overflow detected at 20047FE8
Tailer pattern 0 (0x0)
Memory was allocated from . . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 0. 3/core/mem. c at line 126 with length 16
==" Memory was allocated size 27488, count 44
Block ( 1) : addr "200166A0" , file ". . /. . /. . /. . /. . /. . /. . /platform/sys/wm_main. c" , line "259" , length "3072"
Block ( 2) : addr "200172B8" , file ". . /. . /. . /. . /. . /. . /. . /platform/drivers/spi/wm_hostspi. c" , line "1327" , length "44"
还有一段是这种的, 帮忙看一下
在内存申请的时候程序有判断是不是 NULL, 是 NULL 的话会打印信息
@1201 我看不出来, 这得结合代码去分析.
@1201 Without the source code it is difficult to understand what you want to do. Try to decompose your project into small, functionally complete blocks. You can find the problem area by elimination. You also need to find out what changes were made to the SDK system settings.
@abcd 那段代码一千多行, 在 uart 传输之前做的一些计算. 有没有一些大概的原因呀? 或者有什么函数可以定位到出问题的地方. 每次遇见这些输出的时候, 可以正常计算, 但是到 uart 发送的时候就会发不出去
@abcd wm_sdk_w80x_20211115 我用的这个 SDK, 用的 w801 芯片
@1201 这已经是很多年之前的 SDK 了, 建议用官网最新的 SDK.
@1201 感觉是内存破坏, 用了不该用的内存, 比如某段内存已经释放了, 但是有被用到了. 或者使用的长度比申请的长度大导致越界了. 检查代码吧.
@abcd 我更换了最新的 sdk 后会打印这个日志, 能否告知我这个问题如何解决呢?
Assertion "sys_timeout: timeout ! = NULL, pool MEMP_SYS_TIMEOUT is empty" failed at line 190 in . . /. . /. . /. . /. . /. . /. . /src/network/lwip2. 1. 3/core/timeouts. c