mozilla/DeepSpeech

Change Alphabet::EncodeSingle and Alphabet::DecodeSingle to use an outparam and return an error code instead of calling `abort`

Open

#3 175 ouverte le 22 juil. 2020

Voir sur GitHub
 (14 commentaires) (0 réactions) (0 assignés)C++ (4 093 forks)batch import
buggood first bughelp wanted

Métriques du dépôt

Stars
 (26 755 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

I run into the error "Invalid label 0". I assume it is from the function Alphabet::DecodeSingle() in the file native_client/alphabet.cc.

I don't know why I am running into this error and it is not important for now. What is important is the fact that the code calls abort() just after printing this error.

I don't know your guidelines. But I can tell that aborting the whole process, including the python interpreter which might be interactive, is a terrible way of handling errors, especially in such a trivial function, and I call it a bug.

Guide contributeur