Fixed TokenTroubleshooting for CesiumGeoJsonDocumentRasterOverlay#705
Open
gojushin wants to merge 1 commit into
Open
Fixed TokenTroubleshooting for CesiumGeoJsonDocumentRasterOverlay#705gojushin wants to merge 1 commit into
gojushin wants to merge 1 commit into
Conversation
- Fixed a `NullReferenceException` thrown when opening the Cesium ion token troubleshooting window for a `CesiumGeoJsonDocumentRasterOverlay` - Added a Unit Test to validate CesiumGeoJsonDocumentRasterOverlay.ionServer is no longer null. - Updated CHANGES.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
tldr:
Clicking "Troubleshoot Token" on a
CesiumGeoJsonDocumentRasterOverlayComponent causes aNullReferenceException, because of a missing Implementation.non-tldr:
The main root of the issue lies in a missing implementation inside the
getServerfunction ofIonTokenTroubleshootingWindowImpl.cpp.When the
CesiumIonAssetused in the window is created, this constructor is called:Consequently,
getServerreturns anullptrin the final else block because bothasset.tilesetandasset.overlayare never set.However, the constructor in
CesiumIonAsset.csspecifically sets the_geoJsonOverlayvariable (which has a public getter), which we can use here.(This follows the same pattern as
_tilesetand_overlay)So. Eventually, the issue can be fixed by adding a check for
asset.geoJsonOverlay(and adding it toConfigureReinteropEditor.cs'sExposeToCPPof course).Issue number or link
I very briefly mentioned this bug here
Author checklist
CHANGES.mdwith a short summary of my change (for user-facing changes).(However, I wasn't sure where to put it, so I just added it to the latest changes....😅)
Testing plan
In the current version of the plugin clicking "Troubleshoot Token" on a
CesiumGeoJsonDocumentRasterOverlayComponent causes aNullReferenceException.After implementing the fix, everything works as expected.