object reference not set to an instance of an object

1
Hello Everyone, Anybody knows how to resolve below error? Thanks, Darshan      
asked
3 answers
1

Reverting changes won’t revert the changes that were made on the disk. So probably that is still conflicting.

If it is already messed up then I would advise to download the current version of your application again and try to copy the css changes you made on to that version.

answered
0

There is very limited things we can do if the Mendix Studio pro itself is crashing.

But when does it happen for you – while creating a branch or while merging?

If its while creating a branch, maybe give it another try (sometimes things resolve on their own after a while) and if its while merging – maybe try to do it with SVN? 

 

EDIT – It could also be an issue with this version of Mendix. I’d suggest to check their release notes to see if there is such an issue and/or if its already been fixed in the higher versions.

answered
0

An Object is an instance of a Class , it is stored some where in memory. A reference is what is used to describe the pointer to the memory location where the Object resides. The message "object reference not set to an instance of an object" means that you are referring to an object the does not exist or was deleted or cleaned up. It's usually better to avoid a NullReferenceException than to handle it after it occurs. To prevent the error, objects that could be null should be tested for null before being used.

if (mClass != null)
{
  // Go ahead and use mClass
  mClass.property = ...
}
else
{
  // Attempting to use mClass here will result in NullReferenceException
}

A NullReferenceException typically reflects developer error and is thrown in the following scenarios:

  • Forgotten to instantiate a reference type.
  • Forgotten to dimension an array before initializing it.
  • Is thrown by a method that is passed null.
  • Get a null return value from a method, then call a method on the returned type.
  • Using an expression to retrieve a value and, although checking whether the value is null.
  • Enumerating the elements of an array that contains reference types, and attempt to process one of the elements.

 

answered