Idea

Sebastián Cañas avatar image
0 Likes"
Sebastián Cañas suggested Sebastián Cañas commented

Error while using maps

I've been having the same problem while working with maps, I guess it could be a bug. When I drop a map and try to zoom in and out looking for a specific location, sometimes an error is thrown.

1630449436836.png


bug reportgis
1630449436836.png (11.0 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

2 Comments

·
Phil BoBo avatar image
0 Likes"
Phil BoBo commented

Are you using FlexSim 21.2.0?

The latest bugfix version 21.2.2 includes the following bugfix:

  • Fixed an exception in the HTTP API that was causing crashes using GIS maps.

Release Notes and History (flexsim.com)

· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sebastián Cañas avatar image Sebastián Cañas commented ·

I'm using FlexSim 21.2.2 and still I'm having problems using GIS maps. I attached a .txt where I copied some errors from the console.

GIS_error.txt

0 Likes 0 ·
gis-error.txt (14.0 KiB)
Sebastián Cañas avatar image Sebastián Cañas commented ·

I've just had again the same issue working with GIS maps. I attached a screenshot.

1630526910354.png


0 Likes 0 ·
1630526910354.png (341.0 KiB)
Phil BoBo avatar image Phil BoBo ♦♦ Sebastián Cañas commented ·

I haven't been able to duplicate the error, but I added some more error handling code to handle the situation shown in the error messages you posted. The updated code will release in FlexSim 21.2.3.

If you want to test the updated code to see if it helps right now, you can replace the following nodes' text after loading FlexSim, build all FlexScript, and then try zooming in and out to see if the error goes away.

MAIN:/project/library/GIS/GISNavigator>behaviour/callbacks/downloadTileSuccess

Http.Response response = param(1);
treenode navigator = response.navigator?;
string tileFileName = response.tileFileName?;

if (tileFileName.length > 0)
    response.saveToFile(tileFileName);

if (navigator)
    function_s(navigator, "setMapsDirty", GIS_DIRTY_TILES);

MAIN:/project/library/GIS/GISNavigator>behaviour/callbacks/downloadRouteSuccess

Http.Response response = param(1);
treenode navigator = response.navigator?;
string url = response.url?;
treenode routeNode = response.routeNode?;
treenode pathNode = response.pathNode?;

if (navigator) {
    treenode responseNode = function_s(navigator, "storeWebResponse", url, response.value);
    function_s(navigator, "applyResponseToRoute", responseNode, routeNode, pathNode);
}

The primary change is the addition of the ? in the dynamic property access, which should safely return 0 instead of throwing an exception if something caused those dynamic properties to not work correctly. The if() statements then quietly ignore the message if the properties returned 0.

0 Likes 0 ·
Sebastián Cañas avatar image Sebastián Cañas Phil BoBo ♦♦ commented ·

Thank you Phil, I wanted to attach one of the .fsm with errors but they always crashed. However I got one that create a .txt as well. I attached them.

GIS_PotentialBug.fsm_FailedNodes.txt

GIS_PotentialBug.fsm

Hope they helps!

0 Likes 0 ·
Sebastián Cañas avatar image
0 Likes"
Sebastián Cañas commented

I'm still having troubles working with maps. The majority of the errors I have happens when I manipulate latitude and longitude of the map or when I zoom in or out. The last one was this that so far is the first time.

1631144673430.png

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sebastián Cañas avatar image Sebastián Cañas commented ·

I guess the picture doesn't show the error properly so I write it here:

Exception:FlexScript exception: Invalid down cast. Object is not an instance of the target type. At VIEW:/nodefunctions/windowdocking/createdockedview

0 Likes 0 ·

Write a Comment

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.

Related Ideas