loboris / ESP32_TFT_library

Full featured TFT library for ESP32 with demo application
564 stars 219 forks source link

crash with lastest version #10

Closed ataweg closed 6 years ago

ataweg commented 6 years ago

Hello Boris,

I get, build and run (gbr) the current version and it crashed with:

Guru Meditation Error of type LoadProhibited occurred on core  0. Exception was unhandled.
Register dump:
PC      : 0x40002020  PS      : 0x00060130  A0      : 0x800020b8  A1      : 0x3ffc2790  
A2      : 0x3ffc2a78  A3      : 0x8011c71e  A4      : 0x3ff96458  A5      : 0x00000008  
A6      : 0x0000000d  A7      : 0x00000008  A8      : 0x8000be99  A9      : 0x3ffc2770  
A10     : 0x3ffc2a78  A11     : 0x40084f90  A12     : 0x3ffc2804  A13     : 0x3ffce014  
A14     : 0x00000068  A15     : 0x00000006  SAR     : 0x0000001c  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x8011c72a  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000000  

Backtrace: 0x40002020:0x3ffc2790 0x400020b5:0x3ffc27b0 0x4011e365:0x3ffc27d0 0x401025be:0x3ffc28e0 0x40102b4c:0x3ffc2900 0x40102e84:0x3ffc2920 0x400d0e6b:0x3ffc2980

CPU halted.
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

After some investigation (with image_debug = 1) I found out that this happens after "File error: Bad file numbers" occurs. Digging deeper: the crash happens at the end of function TFT_jpg_image( ) when closing the the not existing file (line 2467). I solved the problem by putting up "dev.fhndl = NULL;" (line2390) some lines before the if query.

loboris commented 6 years ago

Thanks, fixed in the latest commit.