Zum Hauptinhalt gehen

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

Kommentare

6 Kommentare

  • Nico Burgerhart

    This error means an variable pointing to an object is empty
    I see a RefreshFeaturesInOverlays method, it seems the issue is in the data.

    1
  • Zack Robison

    Use the developer console with the Workflow debugger, and like Nico said you have an null input.  It will probably be the last activity logged, depending of course on the structure of your WF.

    0
  • Aaron Wong

    Hi Nico and Zack,

    Thank you for the suggestions. I am aware that it's pointed to a null input but I am scratching my head trying to find which one is the null input. 

    I'm using the debug log level on mobile, and the message above is the most detailed debug info I can retrieve..

    Thanks,

    Aaron 

    0
  • Zack Robison

    If you've gotten into the logger then you're almost there!

    What Nico and I are saying is that you need to check the inputs to the last activity which ran to look for nulls, not the stack trace of the error.  Watch the tech tip video "How to debug workflows in Geocortex Mobile" which happens to do precisely that

    In the video, the input argument to the activity is itself null, but you could have a null property of an object which exists.  A totally random example off the top of my head for something that might cause such an error would be trying to highlight a FeatureSet which results from a query without geometries, in which case you might need to update the Query activity to return those geometries..

    0
  • Aaron Wong

    Hi Zack,

    The link links to the ESRI partner awards page. But does the error show up from the last activity ran?

    The workflow goes update features then if the update succeeded, an alert will fire saying update successful and that's the end of the workflow. The Null reference error shows up after the alert was fired. 

    Thanks,

    Aaron

    0
  • Zack Robison

    Oh no, grabbed the wrong link!  Here it is: https://vertigisstudio.com/how-to-debug-workflows-in-geocortex-mobile-geocortex-tech-tip/

    If the error comes from the app itself, and not Workflow, then you might be barking up the wrong tree here.  In that case, you might just check that your uploaded features include all necessary fields (including and particularly geometry) but if they look all good then this may be an issue with either how you're calling the WF or a bug in the Mobile app itself.  In either of those cases, I'd recommend opening a Support ticket but you can dig around in the Mobile SDK yourself to see what the RefreshFeaturesInOverlays function requires which might not be getting met in your case.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.