NPE occurs after X.things file is changed

Trying to get more information for another possible bug, and was playing around with the order of things in the x.things file. (Note, using 14 Jan nightly build)

One of those times, when I saved it, I saw the following in the log. Once I saw that and changed the order again, I saw this happen again. After that error message, once I saved the file again, it seemed to work normally.

23:08:49.927 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model '
jack.things’
23:08:49.941 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘ntp:ntp:demo’ cha
nged from ONLINE to UNINITIALIZED (HANDLER_MISSING_ERROR)
23:08:49.944 [INFO ] [smarthome.event.ThingRemovedEvent ] - Thing ‘ntp:ntp:dem
o’ has been removed.
23:08:49.957 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘yahooweather:weat
her:duvall’ changed from ONLINE to UNINITIALIZED (HANDLER_MISSING_ERROR)
23:08:49.960 [INFO ] [smarthome.event.ThingRemovedEvent ] - Thing ‘yahooweathe
r:weather:duvall’ has been removed.
23:08:49.969 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘astro:sun:home’ c
hanged from ONLINE to UNINITIALIZED (HANDLER_MISSING_ERROR)
23:08:49.980 [INFO ] [smarthome.event.ThingRemovedEvent ] - Thing ‘astro:sun:h
ome’ has been removed.
23:08:49.997 [ERROR] [ore.thing.internal.ThingRegistryImpl] - Could not inform t
he ThingTracker 'org.eclipse.smarthome.core.thing.internal.ThingManager@13ad5b2’
about the ‘THING_UPDATED’ event!
java.lang.NullPointerException
at org.eclipse.smarthome.core.thing.internal.ThingManager.thingUpdated(T
hingManager.java:542)[105:org.eclipse.smarthome.core.thing:0.9.0.201701140927]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTra
ckers(ThingRegistryImpl.java:227)[105:org.eclipse.smarthome.core.thing:0.9.0.201
701140927]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyLis
tenersAboutUpdatedElement(ThingRegistryImpl.java:150)[105:org.eclipse.smarthome.
core.thing:0.9.0.201701140927]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyLis
tenersAboutUpdatedElement(ThingRegistryImpl.java:1)[105:org.eclipse.smarthome.co
re.thing:0.9.0.201701140927]
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(A
bstractRegistry.java:167)[98:org.eclipse.smarthome.core:0.9.0.201701140927]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyLis
teners(AbstractProvider.java:57)[98:org.eclipse.smarthome.core:0.9.0.20170114092
7]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyLis
tenersAboutUpdatedElement(AbstractProvider.java:82)[98:org.eclipse.smarthome.cor
e:0.9.0.201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.acces
s$4(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.201
701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$21.ap
ply(GenericThingProvider.java:1044)[133:org.eclipse.smarthome.model.thing:0.9.0.
201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$21.ap
ply(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.201
701140927]
at org.eclipse.xtext.xbase.lib.IteratorExtensions.forEach(IteratorExtens
ions.java:363)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtens
ions.java:333)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.creat
eThingsFromModelForThingHandlerFactory(GenericThingProvider.java:1054)[133:org.e
clipse.smarthome.model.thing:0.9.0.201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.acces
s$1(GenericThingProvider.java:1008)[133:org.eclipse.smarthome.model.thing:0.9.0.
201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1$1.a
pply(GenericThingProvider.java:236)[133:org.eclipse.smarthome.model.thing:0.9.0.
201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1$1.a
pply(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.20
1701140927]
at org.eclipse.xtext.xbase.lib.IteratorExtensions.forEach(IteratorExtens
ions.java:363)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtens
ions.java:333)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1.app
ly(GenericThingProvider.java:239)[133:org.eclipse.smarthome.model.thing:0.9.0.20
1701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1.app
ly(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.2017
01140927]
at org.eclipse.smarthome.config.core.BundleProcessorVetoManager.applyAct
ionFor(BundleProcessorVetoManager.java:121)[94:org.eclipse.smarthome.config.core
:0.9.0.201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$6.app
ly(GenericThingProvider.java:320)[133:org.eclipse.smarthome.model.thing:0.9.0.20
1701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$6.app
ly(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.2017
01140927]
at org.eclipse.xtext.xbase.lib.IteratorExtensions.forEach(IteratorExtens
ions.java:363)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtens
ions.java:333)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.creat
eThingsFromModel(GenericThingProvider.java:323)[133:org.eclipse.smarthome.model.
thing:0.9.0.201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.model
Changed(GenericThingProvider.java:901)[133:org.eclipse.smarthome.model.thing:0.9
.0.201701140927]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyL
isteners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.
0.201701140927]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRe
freshModel(ModelRepositoryImpl.java:120)[122:org.eclipse.smarthome.model.core:0.
9.0.201701140927]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.check
File(FolderObserver.java:270)[122:org.eclipse.smarthome.model.core:0.9.0.2017011
40927]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.acces
s$1(FolderObserver.java:264)[122:org.eclipse.smarthome.model.core:0.9.0.20170114
0927]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$Watch
QueueReader.processWatchEvent(FolderObserver.java:145)[122:org.eclipse.smarthome
.model.core:0.9.0.201701140927]
at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(Abstr
actWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.201701140927]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]

This looks like a timing issue where an event occurred for an event before that Thing was done being loaded. IF it keeps happening I’d file an issue.

Usually, i have been waiting for someone like Kai to ask me to file an issue.

Are there any guidelines for when to file an issue that I can have as a touchstone?

The guidelines are to start a discussion here. If after the discussion it looks like it is a problem go and file the issue. There is guidance in the template that pops up when you create a new issue for what information and what format to use.

Fair enough… just want to make sure I follow contrib rules.

To be honest, I can make this happen pretty regularly while editing files on my system. It does involve the repro for the other bug that you looked at Rich, where I place the one thing in front of the other and the parsing seems to stop.

In those cases, I usually see this exception happen twice when saving with the ping in front, and once when I switch it back to the ping at the end.