dialogos-project / dialogos

The DialogOS dialog system.
https://www.dialogos.app
GNU General Public License v3.0
21 stars 8 forks source link

Speech recognizer ends dialog #171

Open marcalt94 opened 5 years ago

marcalt94 commented 5 years ago

Hey, We found a problem with the speech recognizer which I can't really reproduce. In irregular cases the dialog just stops when it reaches an arbitrary speech recognizer node. There is no error message, the dialog just stops as if it reached an end node. It was not only our group that had this problem. Maybe you can make something out of this issue even without a minimal example, but since I can't reproduce this error, I can't give you an example.

alexanderkoller commented 5 years ago

@timobaumann Multiple students from different teams (using different dialogues) complained about this bug today. It only happens intermittently, but frequently enough to mess up multiple demos today.

The puzzling thing is that DialogOS does not display an error message, but terminates the dialogue cleanly, as if executing an End node. I think that Graph#execute only does this if the execute method of the node returns null (as the next node at which execution should be continued). Can you think of any circumstances in which the ASR node (or probably the AbstractInputNode) could return null?

timobaumann commented 5 years ago

not really. could you imagine a situation in which a recognition node should return null? (I can't.) It won't help us to just throw a NodeExecutionException but it would be a start...

timobaumann commented 5 years ago

speech recognition can really only return null if an Edge's getTarget() returns null, which would be seriously scary. (There are 3 return statements in AbstractInputNode#recognizeExec() but they all call getTarget() on an Edge -- unless I don't understand the concept or contract of edges.

However, you guys have been copy-pasting a lot of nodes so who knows? For those documents that sometimes broke, could you check the edges in the XML file?

alexanderkoller commented 5 years ago

Yeah, that's what I thought too. It's really weird (and of course never desirable) that an ASR node returns null.

One thing we could perhaps try is to create an "instrumented" version of DialogOS that shows a popup whenever a dialog is terminated by any node which is not an End node. Then the students could help us diagnose this. I'll put something to that effect into 2.1.1.

timobaumann commented 5 years ago

the underlying cause is that Edges can be unconnected (i.e., their target field is null). I wonder when this is the case? I really don't know how DialogOS is handling edges but I'd think that they follow relatively closely the blue lines shown. Thus, (a) when there's a blue line, there's an edge, when there's no line, there's no edge. Lines are always connected to a target, so there really should be no room for edges that aren't connected. Except maybe while one is moving the line from one node to the other (but I'd expect that the old is overwritten with the new rather than with some null-node inbetween).

The code of Edge however, looks like null targets can occur (e.g. there are checks against source being null but there aren't any for target). Edges are also specified without a target in Node. Presumably, edge construction is handled differently than line-drawing, then, which will make debugging more difficult.

timobaumann commented 5 years ago

could be related to #199 : maybe use used left-recursive structures without noticing?