Menu

win32 SphinxTrain assertion failure

Help
Yuri Orlov
2011-11-16
2012-09-22
  • Yuri Orlov

    Yuri Orlov - 2011-11-16

    I have Microsoft Visual C++ Debug Librarry pop-up error message by
    running train script on the LDA phase.
    The message is:
    Debug Assertion Failed!
    Program: C:\Path-to-SphinxTrain\bin\Debug\bw.exe
    File: f:\dd\vctools\crt_bld\self_x86\crt\src\isctype.c
    Line: 56

    Expression: (unsigned)(c + 1) <= 256

    The norm.log has the next message:
    Only 0 parts of 1 of Baum Welch were successfully completed
    Parts 1 failed to run!
    I have compiled SphinxTrain on the Windows7 win32 using MC VC++ 2010 Express.

     
  • Nickolay V. Shmyrev

    When you report about problems please provide the version you are using.
    Please provide the sphinxbase version too.
    Please try to compile the latest trunk, it should work.

     
  • Yuri Orlov

    Yuri Orlov - 2011-11-17

    Sorry, I didn't provide versions.
    I have compiled SphinxTrain SVN revision 11259
    and sphinxbase SVN revision 11256
    Today I synchronized SVN SphinxTrain trunk again and see some new changes
    about viterbi.c PBS.pm mllt_train.pllda_train.pl
    I will try to compile and train again.

     
  • Yuri Orlov

    Yuri Orlov - 2011-11-17

    With the latest head version I have the same problem...

     
  • Nickolay V. Shmyrev

    Hello

    This seems to be a common problem not related to LDA or something but rather
    about strict checks in Windows.

    http://www.cplusplus.com/forum/general/13692/

    I suspect it's this line in the sources:

                    for (--s; (s >= transcription_line) && isspace((int)*s); s--);
    

    But can you please provide full stack trace for the crash so it will be clear
    where is the bug?

     
  • Yuri Orlov

    Yuri Orlov - 2011-11-18

    I am trying now to localize problem adding additional info log messages to the
    source code.
    It seems, this is realated to the dictionary file loading in lexicon.c
    (libcommon). The crache happens when
    the system tries to read dictionary line contained german-umlaut character.
    The dictionary file has UTF-8 without BOM encoding. lexicon.c uses functions
    defined in pio.c from sphinxbase, so, may be we need to fix this bug in
    sphinxbase,
    but I am not sure yet.

     
  • Yuri Orlov

    Yuri Orlov - 2011-11-18

    Ok, I have found a fix:
    we need to replace in n_words.c (libcommon)
    lines 59 and 61
    form line 59: while (str && isspace((int)(unsigned char)str)) str++;
    to line 59: while (str && isspace((int)str)) str++;
    and
    form line 61: while (!isspace((int)str) && str) str++;
    to line 61: while (!isspace((int)(unsigned char)str) && str) str++;

     
  • Yuri Orlov

    Yuri Orlov - 2011-11-22

    Hi Nikolay,
    the bug-fix described above works fine for me, why don't incude you it in the
    SphinxTrain trunk?

     
  • Nickolay V. Shmyrev

    A proper fix will require quite significant rework of the sphinxtrain code
    which I started but hasn't finished yet. Please be patient.

     
  • Yuri Orlov

    Yuri Orlov - 2011-11-22

    Oh, about line 59, I have mixed from and to, the right one:
    replace
    from line 59: while (str && isspace((int)str)) str++;
    to line 59: while (str && isspace((int)(unsigned char)str)) str++;

    The idea is to add additional type customization: (int)(unsigned char)str
    instead of: (int)
    str

     
  • Nickolay V. Shmyrev

    This issue should be fixed in trunk.

     

Log in to post a comment.