-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
window10下使用vs2019调用OnnxRuntime.dll时出错! #195
Comments
// 1. session |
windows下的使用可以参考以下这几个讨论:
另外,我看到你这用的是win32和system32,目前lite.ai.toolkit没有考虑32位的系统。还有就是在windows下编译完之后,需要手动把依赖库都拷贝到build/lite.ai.toolkit/lib和build/lite.ai.toolkit/bin,并且检查修改下模型文件的路径,比如说路径的反斜杠之类的。 |
@DefTruth Win32 和 System32 不代表系统是 32 位的,从指针长度能明显看出是 64 位的。 |
@ysc3839 给windows大佬点赞 |
@wwwsctvcom 请问您是如何解决的?我在win下也遇到了这个问题 |
你解决了吗 |
你解决了吗 |
请问这个有解决办法吗,我也遇到了这个问题 |
请问解决了吗 |
我也遇到了 |
请问是怎么解决的呀,网上查不到资料~ |
@wwwsctvcom @ysc3839 @Jouiry @SHX9610 ,请问一下有大佬解决了这个问题吗?我也遇到了这个问题,好像想编译x86下的项目就会有这个异常。 |
目前还是没有成功,我出这个问题是我想更新ort的版本,这个项目最高只有1.10的版本,在高就出错,后面我就换了新的写法,智能指针也没用,项目要改 |
我的问题是这样的:我以为model.onnx模型应该是和输出的exe文件在一个目录下的,所以把这个模型文件放到了Release目录下,然后就会报上面那个错误。我把model.onnx放到和main.cpp一样的根目录下就没有这个问题了,可以正常运行。或者改成其他对应的相对路径和绝对路径都是好的。 |
报错信息1
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'D:\clion_workspace\lite.ai.toolkit-main\build\lite.ai.toolkit\bin\lite_yolox_v0.1.1.exe'. Symbols loaded.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Program Files\CyberArk\Endpoint Privilege Manager\Agent\x64\vf_inj.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\userenv.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\lite.ai.toolkit.dll'. Symbols loaded.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\opencv_imgcodecs453d.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\opencv_core453d.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\onnxruntime.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\opencv_videoio453d.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\opencv_imgproc453d.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\concrt140d.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'.
'lite_yolox_v0.1.1.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'.
The thread 0x63c has exited with code 0 (0x0).
Exception thrown at 0x00007FFD51279129 in lite_yolox_v0.1.1.exe: Microsoft C++ exception: Ort::Exception at memory location 0x0000000FE92FF3D0.
Unhandled exception at 0x00007FFD51279129 in lite_yolox_v0.1.1.exe: Microsoft C++ exception: Ort::Exception at memory location 0x0000000FE92FF3D0.
Unhandled exception at 0x00007FFD51279129 in lite_yolox_v0.1.1.exe: Microsoft C++ exception: Ort::Exception at memory location 0x0000000E98CFF5A0.
出错位置:
// 1. session
ort_session = new Ort::Session(ort_env, onnx_path, session_options);
inline void ThrowOnError(const OrtApi& ort, OrtStatus* status) {
if (status) {
std::string error_message = ort.GetErrorMessage(status);
OrtErrorCode error_code = ort.GetErrorCode(status);
ort.ReleaseStatus(status);
ORT_CXX_API_THROW(std::move(error_message), error_code); 出错在这行
}
}
The text was updated successfully, but these errors were encountered: