Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BingMapsGeocoderService crashes since Cesium 1.49 #7143

Closed
SunBlack opened this issue Oct 12, 2018 · 8 comments
Closed

BingMapsGeocoderService crashes since Cesium 1.49 #7143

SunBlack opened this issue Oct 12, 2018 · 8 comments

Comments

@SunBlack
Copy link

Since Cesium 1.45 BingMapsGeocoderService is no longer the default geocoding service. In changelog following changes are recommend in case you want still use it

Cesium.BingMapsApi.defaultKey = 'yourBingKey';
var viewer = new Cesium.Viewer('cesiumContainer', {
    imageryProvider : new Cesium.BingMapsImageryProvider({
        url : 'https://dev.virtualearth.net'
    }),
    geocoder : [
            new Cesium.CartographicGeocoderService(),
            new Cesium.BingMapsGeocoderService()
    ]
});

This works fine until Cesium 1.48. But with 1.49 & 1.50 you got following error with this if you search for a city:

An error occurred while rendering. Rendering has stopped.
RangeError: Invalid array length
RangeError: Invalid array length
at E (http://localhost:8080/resources/Cesium/Cesium.js:524:27635)
at S.createPotentiallyVisibleSet (http://localhost:8080/resources/Cesium/Cesium.js:524:30740)
at Ze (http://localhost:8080/resources/Cesium/Cesium.js:525:21759)
at Ye (http://localhost:8080/resources/Cesium/Cesium.js:525:19142)
at at (http://localhost:8080/resources/Cesium/Cesium.js:525:28346)
at st (http://localhost:8080/resources/Cesium/Cesium.js:525:28535)
at we.render (http://localhost:8080/resources/Cesium/Cesium.js:526:6664)
at A.render (http://localhost:8080/resources/Cesium/Cesium.js:532:16345)
at t (http://localhost:8080/resources/Cesium/Cesium.js:532:9795)

@OmarShehata
Copy link
Contributor

I can confirm this crash. Looks like you don't even need to change anything, it even happens in the Hello World.html. All you have to be doing is using the Build/Cesium.js. It doesn't happen in the Unminified version.

So far I've narrowed it to down updateFrustums in View.js. It seems that near, far, and numFrustums are passed in a NaN. I'm not sure why yet this would only be the case using the built version.

This also came up on the forum.

@hpinkos
Copy link
Contributor

hpinkos commented Oct 15, 2018

@lilleyse @bagnell there seems to be an influx of camera related NaN crashes. Did something change in the last two releases?

@bagnell
Copy link
Contributor

bagnell commented Oct 15, 2018

There were a few changes for the 1.49 and 1.50 releases but it was mostly reorganizing code. Nothing jumped out at me that would be causing an issue.

@hpinkos
Copy link
Contributor

hpinkos commented Oct 15, 2018

@mramato do you think this could be related to your geocoder fly to changes?

@mramato
Copy link
Contributor

mramato commented Oct 15, 2018

Yes, this has nothing directly to do with Bing, it's just getting triggered by their results. I'll open a PR as soon as I get a chance.

@mramato
Copy link
Contributor

mramato commented Oct 15, 2018

Also added next release flag so I don't forget.

mramato added a commit that referenced this issue Oct 16, 2018
Not sure what I was thinking when I wrote
`computeFlyToLocationForRectangle`, but this changes it so it always
returns a `Cartographic`. Previously it would return a Rectangle if terrain
wasn't set or didn't have `availability` which just made the calling code
confusing for no reason and lead to #7143.

`computeFlyToLocationForRectangle` is private, so this isn't a breaking
change.

Fixes #7143
@cesium-concierge
Copy link

Congratulations on closing the issue! I found these Cesium forum links in the comments above:

https://groups.google.com/d/msg/cesium-dev/y5tWLNuf--8/PcuJd-cPAgAJ

If this issue affects any of these threads, please post a comment like the following:

The issue at #7143 has just been closed and may resolve your issue. Look for the change in the next stable release of Cesium or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@hpinkos
Copy link
Contributor

hpinkos commented Oct 16, 2018

Thanks for the bug report @SunBlack! This has been fixed and will be included in the 1.51 release available November 1st.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants