필터 지우기
필터 지우기

Getting .NET IndexOutOfRangeException on compiled function.

조회 수: 1 (최근 30일)
Lukasz Szyc
Lukasz Szyc 2019년 2월 4일
편집: Lukasz Szyc 2019년 2월 4일
Hi there, we have a simple function to load a model:
function model = LoadModel(inModelPath)
modelStruct = load (inModelPath);
model = modelStruct.SVMModel;
end
We compiled it for .NET and we use it as follows:
using (LoadModel prediction = new LoadModel())
{
MWArray path = new MWCharArray(MODELPATH);
var argsOut = prediction.LoadModel(1, path);
using (MWArray model = argsOut[0])
{
Assert.NotNull(model);
}
}
The problem is that sometimes we get the following exception:
System.IndexOutOfRangeException: 'Exception of type 'System.ArgumentOutOfRangeException' was thrown. Parameter name: numArgsOut'
And sometimes we compile it again and works as expected.
Anyone can give some light here? Will be very much appreciated.
Thanks in advance.
EDIT
After further investigation we have realize that the working Dlls are 35MB and the non working are 13KB

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deploy to .NET Applications Using MWArray API에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by