Skip to content

Sporadic Error When Editing .things Files #4980

@miloit

Description

@miloit

Environment:

Affected Component: ThingRegistry / ThingManager

Context: Editing and saving .things files in OpenHAB


Observed Behavior:

Occasionally, when saving or updating .things files, the following error appears in the logs:

[ERROR] [ore.thing.internal.ThingRegistryImpl] - Could not inform the ThingTracker 'org.openhab.core.thing.internal.ThingManagerImpl' about the 'THING_UPDATED' event!
java.lang.reflect.UndeclaredThrowableException
Caused by: java.lang.InterruptedException

This error does not occur consistently, but sporadically, particularly when .things files are modified.


Steps to Reproduce (sporadic):

  1. Edit and save a .things file.

  2. Monitor logs after the save.

  3. Occasionally, the error above is logged.


Expected Behavior:

Saving a .things file should reliably propagate changes to the Thing handlers without triggering exceptions.


Potential Causes (hypotheses):

Rapid or concurrent saving of .things files.

Large or complex Thing configurations leading to longer processing times.

Thread interruptions or race conditions during Thing update propagation.


Impact:

May cause Thing updates to fail intermittently.

Could result in partially updated or inconsistent Thing states.


Suggested Next Steps:

Investigate thread handling and synchronization around Thing update propagation.

Consider adding more detailed logging around ThingRegistryImpl and ThingManagerImpl during THING_UPDATED events.

Evaluate whether InterruptedExceptions are being properly caught and handled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior of the Core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions