1) Give a description of the problem
Found a bug in Webcore and trying to see if others have run into this issue.
This code I boiled down to the bare minimum to reproduce it, ignore the functionality.
2) What is the expected behaviour?
I have a dynamic array that stores a device or a list of devices. I dont expect system to crash.
3) What is happening/not happening?
If I select an element of the dynamic list that contains a multiple device reference, system crashes with :
+324ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
To simulate it, set x to 2, no crash, set x to 3 it crashes.
**4) Post a Green Snapshot of the piston!
5) Attach logs after turning logging level to Full
7/13/2020, 8:53:39 AM +959ms
+0ms ╔Received event [Elmwood].test = 1594655619958 with a delay of 0ms
+77ms ║RunTime Analysis CS > 20ms > PS > 39ms > PE > 18ms > CE
+79ms ║Runtime (40153 bytes) successfully initialized in 39ms (v0.3.10a.20190223) (78ms)
+80ms ║╔Execution stage started
+85ms ║║Cancelling statement #11’s schedules…
+90ms ║║Executed virtual command setVariable (3ms)
+293ms ║║Executed virtual command setVariable (3ms)
+299ms ║║Calculating (device) [:3233b9fdc188d3a0a0c98e0b8fe2bd87:] , (device) [:e352e8c19b6ea671498116e81e6914e5:] >> (device) [:3233b9fdc188d3a0a0c98e0b8fe2bd87:, :e352e8c19b6ea671498116e81e6914e5:]
+302ms ║║Calculating (device) [:3233b9fdc188d3a0a0c98e0b8fe2bd87:, :e352e8c19b6ea671498116e81e6914e5:] , (device) [:e6362a8dc1c6c6548e5bd2068a7778fc:] >> (device) [:3233b9fdc188d3a0a0c98e0b8fe2bd87:, :e352e8c19b6ea671498116e81e6914e5:, :e6362a8dc1c6c6548e5bd2068a7778fc:]
+327ms ║║Executed virtual command setVariable (3ms)
+335ms ║║Executed virtual command setVariable (4ms)
+338ms ║║Evaluating switch with values [[i:16:null:0, v:[t:string, v:2, vt:string]]]
+342ms ║║Comparison (string) 2 is (integer) 1 = false (1ms)
+345ms ║║Comparison (string) 2 is (integer) 2 = true (2ms)
+347ms ║║Cancelling statement #19’s schedules…
+361ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+363ms ║╚Execution stage complete. (283ms)
+429ms ╚Event processed successfully (429ms)
7/13/2020, 8:48:22 AM +828ms
+1ms ╔Starting piston… (v0.3.10a.20190223)
+347ms ║╔Subscribing to devices…
+511ms ║╚Finished subscribing (172ms)
+718ms ╚Piston successfully started (718ms)
7/13/2020, 8:47:01 AM +489ms