pierr3 / VectorAudio

An Audio-For-VATSIM ATC Client for macOS, Linux and Windows
GNU General Public License v3.0
47 stars 11 forks source link

Crash on start if last network connection was as a pilot #50

Closed Ibot02 closed 1 year ago

Ibot02 commented 1 year ago

When starting vectoraudio after having been previously connected as a pilot, it crashes with

terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi

Based on a quick backtrace, it's crashing at https://github.com/pierr3/VectorAudio/blob/4ca0fb5cd1c750ca687ea9162883439d1539137d/src/data_file_handler.cpp#L63 My best guess is that it's due to how the slurper response changes when last connected as a pilot, but I could very well be wrong about that.

pierr3 commented 1 year ago

It's indeed an issue with the slurper at the moment which takes a bit of time to detect the switch to an ATC. Please try to wait a bit longer before logging on as ATC, or try to force the usage of the datafile! I will try to add a filter to this to prevent the error being thrown.

pierr3 commented 1 year ago

v1.2.1 includes better error handling to prevent a crash like that