gerritv / Grbl-Panel

A control panel for Grbl
MIT License
180 stars 102 forks source link

Three digit T codes causes unhandled exception #128

Closed axcodeplex closed 6 years ago

axcodeplex commented 6 years ago

T codes using numbers larger than 99 cause a program fault. Examples: T88 - result OK T300 - unhandled exception

Steps to repro: Send a three digit T code via mdi or file read.

** Exception Text ** System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at GrblPanel.GrblGui.showGrblStatus(String data) at GrblPanel.GrblIF.raiseAppSerialDataEvent(String data) at GrblPanel.GrblIF.VB$StateMachine_40__client_ComReadData.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() ----------------------------------------"

gerritv commented 6 years ago

I will add Error 38 text but Grbl will still spit back: "38","Invalid gcode ID:38","Tool number greater than max supported value."

gerritv commented 6 years ago

Fixed missing error message