Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
NW1965
Creator
Creator

Object Reference not set to an Instance of an Object

Hi Folks

I have this error coming up when I try to generate the cache for a dashboard, I have seen previous entries on here that refer to objects that use invalid dimensions and measures but I have gone through the entire list of objects in this file and still cannot get it to work.

Is there any way that I can interpret the log file message and understand the object reference that is causing the problem?

I've wasted hours trying to find this now, seem absolutely ridiculous that the log file cannot provide the object ID that is causing this problem.

Log Error.png

Thanks.

8 Replies
PrashantSangle

Regenerate metadata for that app. and then open that report.
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
NW1965
Creator
Creator
Author

I can't regenerate the metadata, the error I put on this thread is what happens when I try to regenerate the metadata!

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Maybe you have some unsupported settings or objects: Triggers, Alternate states, "Always one selected value"? 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
NW1965
Creator
Creator
Author

When you say "unsupported" objects, do you mean that you cannot create a report using a dashboard that has any triggers at all on any objects?  Or do you mean that you cannot use an object in a report that has triggers assigned to it?

There is an important distinction here, because if NPrinting cannot be run on any dashboard that contains ANY triggers then that is an insane situation, it means that every dashboard I have needs to be re-written just for NPrinting.

Where can I find documentation on Unsupported objects?

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I mean unsupported documents having those objects. 

your first source of truth is always Help.qlik.com:

https://help.qlik.com/en-US/nprinting/February2019/Content/NPrinting/GettingStarted/HowCreateConnect...

cheers

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
NW1965
Creator
Creator
Author

Thanks for that, none of those things apply so still appears to be something inside an object, would just be good to have a method to find out which object rather than having to step through each property of each object!

 

Frank_S
Support
Support

Hi @NW1965 

Please review the following article about this issue and how to work around and/or resolve it.

https://support.qlik.com/articles/000038346

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
markvanber
Contributor
Contributor

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 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.