From 3e429f5899fb22bf34e2aa43915df03d5aff75ac Mon Sep 17 00:00:00 2001
From: vargheseg <vargheseg@users.noreply.github.com>
Date: Wed, 8 Aug 2018 10:59:13 +0200
Subject: [PATCH] Workaround for std::logic_error in 00.08.00

Issue:
Server throws when there are no device module variables:

terminate called after throwing an instance of 'std::logic_error'
  what():  ReadAnyGroup has no element with AccessMode::wait_for_new_data.
Aborted (core dumped)

This commit introduces a workaround as proposed by jens:
  void DoocsUpdater::updateLoop(){
       if (_elementsToRead.empty()) {
           return;
       }

This commit is intended to be reverted if the above strategy has side
effects.
---
 src/DoocsUpdater.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/DoocsUpdater.cc b/src/DoocsUpdater.cc
index a574eb1..9a73ed8 100644
--- a/src/DoocsUpdater.cc
+++ b/src/DoocsUpdater.cc
@@ -27,6 +27,10 @@ namespace ChimeraTK{
   }
 
   void DoocsUpdater::updateLoop(){
+    if (_elementsToRead.empty()) {
+        return;
+    }
+
     ReadAnyGroup group(_elementsToRead.begin(), _elementsToRead.end());
     while(true){
       auto updatedElement = group.readAny();
-- 
GitLab