AIRLegend / aitrack

6DoF Head tracking software
MIT License
1.07k stars 107 forks source link

Crash if selected camera is unplugged #53

Closed LiftPizzas closed 3 years ago

LiftPizzas commented 4 years ago

On loading, it looks for camera index "selected_camera=" from prefs.ini. If that camera doesn't exist it just exits with no message.

To Reproduce Steps to reproduce the behavior: 1- plug in two webcams. B. Run aitrack and select the second camera.

  1. Exit out to desktop.
  2. Unplug the second camera. E. Launch again, observe crash.

Expected behavior Should gracefully handle a missing camera. If the selected one is not found, do something like reset index to 0 and use a messagebox to inform user of the situation.

Environment (please complete the following information):

filiptrplan commented 3 years ago

+1 on this