Openhab Designer (Eclipse) hangs while editing rules

Hi All

I’ve been using OpenHAB for a few years now. More lately I’ve polished my system to the point where lights, air conditioning, alarm system, garage door, etc are automated and fed with a host of sensors all around the house. It’s quite a complex setup between different vendors and my own home-cooked things.

For the last year or so, as my rules became more complex, the Designer app started hanging regularly when editing said rules. Currently these hangs last about 20-30 seconds. After doing some googling I tried numerous things such as editing the memory allocation to eclipse, using more rule files, etc, but none worked for me.

However, I eventually realised that if I interact with OpenHAB designer solely with the keyboard (also not using PgUp/PgDn) the designer does not freeze! Only when I use the mouse and click between sections of the rule file, or copy/paste with the mouse will it hang. When I copy/paste using the keyboard only it works flawlessly. Has anyone else experienced this? any suggestions perhaps?

I’ve experienced this with OpenHAB Designer 1.6.2 and 1.7.1

thanks

regards,
Tertius

Hi Tertius

Yes, I’ve had a similar experience but for me the designer hung for several minutes before I used the Taskmanager to kill it. This has made things very bad, especially because I use it mostly to find syntay errors in my rules and normally use an external editor.

What helped in my case is to put the rule coding into scripts (where possible) and do only the callScript function within the rules. It seems that this works a little bit better, at least now I can use the designer again.

Regards
Dieter

Thanks for the info Dieter

For interest sake, is it also smooth sailing for you when only using the keyboard? If so, it might point to a bug in the OH Designer’s code…?

same here.
Especially under windows, designer is hardly working.
If you are using small rules files then one can somewhat mitigate the effect.

Under Mac OS designer can cope with bigger files and up to a certain point it is working better but also here I had to split my files.
I will check whether the “no mouse” operation will help.

Same here, too, uses version 1.8.0. Very frustrating. Have equivalent to 4 pages of rules. The designer freeze for about 10-15 seconds every time I have done some small changes. I do not see this when I edit the sitemap or item files.

Hard to say. At first I’ve splitted the rules to use the designer again (so currently no large rules available). The second, more relevant, reason is that I wasn’t even able to open the rule in the editor. And I don’t now how it is possible to open a file without the mouse…

Same issue here with the openHAB designer, which I’ve experienced since I started with OpenHAB on v1.5. I’m currently running OH Designer v1.8, Ubuntu x64 14.04, and Sun JDK v1.7. Small changes to my ever growing rules make the app choke for some time with DEBUG messages like this:

17:12:40.616 [Worker-3] DEBUG o.e.x.c.t.u.L.Primary - Initialized argument context for request XbaseTypeProvider.getFeatureCallTypeArgContext [expr=postUpdate(,)]
17:12:40.616 [Worker-3] DEBUG o.e.x.c.t.u.L.Primary - getLowerBound(JvmParameterizedTypeReference: org.openhab.core.types.State)
17:12:40.616 [Worker-3] DEBUG o.e.x.c.t.u.L.Primary - getLowerBound.result = JvmParameterizedTypeReference: org.openhab.core.types.State
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - cache: JvmParameterizedTypeReference: org.openhab.core.types.State
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - cache hit: false for: org.eclipse.xtext.xbase.impl.XConstructorCallImplCustom@15cbfa67 (invalidFeatureIssueCode: null, validFeature: false)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - result: JvmParameterizedTypeReference: org.openhab.core.types.State getExpectedType(parameterized) : org.eclipse.xtext.xbase.impl.XConstructorCallImplCustom@15cbfa67 (invalidFeatureIssueCode: null, validFeature: false)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - getType(parameterized) : org.eclipse.xtext.xbase.validation.XbaseJavaValidator.validateType(XbaseJavaValidator.java:379)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - getType: Pair(org.eclipse.xtext.xbase.impl.XConstructorCallImplCustom@15cbfa67 (invalidFeatureIssueCode: null, validFeature: false), null)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - getTypeForIdentifiable: org.eclipse.xtext.common.types.impl.JvmConstructorImplCustom@6e593278 (visibility: PUBLIC, simpleName: DateTimeType, identifier: org.openhab.core.library.types.DateTimeType.DateTimeType()) (varArgs: false)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - cache hit: false for: org.eclipse.xtext.common.types.impl.JvmConstructorImplCustom@6e593278 (visibility: PUBLIC, simpleName: DateTimeType, identifier: org.openhab.core.library.types.DateTimeType.DateTimeType()) (varArgs: false)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - result: JvmParameterizedTypeReference: org.openhab.core.library.types.DateTimeType getTypeForIdentifiable(parameterized) : org.eclipse.xtext.common.types.impl.JvmConstructorImplCustom@6e593278 (visibility: PUBLIC, simpleName: DateTimeType, identifier: org.openhab.core.library.types.DateTimeType.DateTimeType()) (varArgs: false)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - cache skip: JvmParameterizedTypeReference: org.openhab.core.library.types.DateTimeType
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - cache hit: false for: Pair(org.eclipse.xtext.xbase.impl.XConstructorCallImplCustom@15cbfa67 (invalidFeatureIssueCode: null, validFeature: false), null)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - result: JvmParameterizedTypeReference: org.openhab.core.library.types.DateTimeType getType(parameterized) : Pair(org.eclipse.xtext.xbase.impl.XConstructorCallImplCustom@15cbfa67 (invalidFeatureIssueCode: null, validFeature: false), null)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - getExpectedType(parameterized) : org.eclipse.xtext.xbase.validation.XbaseJavaValidator.validateType(XbaseJavaValidator.java:376)
17:12:40.625 [Worker-3] DEBUG o.e.x.x.typing.AbstractTypeProvider - getExpectedType: HVAC_DataCenter_Temp_LastUpdate

These messages repeat many times, apparently for each item used in the rules. I read somewhere that it might be related to libsoup, but not sure…

Any ideas?

Great observation! At least an immediate workaround is to not use the mouse in OpenHAB Designer…

No solution to this problem?

Not yet it appears, and I must add that it’s gotten a lot worse for me. Any accidental mouse action and I can go make coffee. For an end user this badly effects the OH experience.