Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heap corruption when printing 'g' #48

Open
rpatel3001 opened this issue Aug 8, 2018 · 3 comments
Open

heap corruption when printing 'g' #48

rpatel3001 opened this issue Aug 8, 2018 · 3 comments

Comments

@rpatel3001
Copy link

I'm experiencing heap corruption when trying to print a string containing the lowercase letter g using the TFT_print function. The text up to the letter g is printed, and the part of the g that looks like an a, but the descender and the rest of the text is cut off. The esp crashes with

Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.                        
Core 0 register dump:                                                                                     
PC      : 0x4008f6c3  PS      : 0x00060b33  A0      : 0x80082824  A1      : 0x3ffbb0e0                    
0x4008f6c3: is_free at /home/rajan/esp/esp-idf/components/heap/multi_heap.c:377                           
 (inlined by) multi_heap_malloc_impl at /home/rajan/esp/esp-idf/components/heap/multi_heap.c:429          
                                                                                                          
A2      : 0x3ffb9598  A3      : 0x0000014c  A4      : 0x3ffba044  A5      : 0x00000000                    
A6      : 0x00000840  A7      : 0x00000200  A8      : 0x00000001  A9      : 0xff00d044                    
A10     : 0x3ffba044  A11     : 0x00000001  A12     : 0x3ffba048  A13     : 0x3ffb95a8                    
A14     : 0x00000344  A15     : 0x3ffba150  SAR     : 0x0000001b  EXCCAUSE: 0x0000001c                    
EXCVADDR: 0xff00d044  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffff9                    
                                                                                                          
Backtrace: 0x4008f6c3:0x3ffbb0e0 0x40082821:0x3ffbb100 0x400e6a95:0x3ffbb120 0x400e7132:0x3ffbb150 0x400d2
b0b:0x3ffbb180 0x400d0f2e:0x3ffbb360                                                                      
0x4008f6c3: is_free at /home/rajan/esp/esp-idf/components/heap/multi_heap.c:377                           
 (inlined by) multi_heap_malloc_impl at /home/rajan/esp/esp-idf/components/heap/multi_heap.c:429          
                                                                                                          
0x40082821: heap_caps_malloc at /home/rajan/esp/esp-idf/components/heap/heap_caps.c:130                   
                                                                                                          
0x400e6a95: printProportionalChar at /home/rajan/esp/hello_world/components/tft/tft.c:1523                

0x400e7132: TFT_print at /home/rajan/esp/hello_world/components/tft/tft.c:2019 (discriminator 1)

0x400d2b0b: app_main at /home/rajan/esp/hello_world/main/hello_world_main.c:165

0x400d0f2e: main_task at /home/rajan/esp/esp-idf/components/esp32/cpu_start.c:470

and resets.

@AsyncAwayt
Copy link

Not having this issue on my applications. What fonts are you using?

@rpatel3001
Copy link
Author

I had left the font as default. This issue was solved by manually calling TFT_setFont(DEFAULT_FONT, 0)

@MichaelEFlip
Copy link

I have the same problems here when using a TTGO T-DISPLAY (CONFIG_TFT_PREDEFINED_DISPLAY_TYPE = 5).

Characters "p" and "g" in TFT_print cause immediate resets of the ESP32. Setting the default font as mentioned above solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants