Skip to content

Conversation

@eric-boyd-protolabs
Copy link
Contributor

@eric-boyd-protolabs eric-boyd-protolabs commented Oct 13, 2025

When creating new event info data and number, search for an empty event array entry rather than simply increasing the number and potentially overwriting existing info. This prevents intermittent double deletions when event blocking is disabled and many events of varying run durations occur in a short time.

Also increase the number of event entries that can be used to WEBUI_MAX_IDS which is the allocated events array size.

Note that this change can introduce a deadlock (rather than a double delete) when the number of active events is greater than the event array size due to the introduction of the lock. That could probably be handled by introducing a event entry check counter and outer loop with a wait while the counter matches WEBUI_MAX_IDS. _webui_new_event_inf would block until an open slot became available.

When creating new event info data and number, search for an empty event array entry rather than simply increasing the number and potentially overwriting existing info. This prevents intermittent double deletions when event blocking is disabled and many events of varying run durations occur in a short time.

Also, increase the number of event entries that can be used to WEBUI_MAX_IDS which is the allocated events variable size.
@eric-boyd-protolabs eric-boyd-protolabs marked this pull request as ready for review October 13, 2025 16:00
@AlbertShown AlbertShown merged commit f5f0e18 into webui-dev:main Oct 14, 2025
22 of 24 checks passed
@AlbertShown
Copy link
Member

Thank you @eric-boyd-protolabs for the fix.

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.

2 participants