Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logic Server bad events
#1
I have an any value change trigger on one of my logic server fields.

Recently I have noticed that pausing and resuming *any* driver on my system will cause the logic server to spit out a bogus event which causes my event handler to throw an exception.

Code:
EvID=0AC3AC054CBE1119-D2201C721B13A66A
cqsl.header
{
   v=1
   sysid=747AB624337F73FA-2FC92546E3382BF8
   class=cqsl.fldchange
   source=cqsl.field:Logic.FZLibraryState
}
cqsl.fldval
{
   val=-2147483648
}

EvID=0AC3AC054CBE1119-D2201C721B13A76A
cqsl.header
{
   v=1
   sysid=747AB624337F73FA-2FC92546E3382BF8
   class=cqsl.fldchange
   source=cqsl.field:Logic.FZLibraryState
}
cqsl.fldval
{
   val=40
}
 The bogus event is immediately followed by a legit event, so it fixes itself, but it seems like a bug somewhere.

The FZLibraryState field is defined at an Int4, but the val that comes out -2147483648 cannot be converted to an Int4 thus throwing an exception in my event handler.
Code:
10/14 21:50:43-HARTFORD, CQCEventSrv, CQCEventWorkerThread0
{
   CIDLib, CIDLib_String.cpp.4727, Failed/Bad Parms, Error: 3263/0/0
   Could not convert '-2147483648' to binary value of type 'tCIDLib::TInt4'
     <CQCEventSrv> CQCEventSrv_ThisFacility.cpp - 2215

}
My logic configuration is as follows
1 FurnaceC.S1Z2_HeatSetpoint
2 FurnaceC.S1Z2_RoomTemp
3 FurnaceC.S1Z2_CoolSetpoint
((100.0 * ToFloat(%(2) - %(1)) / ToFloat(%(3) - %(1))))


I'm guessing the LogicServer gets pinged that all fields have changed, and then does its calculation before the fields have stable values and thus produces the bogus value somehow.

This problem seems to happen more than 50% of the time I resume a driver, but it is not 100%.

--Bob (5.3.2)
Reply
#2
I'm sure that's probably it, and why it's sometimes but not others, in that it's a timing thing so there's room to go either way. I'll take a look at it.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Editing Triggered Events Possibly Causing Kernel Panic/Crash gReatAutomation 6 167 11-08-2019, 01:10 PM
Last Post: Dean Roddey
  Possible Bug with Triggered Events gReatAutomation 3 191 09-19-2019, 02:41 PM
Last Post: gReatAutomation
  Moving the CQSL server Dean Roddey 28 1,108 09-03-2019, 05:27 AM
Last Post: Dean Roddey
  Scheduled Events - Cannot find the specified path gReatAutomation 4 184 08-16-2019, 12:21 PM
Last Post: Dean Roddey
  SubSonic Media Server API Support? gReatAutomation 4 440 06-16-2019, 02:45 PM
Last Post: gReatAutomation
  Logic Server not sending triggered events znelbok 7 771 05-08-2019, 08:13 AM
Last Post: Dean Roddey
  Files of type "Logic Server config" cannot be edited chmilar 2 514 04-06-2019, 11:53 AM
Last Post: chmilar
  why master server needs DHCP client running? lleo 4 861 01-04-2019, 01:13 PM
Last Post: Dean Roddey
  Logic Server Math kblagron 6 1,745 09-27-2018, 01:06 PM
Last Post: Dean Roddey
  Triggered Event Server not triggering EST 52 8,671 08-10-2018, 11:23 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)