From e08de8c2df3a6676afa46798849e43cc41a1d577 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Wed, 20 Jun 2018 18:09:12 -0700 Subject: [PATCH] detect Structure caching error The assert in the client side copy is hit during some kind of failure to keep the Field cache up to date. --- src/remoteClient/clientContextImpl.cpp | 2 ++ src/server/responseHandlers.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/remoteClient/clientContextImpl.cpp b/src/remoteClient/clientContextImpl.cpp index 120603b..59130f0 100644 --- a/src/remoteClient/clientContextImpl.cpp +++ b/src/remoteClient/clientContextImpl.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -105,6 +106,7 @@ public: PVStructure::shared_pointer const & pvStructure, BitSet::shared_pointer const & existingBitSet) { + assert(pvStructure); int pvStructureSize = pvStructure->getNumberFields(); if (existingBitSet.get() && static_cast(existingBitSet->size()) >= pvStructureSize) { diff --git a/src/server/responseHandlers.cpp b/src/server/responseHandlers.cpp index b6adda1..d3661b7 100644 --- a/src/server/responseHandlers.cpp +++ b/src/server/responseHandlers.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -58,6 +59,7 @@ static BitSet::shared_pointer createBitSetFor( PVStructure::shared_pointer const & pvStructure, BitSet::shared_pointer const & existingBitSet) { + assert(pvStructure); int pvStructureSize = pvStructure->getNumberFields(); if (existingBitSet.get() && static_cast(existingBitSet->size()) >= pvStructureSize) {