如上圖所示的日志信息,請問如何定位有問題代碼的位置?沒問題的地方不會出現這些日志信息。或者出現這些日志信息的時候是因為什麼原因呢?
查看更多
一般用來查找內存泄漏或者破壞的地方,打開後,正常運行時,不會打印,直到出現內存申請、釋放失敗,就會打印出來所有已申請且未釋放的內存用來查看。你這截圖不完整,看不出什麼來。
@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