E (35) gpio: gpio_set_level(226): GPIO output gpio_num error

Hi everyone.
The TTGO sketch from: THAT Project, works but got error need help please.
Thanks
adam

#include <SPI.h>
#include <ArduinoWebsockets.h>
#include <WiFi.h>
#include <TJpg_Decoder.h>
#include <TFT_eSPI.h>
#include "Button2.h";

#define RIGHT_BUTTON_PIN  35
#define LEFT_BUTTON_PIN  0
#define YPOS_MAX 0
#define YPOS_MIN -105
#define MOVE_FORCE 20

const char* ssid = "ESP32-THAT-PROJECT";
const char* password = "California";

using namespace websockets;
WebsocketsServer server;
WebsocketsClient client;

TFT_eSPI tft = TFT_eSPI();
Button2 rButton = Button2(RIGHT_BUTTON_PIN);
Button2 lButton = Button2(LEFT_BUTTON_PIN);

int yPos = -52;

void setup() {
  Serial.begin(115200);

  buttonInit();
  tft.begin();
  tft.setRotation(1);
  tft.setTextColor(TFT_WHITE,TFT_BLACK); 
  tft.fillScreen(TFT_BLACK);
  tft.setSwapBytes(true);
  tft.setTextFont(4);
  TJpgDec.setJpgScale(1);
  TJpgDec.setCallback(tft_output);
  
  tft.println("> Setting AP...");
  WiFi.softAP(ssid, password);

  IPAddress IP = WiFi.softAPIP();
  tft.println("> AP IP Address");
  tft.print(">" ); 
  tft.println(IP);
  tft.println("> Waiting for");
  tft.println("> ESP32CAM");

  server.listen(8888);
}

void loop() {
  rButton.loop();
  lButton.loop();
  
  if(server.poll()){
    client = server.accept();
    }

  if(client.available()){
    client.poll();
    
    WebsocketsMessage msg = client.readBlocking();
    uint32_t t = millis();
    
    TJpgDec.drawJpg(-40, yPos, (const uint8_t*)msg.c_str(), msg.length());
    
    t = millis() - t;
    Serial.print(t); Serial.println(" ms");
  }
}

bool tft_output(int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t* bitmap){
  if ( y >= tft.height() ) return 0;
  tft.pushImage(x, y, w, h, bitmap);
  return 1;
}

void buttonInit(){
   rButton.setReleasedHandler(released);
   lButton.setReleasedHandler(released);
}

void released(Button2& btn) {
  if(btn == rButton){
    Serial.println("right click> ");
    moveYOffset(1);
  }else{
    Serial.println("left click> "); 
    moveYOffset(-1);
  }
}

void moveYOffset(int dir){
   yPos += (dir * MOVE_FORCE);

  if(yPos >= YPOS_MAX){
    yPos = YPOS_MAX;
  }else if(yPos <= YPOS_MIN){    
    yPos = YPOS_MIN; 
  }
  
  Serial.printf("yPos : %d\n", yPos);
}

ERROR:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13160
load:0x40080400,len:3036
entry 0x400805e4
E (35) gpio: gpio_set_level(226): GPIO output gpio_num error

It either works or you got an error

It can't be both

Ya, sorry my description.
it is working.
got: E (35) gpio: gpio_set_level(226): GPIO output gpio_num error when I reset it, what this meaning?
Thanks

any idea for this please.
Thanks.

Since you're seeing the output from the early boot stages of the board, it's not even clear to me that the error is caused by your code. Do you get the same error if you upload one of the known-good examples? Does your sketch work?

It's unfortunate but not uncommon for startup code to be "generalized" to the point where it has incorrect initializations for specific boards...

Thanks.
The board and other code works well, even this Tetris game play well, but got the error when pressed reset button, and got this for any button, I linked a button on 37, and got print of:

......
E (2236) gpio: gpio_set_level(226): GPIO output gpio_num error

What "board" do you have selected?
One possibility is that you're using a pin number that "doesn't exist" on that board, causing the translation of "pin" to internal data to pick up random values...
(For instance, using pin 37 on a board like, say, "Microduino-esp32", which only thinks that there are 22 digital pins.)

Thanks.
I used TTGO T-DISPLAY and selected: TTGO LoRa32 OLE.
the pin 37 works on the board which tested in other code.

Which board EXACTLY? Post a link to it.

Where in the code you posted is Pin 37 used?

The error comes from here:
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/gpio.html#_CPPv414gpio_set_level10gpio_num_t8uint32_t

ya.
this one: Lilygo® Ttgo T-display Esp32 Development Board Wifi Bluetooth 1.14 Inch St7789v Ips Lcd Wireless Controller Module For Arduino - Circuits - AliExpress