DictTable.isMap() method returning NULL


I am trying to use myMapObj.isMap() method and it returns me null.


if (!myMapObj.isMap())
throw error(Error::wrongUseOfFunction(funcname()));

Here ‘myMapObj’ is a class i have extended from SysDictTable class.

The statement above works fine when execute is CIL is unticked. As soon as i tick CIL option it starts giving an error as below :

“System.NullReferenceException: Object reference not set to an instance of an object.”

I have Compiled the AOT and generated incremental CIL.

Looking forward for your inputs regarding the same.

Thanks in advance.

It doesn’t mean that the method returns null, it means that you try to call a method without any object (a reference pointing to null). If you get the error in myMapObj.isMap(), it means that myMapObj is null.

Try to generate full CIL and debug the code in Visual Studio debugger to see what’s happening.

Hi Martin,

Thanks for your prompt reply. I have already debugged the code in Visual studio and i can see the myMapObj containing the correct reference to my object.

However i will once try to generate full CIL and check .

Well, maybe the exception is thrown by something inside isMap() - you should see that in exception’s call stack.