Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DMPS InputChange event handler #1137

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrew-welker
Copy link
Contributor

close #1136

In some configurations, the InputChange handler can throw a null reference exception due to a Feedback for
the input that triggered the event not existing. The event handler now checks for the existence of a Feedback for the input that triggered the event prior to attempting to call the FireUpdate method. Addresses #1136

In some configurations, the InputChange handler can throw
a null reference exception due to a Feedback for
the input that triggered the event not existing. The
event handler now checks for the existence of a Feedback
for the input that triggered the event prior to attempting
to call the `FireUpdate` method. Addresses #1136
@cdenig
Copy link

cdenig commented Sep 25, 2023

Unfortunately, the error persisted after this update.

[17:07:49.254]App 1:****PreActivation starting...****
[17:07:49.308]App 1:****PreActivation complete****
[17:07:49.309]App 1:****Activation starting...****
Update request from Slot-11 in Program 01 
[17:07:49.630]App 1:[dm-rx-1] Activating
Program Initialized:01 
[17:07:50.470]App 1:DMSwitch Input Change:DMPS3-4K-300-C Input:7 Event:7
Exception: System.NullReferenceException: NullReferenceException
   at PepperDash.Essentials.DM.DmpsRoutingController.Dmps_DMInputChange(Switch device, DMInputEventArgs args)
   at Crestron.SimplSharpPro.DM.Switch.OnDMInputChangeNoSwitch(DMInputEventArgs paramArgs)
   at Crestron.SimplSharpPro.DM.DMInputOutputBase.EventHandlerFromDictionary(CrestronDevice currentDevice, SigEventArgs args, Switch lswPassedIn, EventDictionary`1 MappingDictionary, String HandlerType)
   at Crestron.SimplSharpPro.DM.Cards.Card.Dmps3DmInput.DmpsDmInput_SigChange(CrestronDevice currentDevice, SigEventArgs args)
   at Crestron.SimplSharpPro.CrestronDeviceWithEvents.SendJoinEventData(SigEventArgs args)
   at Crestron.SimplSharpPro.SigCollectionBase`1.d(BoolOutputSig A_0, eSigEvent A_1)
   at Crestron.SimplSharpPro.SigCollectionBase`1.NotifyOfSigsNewValue(BoolOutputSig paramSig, eSigEvent paramSigEvent, Boolean paramSigWasAdded)
   at Crestron.SimplSharpPro.DeviceBooleanOutputCollection.UpdateValueWithOutIncrementWithEvent(UInt32 index, Boolean newValue)
   at Crestron.SimplSharpPro.DeviceBooleanOutputCollection.UpdateValueWithEvent(UInt32 index, Boolean newValue)
   at Crestron.SimplSharpProInternal.DeviceBasis.ReadDigitalPacket(ePacketType incomingPacketType, UInt32 joinNumber, Boolean joinValue)
   at Crestron.SimplSharpProInternal.CrestronDevice.HandleIncomingBufferForSpecificDevice(CParsedPacketData IncomingDataStructure)
   at Crestron.SimplSharpProInternal.CrestronSlotDevice.HandleIncomingDataForSlotDevice(CParsedPacketData IncomingDataStructure)
   at Crestron.SimplSharpProInternal.CrestronSlotDevice.ParseDataFromStructure(Byte* pIncomingDataBuffer, UInt32 tldmToAppDeviceOrSlotId)
   at Crestron.SimplSharpProInternal.CrestronDevice.CallbackRoutineForSpecificDevice()

.[17:07:51.380]App 1:****Activation complete****
[17:07:51.381]App 1:****PostActivation starting...****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]- v1.15.2 - DMPS3-4k-300-C reports DM Input7 NullRefException on startup
2 participants