is there a limit to the amount of graphics you can have on a graphics layer?
I am adding graphics from sketch layer to graphics layer. graphics are made of poly lines and polygons with many points. geometry sketches from the sketch layer are cleared after adding to the graphics layer.
After making about 100 or more graphics on the graphics layer my app crashes sometimes.
Which SDK are you using? In 2.3, I experienced rare crashes when rendering many graphics. The cause was a collision between map update actions; a new render/update would occur while a previous one was still in process and the app would crash when the two tried to access the same object. I didn't save any of the messages/stack traces associated with that or I would post them for you to compare.
These crashes seemed tied to the dataChanged method of AGSLayer and I did not see them after figuring out the minimum number of calls to dataChanged that would work in my use case and adding in a short time delay between sequential calls, proportional to the number of graphics being rendered.
Which SDK are you using? In 2.3, I experienced rare crashes when rendering many graphics. The cause was a collision between map update actions; a new render/update would occur while a previous one was still in process and the app would crash when the two tried to access the same object. I didn't save any of the messages/stack traces associated with that or I would post them for you to compare.
These crashes seemed tied to the dataChanged method of AGSLayer and I did not see them after figuring out the minimum number of calls to dataChanged that would work in my use case and adding in a short time delay between sequential calls, proportional to the number of graphics being rendered.
im using 2.3.2. it is rare crashes. very hard to reproduce it too.
Yes, that sounds very much like what I was experiencing. They disappeared after I worked out the solution I explained above. I could never reproduce/locate them beyond figuring out that they occurred when -(void)dataChanged was called and then called again before the map had totally finished rendering. Can you provide a stack trace from the console for any of the crashes?