Menu

Adaptation crash

Help
2011-06-07
2012-09-22
  • Mattia Ferrari

    Mattia Ferrari - 2011-06-07

    Hello, I'm trying to do adapt the model hub4wsj_sc_8k following the tutorial.
    I'm using stable sphinxbase and sphinxtrain 0.7 on win 7 64.
    sphinx_fe.exe runs successfully creating the mfc files, but then bw.exe
    crashes with a windows error. The last line written in the console before the
    crash is:

    INFO: model_def_io.c(594): 4 min state/model
    

    there are no ERROR lines.

    With debug I found that the error happens in the fread function while bw is
    trying to read the mixture_weights file. The file is placed correctly and I
    checked the arguments passed to bw, too.

    Thank you for any help.

     
  • Nickolay V. Shmyrev

    When you report about crash please provide the stack trace

    Try snapshot, most likely this issue was already fixed

     
  • Mattia Ferrari

    Mattia Ferrari - 2011-06-07

    Thanks for the reply.

    I tried the snapshot, but it is the same as before.
    This is the stack trace:

    >   ntdll.dll!77588da9()    
        [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
        ntdll.dll!77588cb8()    
        msvcr100d.dll!_lock_file(_iobuf * pf)  Line 237 C
        msvcr100d.dll!fread_s(void * buffer, unsigned int bufferSize, unsigned int elementSize, unsigned int count, _iobuf * stream)  Line 105 + 0x9 bytes  C
        msvcr100d.dll!fread(void * buffer, unsigned int elementSize, unsigned int count, _iobuf * stream)  Line 303 + 0x17 bytes    C
        sphinxbase.dll!fread_retry(void * pointer, int size, int num_items, _iobuf * stream)  Line 359 + 0x1b bytes C
        bw.exe!swap_check(_iobuf * fp)  Line 77 + 0x11 bytes    C
        bw.exe!rd_bin_hdr(_iobuf * fp, unsigned int * swap)  Line 172 + 0x9 bytes   C
        bw.exe!s3open(const char * file_name, const char * mode, unsigned int * swap)  Line 262 + 0xd bytes C
        bw.exe!s3mixw_read(const char * fn, float * * * * out_mixw, unsigned int * out_n_mixw, unsigned int * out_n_feat, unsigned int * out_n_density)  Line 68 + 0x12 bytes   C
        bw.exe!mod_inv_read_mixw(model_inventory_s * minv, const model_def_s * mdef, const char * fn, float floor)  Line 345 + 0x19 bytes   C
        bw.exe!main_initialize(int argc, char * * argv, model_inventory_s * * out_inv, lexicon_s * * out_lex, model_def_s * * out_mdef, feat_s * * out_feat)  Line 324 + 0x4b bytes C
        bw.exe!main(int argc, char * * argv)  Line 1904 + 0x1d bytes    C
        bw.exe!__tmainCRTStartup()  Line 278 + 0x19 bytes   C
        bw.exe!mainCRTStartup()  Line 189   C
        kernel32.dll!769833ca()     
        ntdll.dll!77589ed2()    
        ntdll.dll!77589ea5()
    
     
  • Nickolay V. Shmyrev

    Hello

    It's interesting, looks like a bug. There are two versions of fread_retry one
    in sphinxbase and one in sphinxtrain and it looks that the wrong one was used.
    It might cause issues in 64-bit system. Are you running 64-bit?

     
  • Mattia Ferrari

    Mattia Ferrari - 2011-06-07

    Yes, windows 7 64.

     
  • Nickolay V. Shmyrev

    This bug should be fixed in trunk, please update and try again.

     
  • Mattia Ferrari

    Mattia Ferrari - 2011-06-07

    I updated, but it's still the same, same error, same stack trace.

     
  • Mattia Ferrari

    Mattia Ferrari - 2011-06-16

    Does it work for you now? Maybe I'm doing something wrong.

     
  • Nickolay V. Shmyrev

    I have no means to reproduce it since no 64bit windows here. It works in
    32-bit. Maybe you can debug this case, put a breakpoint before this function
    and check why it crashes, for example on what stage the file pointer is
    corrupted.

     
  • Mattia Ferrari

    Mattia Ferrari - 2011-06-19

    It seems that the problem was that SphinxTrain projects was configured to use
    Multi-threaded runtime library, while sphinxbase uses Multi-threaded DLL
    runtime library, so I set all SphinxTrain projects also to MT DLL and they
    don't crash anymore.

    However to have mllr_solve working I had also to change the argument "strict"
    from TRUE to FALSE in the call to cmd_ln_parse (mllr_solve/parse_cmd_ln.c,
    line 43), otherwise it fails when it checks the command line and doesn't do
    anything (I hope this is the right way to make it work).

     
  • Nickolay V. Shmyrev

    It seems that the problem was that SphinxTrain projects was configured to use
    Multi-threaded runtime library, while sphinxbase uses Multi-threaded DLL
    runtime library, so I set all SphinxTrain projects also to MT DLL and they
    don't crash anymore.

    This is a nice catch, thank you. The fix is committed in trunk

    However to have mllr_solve working I had also to change the argument
    "strict" from TRUE to FALSE in the call to cmd_ln_parse
    (mllr_solve/parse_cmd_ln.c, line 43), otherwise it fails when it checks the
    command line and doesn't do anything (I hope this is the right way to make it
    work).

    Can you elaborate on that, what exactly was the complain before the change?

     
  • Mattia Ferrari

    Mattia Ferrari - 2011-06-20

    Can you elaborate on that, what exactly was the complain before the change?

    Sorry, my mistake. The original code is ok.

     
  • Nickolay V. Shmyrev

    Great, thank you once again.

     

Log in to post a comment.