MXPredCreate does not initialise

I have buiild the mxnet library with C++ API with visual studion 2019 and cuda dependencies.
I running a unit test in Visual Studio and when the program tries to initialise the MXPredCreate I am getiing the following error
System.AccessViolationException: ‘Attempted to read or write protected memory. This is often an indication that other memory is corrupt.’ and then this triggers the following in VS ntdll.pdb not loaded. I am running the project in Debug mode.
Could you please let me know if there there is a fix on these. I am using the c_predict_api.h
Many thanks