kaldi in visual studio 2017 Release x64 report error?Debug Assertion Failed! Expression: _osfile(fh) & FOPEN. But in the Debug x64 is normal.

380 views
Skip to first unread message

Anjos

unread,
Sep 3, 2019, 12:40:00 AM9/3/19
to kaldi-help


I find this bug is:

bool binary;
kaldi::Input ki(this->model_path_, &binary);
trans_model->Read(ki.Stream(), binary);
am_nnet->Read(ki.Stream(), binary);
kaldi::nnet3::SetBatchnormTestMode(true, &(am_nnet->GetNnet()));
kaldi::nnet3::SetDropoutTestMode(true, &(am_nnet->GetNnet()));
kaldi::nnet3::CollapseModel(kaldi::nnet3::CollapseModelConfig(), &(am_nnet->GetNnet()));


this red code report this prolbem?

I have been looking for this problem for a long time.

But in the Debug x64 is normal.


---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Debug Assertion Failed!

Program: ...njos\vs\kaldi\kaldi-project\x64\Release\kaldi-online2-jni.exe
File: minkernel\crts\ucrt\src\appcrt\lowio\read.cpp
Line: 381

Expression: _osfile(fh) & FOPEN

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)

---------------------------
Stop(A)   Retry (R)   Ignore(I)   
---------------------------

Daniel Povey

unread,
Sep 3, 2019, 12:43:52 AM9/3/19
to kaldi-help
You'd have to get it in a debugger and find more info, e.g. what is the value of this->model_path_?
and what is the backtrace?
Possibly some system library was built with debug, and the error came from there


--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/50db07c7-32ee-48a3-a822-ecec07428c15%40googlegroups.com.

Anjos

unread,
Sep 3, 2019, 1:16:29 AM9/3/19
to kaldi-help
Hi, Dan, 

this->model_path_="D:\\vs\\kaldi\\s5aishell8k\\exp\\chain\\tdnn_1a_sp\\final.mdl";

and in the Debug X64 env of visual studio. it is can run successfully.

but in the Release X64, in the 

Input::Input(const std::string &rxfilename, bool *binary): impl_(NULL) {
  if (!Open(rxfilename, binary)) {
    KALDI_ERR << "Error opening input stream "
              << PrintableRxfilename(rxfilename);
  }
}


when the return in this red code. it throw this error.

在 2019年9月3日星期二 UTC+8下午12:43:52,Dan Povey写道:
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi...@googlegroups.com.

Daniel Povey

unread,
Sep 3, 2019, 1:19:25 AM9/3/19
to kaldi-help
Please read this
and see if you can locate the problem in one of the generated Visual Studio project files.

To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/74e4b15d-c9dc-4f0e-9b26-2bd3c9a50cc6%40googlegroups.com.

Anjos

unread,
Sep 3, 2019, 1:42:01 AM9/3/19
to kaldi-help
I so sad, I find the online2-wav-nnet3-latgen-faster and my kaldi-online2 is /MD in release x64.

I is working on the probleam.

在 2019年9月3日星期二 UTC+8下午1:19:25,Dan Povey写道:

Anjos

unread,
Sep 3, 2019, 1:57:18 AM9/3/19
to kaldi-help


在 2019年9月3日星期二 UTC+8下午1:19:25,Dan Povey写道:
Please read this

Anjos

unread,
Sep 5, 2019, 9:40:11 PM9/5/19
to kaldi-help
Hi, Dan, I have solved it and found that the problem is kaldiwin.props.

kaldiwin.props in release env have a debug AdditionalLibraryDirectories(PORTAUDIOLIB).


在 2019年9月3日星期二 UTC+8下午1:19:25,Dan Povey写道:
Please read this

Jan Trmal

unread,
Sep 6, 2019, 6:30:04 AM9/6/19
to kaldi...@googlegroups.com
Will you be able to create a PR?
Y.

To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/e3cd36bb-c6b1-424c-9f04-71ccd4128f81%40googlegroups.com.

Anjos

unread,
May 30, 2020, 1:49:01 AM5/30/20
to kaldi-help
sorry, I missed the news, and This latest version should have been PR by someone, about kaldiwin.props in release env have a debug AdditionalLibraryDirectories(PORTAUDIOLIB).. 

and In the future, if I encounter or solve related problems, I will submit a PR.


Reply all
Reply to author
Forward
0 new messages