ajayagarwal1567 / earth-api-samples

Automatically exported from code.google.com/p/earth-api-samples
0 stars 0 forks source link

setTerrainExaggeration(1.5) causes constant crashes since Earth 7 update #864

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A few days ago I installed Earth 7 (7.0.1.8244 (beta)) on Windows 7 64 bit. 
This seemed to updated the Earth Browser plugin (Chrome prompted me to restart 
it so that the new plugin could be used).

Since then I've been seeing near constant crashes of the Browser Plugin:

"There was a problem with the Google Earth Plug-in. Please try reloading the 
page.
If that doesn't help, you can re-install the Google Earth Plug-in using this 
link."

Reinstalling did not help; in fact it's a brand new installation of Windows 7 
Ultimate 64 bit, not upgraded from any previous version of Earth.

I've eventually traced this to the following line in my app:

ge.getOptions().setTerrainExaggeration(1.5);

Having commented this out, the crashes go away. My app is nothing especially 
complicated, and setTerrainExaggeration is called in the initCallback.

<script type="text/javascript">
var ge;

google.load("earth", "1");

function init()
{
        google.earth.createInstance('map3d', initCallback, failureCallback);
}

function initCallback(pluginInstance)
{
        ge = pluginInstance;
        ge.getWindow().setVisibility(true);

        ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO);

        ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS, true);
        ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS, true);
        ge.getLayerRoot().enableLayerById(ge.LAYER_TERRAIN, true);
        // commented out because it causes constant crashes
        //ge.getOptions().setTerrainExaggeration(1.5);

        ge.getOptions().setScaleLegendVisibility(true);
        ge.getOptions().setStatusBarVisibility(true);

<snip>

Original issue reported on code.google.com by chrshw...@gmail.com on 4 Nov 2012 at 10:50

GoogleCodeExporter commented 9 years ago
It took me a few hours but I found the same thing.  The issue was the plugin 
would crash when zooming in.  I disabled all kinds of things and little by 
little homed in on either ge.LAYER_TERRAIN or setTerrainExaggeration.  Unclear 
whether there is dependency in enabling first, setting exageration second or 
swapping them can fix it.

This is 100% reproducible for me every time and 4 different apps.  Definately 
NOT in 6.whatever.  Definately IN 7.0.1.8244

Commented it out to and my other bizillion LOC are just fine.  

Took a while to find this bug report, but I concur.

Original comment by TheLastI...@gmail.com on 14 Dec 2012 at 3:47