debugging

@torbenratzlaff, The reason for the heavy calculation is because of the game mechanics. 

My game is a city-builder. Each building has an area of affect on it’s neighbours to a greater or smaller degree depending on what building it is and what property is being radiated.  For example a park will provide a positive bonus between 3 and 8 tiles radius depending on it’s upgrade level.

Other things like if a user removes a road from a power station then that will stop it functioning and that could have an effect on hundreds of buildings.  As the affected tiles no longer have power then they won’t generate pollution or happiness and that then has to ripple out to it’s neighbours, etc.  Also I need to aggregate lots of values over the entire city and that requires accessing every element in the array to perform in real time.

It actually is quicker to recalculate everything then try and build a binary tree of all the “tile 1 has affected tile 2 has affected tile 3”, etc.

At the end of every recalculation it then saves a compressed and encrypted game state to disk (and every so often to the cloud) - this is done over many frames too.

@Rob - that’s an idea I will look into low memory event.  I can’t use the strip debug setting on release builds unfortunately - only with a debug keystore.

The whole idea behind that key is to keep the debug symbols in a release lap. If you’re using a debug keystone we don’t strip the symbols anyway. Try it

Update: that setting (build = { neverStripDebugInfo = true }) did nothing on a “live build” on local device installed via ADB.  I did however manage to get proper line numbers from building with the debug keystore on local device.

I thought I had problem customers until I managed to emulate it on simulator.  I have a master display group with 12 other display groups layers to help simulate a 3D environment.  All the pinch zoom / pan events modify the master display group and the nested groups update accordingly.  All of a sudden the child display groups lost their coordination and their z-indexing and the display corrupts.

This is after the display group disruption

this is after a restart

any ideas?  No errors logged on simulator

Hi Rob,

Unfortunately the low memory event is only on iOS (according to https://docs.coronalabs.com/api/event/memoryWarning/index.html) so how should I handle this on Android? (my install base is 80% Android)

Any idea what is causing the displayObjects to change their hierarchy and relative x, y coords relative the their parent displayGroup? 

Basically they appear to reverse the order they are inserted into their parent displayGroup (as per the screenshots in post above).  If it does happen it is only after 20-30 minutes of playing (I have 5 customers that have reported the issue).  memory usage is around 250MB when it goes pear-shaped.  It is happening on a Galaxy tab 4, Galaxy S5, HTC one and LG G3 so it is not localised to low end devices. 

I know for a fact that there is no code to shuffle the order as this would make absolutely no sense in my game so therefore the problem is with the SDK somewhere.  I can’t submit a use case unless it is my entire project.

Thanks