4.29 Memory Leak on StreamLayer

273
6
04-21-2024 02:54 AM
orahlagi
New Contributor III

Hello, Our product is using StreamLayer with a vast amount of updates, that are sent through "sendMessageToClient" API.

After ±20 minutes of use, the map becomes blank, and a large amount of errors such as :

 
 

 

TypeError: Cannot read properties of undefined (reading 'memoryStats')

at get memoryStats


And: Array buffer allocation failed

 

 
are popping up. so the map gets stuck and hundreds of errors are stacked.
 
We verified that it only happens on 4.29, downgrade to 4.28 resolves this.
Pretty tough for me to reproduce this on a sandbox because of the nature of the data and update amount.
If this can be fixed before 4.30 it would be very helpful.
Thanks.
0 Kudos
6 Replies
UndralBatsukh
Esri Regular Contributor

We will take a look into this behavior. Can you please give me some specifics on how many features, what kind of updates  and update frequency? thanks

0 Kudos
orahlagi
New Contributor III

Approx 5000 features spread on 3 Stream layers

around 1000 updates a min that include movements of the features (by updating the location)

Running 4.29 on any other environment that includes a bit fewer features / movements works fine and doesn't crash. only on intensive env. 4.28 on the same env is perfectly fine.

0 Kudos
snlasystem
New Contributor III

We are experiencing the same error with version 4.29.5, will try to downgrade to 4.28.10 to see if that fixes the problem. We have multiple layers that the user can choose to toggle on and off the ones most frequently updated have roughly 15 features that get updated a few times per second at most. Others might have a few hundred features but they doesn't get updated that often. 

0 Kudos
snlasystem
New Contributor III

Downgrading to 4.28.10 fixed the problem

0 Kudos
UndralBatsukh
Esri Regular Contributor

Hi there, 

This issue is addressed at 4.30. You will be able to test the fix using our next version. Please test it out and the fix is working for you. Thanks

https://github.com/Esri/feedback-js-api-next/blob/main/CHANGELOG.md

 

0 Kudos
irshadk
New Contributor

hy , i found many great solutions from you. Iam trying to integrate a custom map to my ionic app and i given the tilelayer url while initialising like follows and it works on web. but in mobile its showing 4965.a94c2e5e3a97c8ce.js:1 [esri.layers.TileLayer] #load() Failed to load layer . DOMException: The source image could not be decoded.[esri.views.2d.layers.TileLayerView2D]  like these.                                            

 

const layer = new TileLayer({
      id: 'moi',
      title: 'خريطة وزارة الداخلية',
      url: 'here is my custom map url created with arcgis',
    });

    this.MOImap = new Map({
      basemap: new Basemap({
        id: 'MOI',
        baseLayers: [layer],
      }),
    });

    this.MOIview = new MapView({
      container: 'previewMap', // Ensure this matches the id of your map container element
      map: this.MOImap,
      zoom: 4,
      center: [this.longitude, this.latitude],
    });
 
this.MOIview.when(async () => {
      await this.addMarker(this.longitude, this.latitude);
    });
can you please help ?
0 Kudos