none
Unexpected Errors in DirectionsManager.clearAll() RRS feed

  • Question

  • Hello,

    Just and FYI.

    There appears to be unexpected fatal errors in DirectionsManager.clearAll();

    d:safari 601.1: Cannot read property 'remove' of null - TypeError: Cannot read property 'remove' of null
        at a.deactivate (https://www.bing.com/rms/DirectionsPluginBundle/cj,nj/8e229785/2b87d6d0.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*DirectionsTask.en*DirectionsPluginStart*DirectionsMainPanel*DirectionsMainPanelSerp*TitlePrint*InstructionsPrint*DirectionsPrint*DirectionsResultsPanel*DirectionsResultsPanelSerp*DragToolTip*RouteLabel*DirectionsInputData*DirectionsPrintDataSource*DirectionsTask*DirectionsCategoriesBarEntities*InstrumentationHelper*PerfHelper*PrintParametersHelper*RouteResultsDataModel*FormattedTextProvider*DefaultDirectionsFormattedTextProvider*WalkingDirectionsFormattedTextProvider*TransitDirectionsFormattedTextProvider*DirectionsPanelViewModel*MobileDirectionsPanelViewModel*DirectionsResultsTitleViewModel*DragTipOverlayViewModel*DirectionsResultsListViewModel*WaypointViewModel*DirectionsResultsSetViewModel*MobileDirectionsResultsSetViewModel*InstructionViewModel*LabelOverlayViewModel*DirectionsPolyline*DirectionsPushpin*DirectionsTemplateSelector*DragTipOverlay*LabelOverlay*RouteMapEntities*RouteMapEntitiesCollection*ModeData*DirectionsPluginEnd*AnonymousEnd:1:91394)
        at n.clearAll (https://www.bing.com/rms/DirectionsSDKPlugin/cj,nj/81479023/023436ff.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*DirectionsSDKPluginStart*SDKWaypoint*DirectionsEventArgs*DirectionsOptions*Route*DirectionsSDKTemplate*DirectionsSDKPushpin*DirectionsSDKPolyline*DirectionsManager*DirectionsSDKPluginEnd*AnonymousEnd:1:17812)
        at sch_dir_bing_continue (http://localhost/rideschedulesv12/schedulemob12.js:3040:25)
        at c (https://www.bing.com/rms/SDKPlugin/cj,nj/a8483a04/4d1324b4.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*SDKPluginStart*SDKInfoboxOverlay*Infobox*SDKColor*TileSource*TileLayer*Module*Layer*EntityCollection*Events*SDKPrimitiveTemplateSelector*UserMouseEventArgs*PixelReference*Pushpin*SDKPolygon*SDKPolyline*TestDataGenerator*CustomOverlay*GroundOverlay*AnimatedTileLayer*MapsTilePrimer*SDKMap*PointCompression*SDKPluginEnd*AnonymousEnd:1:17619)
        at Object.n.loadModule (https://www.bing.com/rms/SDKPlugin/cj,nj/a8483a04/4d1324b4.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*SDKPluginStart*SDKInfoboxOverlay*Infobox*SDKColor*TileSource*TileLayer*Module*Layer*EntityCollection*Events*SDKPrimitiveTemplateSelector*UserMouseEventArgs*PixelReference*Pushpin*SDKPolygon*SDKPolyline*TestDataGenerator*CustomOverlay*GroundOverlay*AnimatedTileLaye

    Wednesday, August 23, 2017 1:13 AM

Answers

  • I've done a ton of testing around this on the experimental branch and still can't reproduce this issue. Try adding a break point in your code and inspect this object to ensure it is the directions manager. If you can provide a simple code sample that reproduces the issue, it would make debugging this much easier.

    [Blog] [twitter] [LinkedIn]

    Wednesday, August 23, 2017 4:06 PM

All replies

  • Can you provide a lot more details? Which branch are you using experimental, release, frozen? Can you provide a code block that reproduces your error. I've just tested this function in the main release branch and it is working fine. 

    [Blog] [twitter] [LinkedIn]

    Wednesday, August 23, 2017 1:27 AM
  • The branch is experimental.

    Just a standard directions request deleting everything for the next request.

    if(sch_dir_bing_manager){
    sch_dir_bing_manager.clearAll();
    sch_dir_bing_manager.clearDisplay();
    }

    As a work around, I added:

    if(sch_dir_bing_manager){
    try{
    sch_dir_bing_manager.clearAll();
    sch_dir_bing_manager.clearDisplay();
    }catch(e){}
    }

    I'll revert back to the release branch and post back if I notice the cause isolated.

    Wednesday, August 23, 2017 11:07 AM
  • I've done a ton of testing around this on the experimental branch and still can't reproduce this issue. Try adding a break point in your code and inspect this object to ensure it is the directions manager. If you can provide a simple code sample that reproduces the issue, it would make debugging this much easier.

    [Blog] [twitter] [LinkedIn]

    Wednesday, August 23, 2017 4:06 PM