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

VNC: host binary crashes on client disconnect #93

Open
nagyrobi opened this issue Apr 5, 2024 · 0 comments
Open

VNC: host binary crashes on client disconnect #93

nagyrobi opened this issue Apr 5, 2024 · 0 comments

Comments

@nagyrobi
Copy link

nagyrobi commented Apr 5, 2024

I run ESPHome in host mode like this:

#!/bin/bash
esphome compile config/_02_host_VNC_only.yaml
if [ $? -eq 0 ]; then
  echo "Compile successful, running..."
  ./config/.esphome/build/esp32-test-vnc-host/.pioenvs/esp32-test-vnc-host/program
else
  echo "Compile failed"
fi

Runs fine and I can connect with a VNC client (TightVNC client v2.8.81, Windows). When I exit the client (close client's window with X) I see the host binary of ESPHome also terminating on the server, Not consistent, but happens in 95% of the cases. When it doesn't crash, I can't connect the second time with the client anymore. I can quit the application by pressing Ctrl+C in the console. It also seems to depend on the time, eg. quitting the client after longer sessions always crash the binary, short sessions not always.

Config to reproduce:

substitutions:
  device_name: esp32-test-vnc-host
  friendly_name: "VNC test host"
  device_description: "LVGL host VNC only"

external_components:
  - source: github://clydebarrow/esphome@remote_display
    refresh: 1min
    components: [ vnc ]

esphome:
  friendly_name: "${friendly_name}"
  name: ${device_name}
  comment: "${device_description}"
  platformio_options:
    build_unflags: -Werror=all

host:
  mac_address: "xx:xx:xx:xx:xx:xx"

logger:
  level: DEBUG

api:
  reboot_timeout: 0min

button:
  - platform: restart
    name: ${friendly_name} restart
  - platform: factory_reset
    name: ${friendly_name} factory reset

binary_sensor:
  - platform: status
    name: ${friendly_name} connected


touchscreen:
  - platform: vnc
    id: vnc_touch
    display: vnc_display

sensor:
  - platform: uptime
    name: ${friendly_name} uptime
    disabled_by_default: false

display:
  - platform: vnc
    id: vnc_display
    update_interval: 1s
    auto_clear_enabled: true
    dimensions:
      width: 720 
      height: 320 
    pages:
      - id: page1
        lambda: |-
          it.fill(COLOR_ON);
          it.print(0, 10, id(my_font), COLOR_OFF, "Hello World!", COLOR_ON);

font:
  - file: "gfonts://Roboto"
    id: my_font
    bpp: 4
    size: 24
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

1 participant