ostis-ai/sc-machine

Server crashing by search_template request

Opened this issue · 1 comments

Describe the bug
Sending a request for searching template cause segmentation fault, when identifier of the keynode is send in payload

To Reproduce
example of request:
{"id": 4, "type": "search_template", "payload": {"templ": {"type": "idtf", "value": "question"}, "params": {}}}

Expected behavior
question isn't template, so maybe error should be returned. Can we check identifier, is it template or not?

Screenshots
image
Server side just drops Segmentation fault (core dumped).

Desktop (please complete the following information):

  • Version 0.7.0

This is a problem of assertions in memory iterators using in template search. So to fix this bug firstly it is needed to change assertions by throw operations. Assertions is definitely may be checked only in debug mode, at this time in release mode checks are not