iOS memory leak

nuevocharrua

Villager
Member
Joined
Oct 13, 2015
Messages
12
Reaction score
0
First Language
Spanish
Primarily Uses
In a simple game with a few maps, without any plugin, after trying for 30 minutes after trow many "Memory Warnigs", the game crash and throw: "Terminated due to memory issue"

(Im using Apache Cordova)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,652
Reaction score
13,264
First Language
English
Primarily Uses
RMMV
This is when playing the game, or when using the editor? And using the steam version?
 
Last edited by a moderator:

nuevocharrua

Villager
Member
Joined
Oct 13, 2015
Messages
12
Reaction score
0
First Language
Spanish
Primarily Uses
This is when playing the game, or when using the editor? And using the steam version?
Im run the game on IPhone,

And yes, is the Steam Version , but the error only happens on IPhone deployed (not in xcode Simulator)
 
Last edited by a moderator:

orlando

Veteran
Veteran
Joined
May 24, 2014
Messages
177
Reaction score
84
This might be due to the fact that images for new maps are always loaded, and apparently never unloaded. You can try this code in js/plugins/ and see if it helps with this:

(function() {// When loading a new map, consider throwing stuff away:DataManager._oldPreCacheWiper_loadMapData = DataManager.loadMapData;DataManager.loadMapData = function(mapId) {    if (typeof(DataManager._lastSeenMap) == "undefined") {        DataManager._lastSeenMap = -1;    }    if (mapId != DataManager._lastSeenMap) {        // Purge image data:        ImageManager.clear();        // Remember new map id:        DataManager._lastSeenMap = mapId;    }    return DataManager._oldPreCacheWiper_loadMapData(mapId);}})();This might possibly become part of Galenmereth's Preload Manager at some point, but right now it isn't.

Edit: snippet bugfix, referenced to non-existant class before
 
Last edited by a moderator:

nuevocharrua

Villager
Member
Joined
Oct 13, 2015
Messages
12
Reaction score
0
First Language
Spanish
Primarily Uses
Thanks

 

The script works fine! The game still throwing warnings , but not crushed.

It has some issues: The map name is shown with black font, and the first damage in battle is shown with glitches
 

orlando

Veteran
Veteran
Joined
May 24, 2014
Messages
177
Reaction score
84
Are those problems caused by the plugin? (does it work correctly without it?)

If yes, I'll see and check if I can fix it.
 
Last edited by a moderator:

nuevocharrua

Villager
Member
Joined
Oct 13, 2015
Messages
12
Reaction score
0
First Language
Spanish
Primarily Uses
Are those problems caused by the plugin? (does it work correctly without it?)

If yes, I'll see and check if I can fix it.
I think so, but did not try it without my plugins.

I think not load the font image using to show damage.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,652
Reaction score
13,264
First Language
English
Primarily Uses
RMMV
Can you try this fix from Ramiro and see if it improves things?


Also, the issues with map name and damage display - were they already happening, or did they just start happening after you added blubberblubb's plugin? (if you disable that plugin, do the issues still happen)? And what are the warnings that are still being thrown?


Some things (almost anything in the System folder) should not be cleared, and that may be the cause, but you didn't really say in what way the damage in battles was "glitched".
 
Last edited by a moderator:

nuevocharrua

Villager
Member
Joined
Oct 13, 2015
Messages
12
Reaction score
0
First Language
Spanish
Primarily Uses
The blubberblubb's plugin solves the memory error, but now have this "glitch" (first damage)



the blubberblubb's plugin is the only active plugin  
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,652
Reaction score
13,264
First Language
English
Primarily Uses
RMMV
I don't see how that plugin could possibly cause that issue unless you have another plugin enabled as well. Unless it is simply because the system files have been cleared from cache as well.

If you disable the plugin, does it still happen?
If you start a brand new project and ONLY add blubberblubb's plugin, does it still happen?

Edit: I've just finished making this.  I've tested it on PC and it works as I expect, though my testing was pretty basic.  I haven't tried running it on any mobile devices.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

ESAMarathon on Twitch, now streaming "Eat Girl". Yep, that's the title of a game... Apparently it's a Pacman knockoff.... Which is of course the only logical conclusion one would get from a name like "Eat Girl". :kaopride: I can't believe anybody would think anything else! :kaoback:
Super stoked i just finished my first town in my project, by finished i mean i can always add more decorative aesthetics and the NPCs don't talk yet but the mapping is complete and all the important chess pieces are present!
My brain: Hey, I have an idea how to make the transition to the main story quest in The Wastes more natural!
Me: Good!
My brain: You need to remake the hotel you start out in, it's not realistic enough.
Me: Ok... This was unexpected, but I can do it.
My brain: Now make each hotel floor 5 times as large to match the main part. Oh, you also need to make a bunch of new npcs to fill in the space on these maps.
Me: Crap.
Should be able to release Haxe MV/MZ next weekend.
It look that somehow MZ tracks are messed up (for example battle4 is obviously a theme, castle2 is a ship, ship1 is a scene and so on..). Maybe they just named them after with some ambiguity.

Forum statistics

Threads
100,607
Messages
977,781
Members
132,220
Latest member
lightnvs
Top