p3p / MarlinSimUI

Marlin Simulator UI
Other
9 stars 12 forks source link

Fix several Windows issues #3

Closed sjasonsmith closed 3 years ago

sjasonsmith commented 3 years ago

Resolves several issues launching the simulator on Windows.

  1. Initialize SDL and SDLInit, allowing net_serial.listen_on_port to succeed.
  2. Listen on port prior to starting execution threads, to avoid segmentation faults in listen_on_port fails.
  3. Initialize RawSocketSerial::thread_active to false, to avoid trying to stop unstarted threads on error.

With these changes (along with several changes in Marlin) I am able to successfully launch the simulator on Windows.

sjasonsmith commented 3 years ago

Items 2 and 3 were only issues because item 1 was failing. I approached the problem by eliminating the segfaults first, and eventually worked my way back to the missing initialization calls.

sjasonsmith commented 3 years ago

I tested launching the simulator and typing manual commands in the console. I did NOT attempt to actually connect over a virtual serial port (which I assume the the purpose of this socket).