Skip to content

Conversation

@greatgitsby
Copy link
Contributor

@greatgitsby greatgitsby commented Nov 20, 2025

only create PubMaster when dialog is shown, otherwise we need to block selfdriveState during a replay, causing UI to always show "openpilot unavailable"

Onboarding widget is always instantiated, and ultimately this class gets instantiated, where then PubMaster is created

@greatgitsby greatgitsby changed the title fix: openpilot unavailable fix: openpilot unavailable with replay Nov 20, 2025
@greatgitsby greatgitsby marked this pull request as ready for review November 20, 2025 06:16
@github-actions github-actions bot added the ui label Nov 20, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

raylib UI Preview

All Screenshots

@adeebshihadeh adeebshihadeh merged commit 5c10e7f into commaai:master Nov 20, 2025
17 checks passed
@greatgitsby greatgitsby deleted the fix/op-unavail branch November 20, 2025 06:22
@adeebshihadeh
Copy link
Contributor

Reverting due to:

Process ui:
Traceback (most recent call last):
  File "/usr/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/data/openpilot/openpilot/system/manager/process.py", line 36, in launcher
    mod.main()
  File "/data/openpilot/selfdrive/ui/ui.py", line 23, in main
    for should_render in gui_app.render():
  File "/data/openpilot/openpilot/system/ui/lib/application.py", line 442, in render
    if self._handle_modal_overlay():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/openpilot/openpilot/system/ui/lib/application.py", line 494, in _handle_modal_overlay
    result = self._modal_overlay.overlay.render(rl.Rectangle(0, 0, self.width, self.height))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/openpilot/openpilot/system/ui/widgets/__init__.py", line 103, in render
    ret = self._render(self._rect)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/openpilot/openpilot/selfdrive/ui/mici/layouts/onboarding.py", line 452, in _render
    self._steps[self._step].render(self._rect)
  File "/data/openpilot/openpilot/system/ui/widgets/__init__.py", line 103, in render
    ret = self._render(self._rect)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/openpilot/openpilot/system/ui/mici_setup.py", line 283, in _render
    self._continue_button.render(rl.Rectangle(
  File "/data/openpilot/openpilot/system/ui/widgets/__init__.py", line 128, in render
    self._handle_mouse_release(mouse_event.pos)
  File "/data/openpilot/openpilot/system/ui/widgets/__init__.py", line 164, in _handle_mouse_release
    self._click_callback()
  File "/data/openpilot/openpilot/selfdrive/ui/mici/layouts/onboarding.py", line 444, in _advance_step
    self._steps[self._step].show_event()
  File "/data/openpilot/openpilot/selfdrive/ui/mici/layouts/onboarding.py", line 144, in show_event
    self._dialog.show_event()
  File "/data/openpilot/openpilot/selfdrive/ui/mici/onroad/driver_camera_dialog.py", line 49, in show_event
    self._publish_alert_sound(None)
  File "/data/openpilot/openpilot/selfdrive/ui/mici/onroad/driver_camera_dialog.py", line 112, in _publish_alert_sound
    self._pm.send('selfdriveState', msg)
    ^^^^^^^^
AttributeError: 'DriverCameraSetupDialog' object has no attribute '_pm'

adeebshihadeh added a commit that referenced this pull request Nov 20, 2025
@greatgitsby
Copy link
Contributor Author

greatgitsby commented Nov 20, 2025

you can reapply after: #36640

show_event isn’t being called before first render for modals, it’s called after. bug

greatgitsby added a commit to greatgitsby/openpilot that referenced this pull request Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants