Adafruit_ImageReader icon indicating copy to clipboard operation
Adafruit_ImageReader copied to clipboard

Crash attempting to draw monichrome bitmat to EPD

Open ScottCUSA opened this issue 1 year ago • 1 comments

  • Arduino board: Adafruit MagTag (black silkscreen)

  • Arduino IDE version (found in Arduino -> About Arduino menu): 2.2.3

  • List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too): LIST REPRO STEPS BELOW

The MagTag seems to crash and reboot attempting to draw the attached monochrome bitmap weather_bg.bmp (slightly modifed version from WeatherStation circuit python example) using Adafruit_ImageReader_EPD on an MagTag.

Displaying the blinka.bmp works fine, and loading the weather_bg.bmp to an Adafruit_Image_EPD works fine, but attempting to draw it onto the display caused the MagTag to hard reset.

A added some Serial prints to the coreBMP function, as an attempt to figure out what's wrong. It seems to get past the end of the scan line for loop, but it doesn't seem get to the end of the coreBMP function. I haven't been able to figure out why.

I've attached the weather_bg.bmp and the ino I'm using, it's just a trimmed down version of the ThinkInkDisplays example from this repo.

Serial Output:

Initializing filesystem...Querying weather_bg.bmp image size...Success!
Image dimensions: 296x128
Loading weather_bg.bmp to canvas...Success!
Drawing weather_bg.bmp to EPD...Disconnected (ClearCommError failed (PermissionError(13, 'The device does not recognize the command.', None, 22)))
Reconnecting to COM11    Connected!
Initializing filesystem...Querying weather_bg.bmp image size...Success!
Image dimensions: 296x128
Loading weather_bg.bmp to canvas...Success!
Drawing weather_bg.bmp to EPD...

weather_bg.zip MagTag_ImageReader_EPD_Example.zip

ScottCUSA avatar Nov 19 '24 16:11 ScottCUSA

I was able to connect to the UART, and this was output repeatedly:

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4002700a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6110,len:0x1794
load:0x4004b000,len:0x4
load:0x4004b004,len:0xfdc
load:0x4004f000,len:0x3370
entry 0x4004b320
␛[0;32mI (26) boot: ESP-IDF v5.1.4 2nd stage bootloader␛[0m
␛[0;32mI (26) boot: compile time Sep  5 2024 17:37:15␛[0m
␛[0;32mI (26) boot: chip revision: v0.0␛[0m
␛[0;32mI (30) qio_mode: Enabling default flash chip QIO␛[0m
␛[0;32mI (35) boot.esp32s2: SPI Speed      : 80MHz␛[0m
␛[0;32mI (40) boot.esp32s2: SPI Mode       : QIO␛[0m
␛[0;32mI (44) boot.esp32s2: SPI Flash Size : 4MB␛[0m
␛[0;32mI (49) boot: Enabling RNG early entropy source...␛[0m
␛[0;32mI (55) boot: Partition Table:␛[0m
␛[0;32mI (58) boot: ## Label            Usage          Type ST Offset   Length␛[0m
␛[0;32mI (65) boot:  0 nvs              WiFi data        01 02 00009000 00005000␛[0m
␛[0;32mI (73) boot:  1 otadata          OTA data         01 00 0000e000 00002000␛[0m
␛[0;32mI (80) boot:  2 ota_0            OTA app          00 10 00010000 00160000␛[0m
␛[0;32mI (88) boot:  3 ota_1            OTA app          00 11 00170000 00160000␛[0m
␛[0;32mI (95) boot:  4 uf2              factory app      00 00 002d0000 00040000␛[0m
␛[0;32mI (103) boot:  5 ffat             Unknown data     01 81 00310000 000f0000␛[0m
␛[0;32mI (110) boot: End of partition table␛[0m
␛[0;32mI (115) boot: Reset Reason = 12␛[0m
␛[0;32mI (118) boot: Reset hint = 4␛[0m
␛[0;32mI (122) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=17eb0h ( 97968) map␛[0m
␛[0;32mI (147) esp_image: segment 1: paddr=00027ed8 vaddr=3ffc1710 size=020b8h (  8376) load␛[0m
␛[0;32mI (149) esp_image: segment 2: paddr=00029f98 vaddr=40024000 size=06080h ( 24704) load␛[0m
␛[0;32mI (159) esp_image: segment 3: paddr=00030020 vaddr=40080020 size=36f44h (225092) map␛[0m
␛[0;32mI (200) esp_image: segment 4: paddr=00066f6c vaddr=4002a080 size=07684h ( 30340) load␛[0m
␛[0;32mI (214) boot: Loaded app from partition at offset 0x10000␛[0m
␛[0;32mI (214) boot: Disabling RNG early entropy source...␛[0m
E (443) esp_core_dump_flash: No core dump partition found!
E (443) esp_core_dump_flash: No core dump partition found!
Guru Meditation Error: Core  0 panic'ed (Double exception). 

Core  0 register dump:
PC      : 0x4002d397  PS      : 0x00040236  A0      : 0x8008d386  A1      : 0x3ffd3280
A2      : 0x00000000  A3      : 0x3f000176  A4      : 0x00000000  A5      : 0x00000000
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x80087578  A9      : 0x3ffd2f50  
A10     : 0x00000000  A11     : 0xc02746d9  A12     : 0x3ffc3aa0  A13     : 0x00000000
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x0000001b  EXCCAUSE: 0x00000002  
EXCVADDR: 0xfffffff0  LBEG    : 0x3ffc3aa0  LEND    : 0x00000000  LCOUNT  : 0x40028aaf


Backtrace: 0x4002d394:0x3ffd3280 0x4008d383:0x3ffd3440 0x4008d383:0x00000000 |<-CORRUPTED

ScottCUSA avatar Nov 20 '24 01:11 ScottCUSA