Hello Velas,
usually the error indicates an endless recursion direct in the inheritance of a class. For example, class A inherits from class B and class B itself inherits from A.
However, the error can also be produced when the class in question (here DeviceHistory::DeviceClass) contains any embedded objects descending from the own class. For example class A contains an object of class A. Then trying to initialize the object would result in endless recursion.
Can you please review once more your implementation?
If you are not able to find the cause, you can upload your project for analysis purpose.
Best regards
Paul Banach