Добрый день!
Загружаю файлик с правилом, все ок. Затем переименовываю файлик справилом. После этого wb-rules больше не запускатеся.
Лог ошибки:
panic: setValue -- but model not active!!!
goroutine 1 [running]:
github.com/contactless/wb-rules/wbrules.(*CellModelDeviceBase).setValue(0x11a6ae10, 0x11a1b2e8, 0x4, 0x0, 0x0, 0x1)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/cell.go:360 +0x16c
github.com/contactless/wb-rules/wbrules.(*Cell).SetValue(0x11c6b140, 0x3494f0, 0x5cbdc0)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/cell.go:510 +0x98
github.com/contactless/wb-rules/wbrules.(*CellProxy).SetValue(0x11c4ae60, 0x3494f0, 0x5cbdc0)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/engine.go:124 +0x38
github.com/contactless/wb-rules/wbrules.(*ESEngine).esWbCellObject.func3(0x2)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/esengine.go:609 +0x14c
github.com/contactless/wb-rules/wbrules.(*ESContext).DefineFunctions.func1(0x11c29738, 0xffffffff)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/escontext.go:377 +0x1c
github.com/contactless/wb-rules/vendor/github.com/contactless/go-duktape.goCall(0x1657068, 0x4)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/vendor/github.com/contactless/go-duktape/duktape.go:193 +0xac
github.com/contactless/wb-rules/vendor/github.com/contactless/go-duktape._cgoexpwrap_0c64254be242_goCall(0x1657068, 0x5)
_cgo_gotypes.go:3124 +0x1c
github.com/contactless/wb-rules/vendor/github.com/contactless/go-duktape._Cfunc_duk_pcall(0x1657068, 0x0, 0x0)
_cgo_gotypes.go:1899 +0x38
github.com/contactless/wb-rules/vendor/github.com/contactless/go-duktape.(*Context).Pcall.func1(0x1657068, 0x0, 0x169f718)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/vendor/github.com/contactless/go-duktape/api.go:673 +0x4c
github.com/contactless/wb-rules/vendor/github.com/contactless/go-duktape.(*Context).Pcall(0x11a0f7a8, 0x0, 0x11a0f7a8)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/vendor/github.com/contactless/go-duktape/api.go:673 +0x28
github.com/contactless/wb-rules/wbrules.(*ESContext).loadScriptFromStringFlags(0x11a11320, 0x11a1d380, 0x30, 0x11bc2500, 0x23a0, 0x2, 0x0, 0x0)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/escontext.go:367 +0x13c
github.com/contactless/wb-rules/wbrules.(*ESContext).LoadAndCallFunctionFromString(0x11a11320, 0x11a1d380, 0x30, 0x11bc2500, 0x23a0, 0x3a3bea, 0x1)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/escontext.go:352 +0x44
github.com/contactless/wb-rules/wbrules.(*ESContext).LoadScenario(0x11a11320, 0x11a1d380, 0x30, 0x11a1d380, 0x30)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/escontext.go:342 +0x9c
github.com/contactless/wb-rules/wbrules.(*ESEngine).loadScript(0x11aed1c0, 0x11a1d380, 0x30, 0x1, 0x358b00, 0x0, 0x0)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/esengine.go:394 +0x174
github.com/contactless/wb-rules/wbrules.(*ESEngine).LoadFile(0x11aed1c0, 0x11a1d380, 0x30, 0x30, 0x11a692a8)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/wbrules/esengine.go:344 +0x34
github.com/contactless/wb-rules/vendor/github.com/contactless/wbgo.(*DirWatcher).loadFile(0x11a72190, 0x11a1d380, 0x30, 0x11b70000, 0x1, 0x1)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/vendor/github.com/contactless/wbgo/dirwatcher.go:203 +0x158
github.com/contactless/wb-rules/vendor/github.com/contactless/wbgo.(*DirWatcher).loadDir(0x11a72190, 0xbea909e8, 0xe, 0x11a63000, 0x0, 0x0)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/vendor/github.com/contactless/wbgo/dirwatcher.go:188 +0x3e4
github.com/contactless/wb-rules/vendor/github.com/contactless/wbgo.(*DirWatcher).doLoad(0x11a72190, 0xbea909e8, 0xe, 0x1, 0x0, 0x0)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/vendor/github.com/contactless/wbgo/dirwatcher.go:214 +0x1a8
github.com/contactless/wb-rules/vendor/github.com/contactless/wbgo.(*DirWatcher).Load(0x11a72190, 0xbea909e8, 0xe, 0x0, 0x0)
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/vendor/github.com/contactless/wbgo/dirwatcher.go:248 +0x84
main.main()
/home/jenkins/wbdev/go/src/github.com/contactless/wb-rules/main.go:63 +0x4d8
Есть подозрение, что к ошибке приводит код вида:
dev["…"]["…"] = dev["…"]["…"];