ASCOMInitiative / ASCOMRemote

The ASCOM REST based Remote Driver Server and Remote Access Clients
GNU General Public License v3.0
57 stars 15 forks source link

Remote Server crashes with missing Axis parameter for GET axisrates #20

Closed synfinatic closed 2 years ago

synfinatic commented 3 years ago

Alpaca Remove Server v1.6.7500.21910 crashes:

curl -X GET "http://172.16.1.115:11111/api/v1/telescope/0/axisrates?ClientID=1&ClientTransactionID=1234" -H "accept: application/json"

Notice the missing required Axis field in the request.

Backtrace:

10:44:01.478 Main                      Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at ASCOM.Remote.ServerForm.ReturnAxisRates(RequestData requestData) in J:\ASCOMRemote\Remote Server\ServerForm.cs:line 5422
   at ASCOM.Remote.ServerForm.ProcessDriverCommand(RequestData requestData) in J:\ASCOMRemote\Remote Server\ServerForm.cs:line 2696
   at ASCOM.Remote.DriverHostForm.ProcessCommand(Object requestData) in J:\ASCOMRemote\Remote Server\DriverHostForm.cs:line 97
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)
Peter-Simpson commented 2 years ago

Closing the issue because it was addressed in commit a290283d3754194352f5bc804314f1eba2a04ec8.