Arduino_GFX
Arduino_GFX copied to clipboard
crash when canvas functions related calls are issued
Hello, I'm using a Makerfabs 4.3" capacitive touch based on ESP32S3, hardware version 3.1 (here's the product page https://www.makerfabs.com/esp32-s3-parallel-tft-with-touch-4-3-inch.html)
The display works fine when the gfx-library is being used without the creation of a canvas, below the gfx-library declarations: Arduino_ESP32RGBPanel rgbpanel = new Arduino_ESP32RGBPanel( 40 / DE /, 41 / VSYNC /, 39 / HSYNC /, 42 / PCLK /, 45 / R0 /, 48 / R1 /, 47 / R2 /, 21 / R3 /, 14 / R4 /, 5 / G0 /, 6 / G1 /, 7 / G2 /, 15 / G3 /, 16 / G4 /, 4 / G5 /, 8 / B0 /, 3 / B1 /, 46 / B2 /, 9 / B3 /, 1 / B4 /, 0 / hsync_polarity /, 40 / hsync_front_porch /, 48 / hsync_pulse_width /, 88 / hsync_back_porch /, 0 / vsync_polarity /, 13 / vsync_front_porch /, 3 / vsync_pulse_width /, 32 / vsync_back_porch /, 1 / pclk_active_neg /, 16000000 / prefer_speed */); Arduino_RGB_Display gfx = new Arduino_RGB_Display( 800 / width /, 480 / height /, rgbpanel, 0 / rotation /, true / auto_flush */); . // Init Display gfx->begin(); gfx->fillScreen(BLACK); gfx->setTextColor(WHITE); gfx->setFont(u8g2_font_fub42_tf); gfx->setCursor(100, 100); gfx->println("\n01-setup-pre-setRotation");
Then as soon I add the Canvas declaration to the above gfx declarations: *Arduino_Canvas gfxCanvas = new Arduino_Canvas(800, 480, gfx);
and the canvas usage instructions (commenting the instructions of the gfx):
// Init Display
gfx->begin();
/*
gfx->fillScreen(BLACK);
gfx->setTextColor(WHITE);
gfx->setFont(u8g2_font_fub42_tf);
gfx->setCursor(100, 100);
gfx->println("\n01-setup-pre-setRotation");
*/
gfxCanvas->begin();
gfxCanvas->fillScreen(BLACK);
gfxCanvas->setTextColor(WHITE);
gfxCanvas->setFont(u8g2_font_fub42_tf);
gfxCanvas->setCursor(100, 100);
gfxCanvas->println("\n01-setup-pre-setRotation");
gfx->setRotation(0);
currRotation = gfx->getRotation();
Serial.print("\n02-setup-currRotation : ");
Serial.println(currRotation);
gfxCanvas->setRotation(0);
currRotationCanvas = gfxCanvas->getRotation();
Serial.print("\n02-setup-currRotation Canvas: ");
Serial.println(currRotationCanvas);
gfxCanvas->flush();
It crashes as below:
E (2280) lcd_panel.rgb: esp_lcd_new_rgb_panel(128): no free rgb panel slot ESP_ERROR_CHECK failed: esp_err_t 0x105 (ESP_ERR_NOT_FOUND) at 0x4037dab8 file: "C:\Users\keplero\Documents\Arduino\libraries\GFX_Library_for_Arduino\src\databus\Arduino_ESP32RGBPanel.cpp" line 118 func: uint16_t* Arduino_ESP32RGBPanel::getFrameBuffer(int16_t, int16_t) expression: esp_lcd_new_rgb_panel(_panel_config, &_panel_handle)
abort() was called at PC 0x4037dabb on core 1
Backtrace: 0x40377e8e:0x3fcebbc0 0x4037dac5:0x3fcebbe0 0x40383f51:0x3fcebc00 0x4037dabb:0x3fcebc80 0x420115cf:0x3fcebca0 0x4201173a:0x3fcebcf0 0x4201177d:0x3fcebd10 0x420112ce:0x3fcebd30 0x42005be9:0x3fcebd50 0x420190fe:0x3fcebeb0
ELF file SHA256: 52f034984ac6e50c
Rebooting...