Topic: Errors since update to 3.6.0.2

Hi
Just updated to 3.6.0.2 and I have an error spamming when scrolling the map :

NullReferenceException: Object reference not set to an instance of an object
OnlineMapsTileManager+<StartDownloadTileAsync>d__30.MoveNext () (at Assets/Infinity Code/Online maps/Scripts/Tiles/OnlineMapsTileManager.cs:308)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)

Re: Errors since update to 3.6.0.2

Hello.

Thank you for bug report.
I checked all the examples scenes + a lot of my test scenes, and could not reproduce the problem.
So I am making a theoretical fix.
Replace the script in your project and please let me know if this helped or not.
If the problem remains, I will dig it deeper.

Post's attachments

Attachment icon OnlineMapsTileManager.cs 10.61 kb, 87 downloads since 2019-10-08 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Errors since update to 3.6.0.2

Hi
So far so good, the error didn't showed up smile

Another error pops when downloading tiles though
PunBB bbcode test

4 (edited by Thibault 2019-10-08 17:57:04)

Re: Errors since update to 3.6.0.2

I also have a new error spamming on offline use.

Quick explanation : i'm working on an android app for tablet, which purpose is to create tasks for drones to accomplish them. My app need to work without internet.

When using the app without internet, i can see in the logcat

PunBB bbcode test

Which makes sense since it's trying to download tiles and wifi is off. But this errors never shows up before, so i'm wondering if it's due to last update.

When re-enabling wifi, tiles download correctly, although i can see a bunch of errors (the same as my second post):

2019-10-08 12:26:10.828 18054-18077/a.humanitas.heaven E/Unity: NullReferenceException: Object reference not set to an instance of an object
      at OnlineMapsRasterTile.LoadTileFromWWW (OnlineMapsWWW www) [0x00001] in C:\Users\Thibault\Desktop\UnityProjects\Network_missionPlanner_1\Assets\Infinity Code\Online maps\Scripts\Tiles\OnlineMapsRasterTile.cs:260
      at OnlineMapsTile.LoadFromWWW (OnlineMapsWWW www) [0x00030] in C:\Users\Thibault\Desktop\UnityProjects\Network_missionPlanner_1\Assets\Infinity Code\Online maps\Scripts\Tiles\OnlineMapsTile.cs:457
      at OnlineMapsTileManager.OnTileWWWComplete (OnlineMapsWWW www) [0x0001c] in C:\Users\Thibault\Desktop\UnityProjects\Network_missionPlanner_1\Assets\Infinity Code\Online maps\Scripts\Tiles\OnlineMapsTileManager.cs:144
      at OnlineMapsWWW.Finish () [0x0000e] in C:\Users\Thibault\Desktop\UnityProjects\Network_missionPlanner_1\Assets\Infinity Code\Online maps\Scripts\Core\OnlineMapsWWW.cs:342
      at OnlineMapsWWW+<WaitResponse>d__55.MoveNext () [0x0005e] in C:\Users\Thibault\Desktop\UnityProjects\Network_missionPlanner_1\Assets


BUT i also notice that the android profiler show that memory increase until the app crashes as i'm scrolling the map zooming in & out. (app crash when it's near to 1Gb memory use). I'll try to dig more but it's a huge problem


EDIT : this is really weird, even without internet the memory consuption is increasing until it crashes, spamming the "2019-10-08 13:54:48.205 24535-24577/a.humanitas.heaven D/Unity: Curl error 6: Could not resolve host: server.arcgisonline.com" error.

Re: Errors since update to 3.6.0.2

Your exceptions look very strange, and I think the problem is on your side.

What could be wrong:
1. You partially updated the asset, leaving some scripts not updated.
2. You use OnlineMapsTileManager.OnStartDownloadTile, but do not change the status of the tile.
This causes a tile to start endlessly and memory leaks.

Maybe the problem is somewhere else, but I don’t know your application, and it’s very difficult for me to say where exactly without debugging the application.

Most likely, a memory leak is due to a problem.
I just tested Online Maps through the profiler and did not find any memory leak.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Errors since update to 3.6.0.2

I do remember that yesterday, after updating, i got an error in the TileDownloader script :

private void Start()
    {
        map = OnlineMaps.instance;

        folder = Application.persistentDataPath + "/Tiles/";
        if (OnlineMapsCache.instance != null)  OnlineMapsCache.instance.OnStartDownloadTile += OnStartDownloadTile;
        else OnlineMapsTileManager.OnStartDownloadTile += OnStartDownloadTile;
    }

Because " OnlineMapsCache.instance.OnStartDownloadTile" did not exist anymore. I switched it for :

private void Start()
    {
        map = OnlineMaps.instance;

        folder = Application.persistentDataPath + "/Tiles/";
        if (OnlineMapsCache.instance != null) OnlineMapsCache.instance.OnLoadedFromCache += OnStartDownloadTile;
        else OnlineMapsTileManager.OnStartDownloadTile += OnStartDownloadTile;
    }

Could this be the problem ?

TileDownloader script is a script you provided on the forum here :
https://forum.infinity-code.com/viewtopic.php?id=1052
And you helped me about it here :
https://forum.infinity-code.com/viewtopic.php?id=1276

Re: Errors since update to 3.6.0.2

Yes, this can be the cause of the problem.
Try this:

private void Start()
{
    map = OnlineMaps.instance;
    folder = Application.persistentDataPath + "/Tiles/";
    OnlineMapsTileManager.OnStartDownloadTile += OnStartDownloadTile;
}
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Errors since update to 3.6.0.2

Thanks for the fix ! I'm rebuilding my project with this fix right now, but i'm pretty sure it will work since i built a version without this script 10 minutes ago and had no problem with it.

Thank you so much !