Package webgl cannot Scan dynamically, indicating memory is exceeded

%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20191106113957
Method of use:
AstarPath.active.Scan();
or
foreach (Progress progress in AstarPath.active.ScanAsync())
{
Debug.Log("Scanning… " + progress.description + " - " + (progress.progress *
100).ToString(“0”) + “%”);
yield return null;
}

Above two kinds of method can report error, how to solve

1 Like

Hi

Do you think you could post a screenshot of your graph settings?

  • Is that the screenshot?

image

Hi

Your graph settings, not your graphics settings.

Sorry, I may not find the panel you mentioned, could you please take a picture and show it to me? Or please tell me the specific path

With your A* object selected this is how the graph settings could look like:

1 Like

  • Sorry for not seeing your reply until now
  • I already have a picture. Please have a look

Hi

That is odd. Do you think you could try to run it as a debug build (you have it set to a release build right now) and see if you can get some more information about what is causing the crash?

I am also getting an error such as this. No matter how small I make the graph, it crashes on WebGL at the first attempted scan with a memory out of bounds exception.

edit: Also to be clear this does not come up as an issue in the Unity player. This issue only occurs running the WebGL build in a browser.

edit #2: I have commented out the lines where I call AstarPath.active.Scan(), and the error does not occur. I only get the trace shown above when a scan occurs.

I have upgraded to the newest version of the package. I still get a similar error (although it seems to my untrained eye to have a more detailed trace e.g. AddDirtyNode is now in the trace)


Hopefully this info may help you understand our problem

Hi

I managed to replicate this.
The problem was that the code relied on an exception being thrown, which is not possible when compiling with IL2CPP with exception support disabled.
The fix will be included in the next version.

Thanks for the response! Two quick questions:

  1. Can I do something in the meantime to fix this issue? Is it possible for me to enable IL2CPP exception support or something like that?
  2. I am not familiar with the typical release schedule, do you have an estimate of when the next version would be released?

Thanks again!

Hi

I just uploaded version 4.2.10 :slight_smile:

2 Likes