Semantic Model suddenly empty in openHAB 4.0.1 UI

I created a big semantic model in openHAB 4.0.1. Everything was ok. But since yesterday my model (in Administration → Einstellungen → Model) is empty. The UI only displays “Beginne den Startbildschirm zu gestalten…”.

The location items are still there.

“Anwendung neu laden”, restarting browser (with cleared cookies and new “Administration entsperren”), restarting openhab service and rebooting Raspberry PI doesn’t help.

Any ideas?

Are you by chance using Firefox? There have been some weird behaviors reported with Firefox and Safari that are still under investigation.

Yes, I use Firefox. I will test it with a different browser (after fixing the upgrade problems with OH4.0.2)

I downgraded to OH 4.0.1 and tried to load the sematic model in Microsoft Edge. The problem remains the same, so it seems that it’s no a browser issue.

Another hint:

  • When I activate the toogle button “Show non-semantic” then one of my first level locations is displayed without the possibility to edit something.

  • I upgraded to OH 4.0.2 (using openhabian-config) and afterwards my model was displayed correctly. But I had to downgrade to OH 4.0.1 because of another issue

This is how one of my first level locations are defined:

Does anybody has an idea how to fix my problem?

Even if I create a new location, it is not displayed.
The item exists:


but it is not displayed in the model.

I found an exeption in openhab.log which seems to be the root cause of my problem:

2023-08-17 08:53:18.947 [ERROR] [s.internal.SemanticsMetadataProvider] - bundle org.openhab.core.semantics:4.0.1 (209)[org.openhab.core.semantics.internal.SemanticsMetadataProvider(234)] : The activate method has thrown an exception
java.util.regex.PatternSyntaxException: Stack overflow during pattern compilation near index 2
[\w-]*
  ^
        at java.util.regex.Pattern.error(Pattern.java:2028) ~[?:?]
        at java.util.regex.Pattern.<init>(Pattern.java:1432) ~[?:?]
        at java.util.regex.Pattern.compile(Pattern.java:1069) ~[?:?]
        at java.util.regex.Pattern.matches(Pattern.java:1174) ~[?:?]
        at java.lang.String.matches(String.java:2840) ~[?:?]
        at org.openhab.core.common.AbstractUID.validateSegment(AbstractUID.java:100) ~[?:?]
        at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:76) ~[?:?]
        at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:59) ~[?:?]
        at org.openhab.core.items.MetadataKey.<init>(MetadataKey.java:42) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:109) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]
        at org.openhab.core.semantics.internal.SemanticsMetadataProvider.processItem(SemanticsMetadataProvider.java:131) ~[?:?]

The line “… processItem …” is repeated more than 1000 times, so it seems to be an endless recursion.

Has anyone of the programmers have an idea why this happens?

1 Like

Are you adding the Location tag manually when you create the item? That’s also a reserved semantic tag, and having both on the item is quite likely the cause the loop because Building is a sub tag of Location.

What about Chrome? I know that Safari has also been reported as a problem. I don’t know if Edge has but I suspect few OH users are using Edge.

That points to it being a problem that has already been solved. If it works in 4.0.2, clearly it’s something that takes a code fix in which case the only solution is to upgrade to 4.0.2. So you might have to choose which problem is more important to you.

Some other things that can cause the Model View to break:

  • Items that start with a numerical digit (this is not allowed)
  • Items that are members of more than one semantically tagged Group
  • circular Group membership

Good catch! I didn’t even notice that.

No. I only use “create points from thing”.

I wrote a java program which detects group recursions based on the items json file from the openhab backup of openhabian-config… And it found one. After removing the recursion and restart of openhab my model gets displayed. So my problem is solved.

Thanks a lot for the support.

Hi! I’ve been trying to understand the entire morning why my model does not update correctly when adding new things or removing existing ones. Tried switching from Firefox to Chrome after reading @rlkoshak comment and I can confirm it worked in Chrome but not in Firefox. I could see when adding an Equipment using the UI with Firefox that it appeared in the model but as soon as I saved it it disappeared. If I tried to remove an Item from the model from a .item file it was note removed from the Firefox model but it was in Chrome.

BUT I then did a classic CTRL+F5 and then all of a sudden Firefox stopped being weird and now I can’t reproduce the problem which is nice. Might be of use to someone maybe. See you!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.