[A12d] EdB Interface Mods - DISCONTINUED (15 July 2016)

Started by EdB, August 09, 2014, 01:59:55 AM

Previous topic - Next topic

Fluffy (l2032)

Quote from: Lumaan on April 14, 2016, 06:28:52 PM
And just to let other know how to get it in an already A13 save go read here https://ludeon.com/forums/index.php?topic=5258.msg203392#msg203392
Replace the "<li Class="EdB.Interface.ComponentColonistBar" />" with "<li Class="PawnBar.Mapcomponent_PawnBar" />"  8)
Ah yes, thanks for pointing that out! It doesn't apply on existing games out of the box, you'll have to do a minor save game edit. Don't worry, it won't break existing games (assuming you do the edit correctly - make a backup!)

EdB

I was unable to work on the mods this week, but I'm back now and will start trying to figure out what's going on.  Unfortunately, there's nothing obvious in the code that is screaming "memory leak!", and I can't reproduce the problem with the simplest approach (new game with only this mod enabled).  Thanks to everyone for all of the investigation and information.  I will dig in and try to figure it out.

EDIT:  I can definitely see an obvious difference in memory usage between when the mod is enabled and when it is not.  That will make it easier to figure out.

mattb150

Thank you Fluffy for the sub-in and thank you EdB for looking into the issue!!  I would be happy to provide anything that might be useful, from save files that have memory-leakage issues to whatever else might be handy.

Topper

Why hasnt colonist bar, mod manager and prepare carefully integrated into the core game? Been asking for several alphas now. Is this an issue of the dev not cooperating or are not you willing to release your mods?

Kluge

Quote from: Topper on April 15, 2016, 02:00:07 PM
Why hasnt colonist bar, mod manager and prepare carefully integrated into the core game? Been asking for several alphas now. Is this an issue of the dev not cooperating or are not you willing to release your mods?
It may be a case of Tynan and Piotr not wanting to accept advanced third-party code which may cause, Idunno... memory leaks. :P -And then they'd have to go back and debug unfamiliar code because EdB isn't an employee. The obvious solution is to poach EdB from whatever company is currently stealing his time from superior projects. :D

hwoo

Quote from: Kluge on April 15, 2016, 02:13:39 PM
Quote from: Topper on April 15, 2016, 02:00:07 PM
Why hasnt colonist bar, mod manager and prepare carefully integrated into the core game? Been asking for several alphas now. Is this an issue of the dev not cooperating or are not you willing to release your mods?
It may be a case of Tynan and Piotr not wanting to accept advanced third-party code which may cause, Idunno... memory leaks. :P -And then they'd have to go back and debug unfamiliar code because EdB isn't an employee. The obvious solution is to poach EdB from whatever company is currently stealing his time from superior projects. :D

It could be more of a Dev issue. As noimage recently said he was treated quite badly by a couple of them though he gave no names so there's obviously something going on between modders and devs which is sad to hear if that's the case.

Especially due to the case that no matter how good the base game is, modders are what make the game always interesting if there's always something new. Which retains player base and in turn can lead to more revenue more often than not. To mistreat them is not only just rude but bad business sense.

Obviously this is hearsay so I'm not saying that's the case.

winowmak3r

Thanks for the update EdB! I'm not much of a coder so I really appreciate you working to get this and your other mods updated!

BMS

Quote from: EdB on April 15, 2016, 09:59:23 AM
I will dig in and try to figure it out.

I don't post much but just wanted to say EdB = KING.  without EdB mods I play other games
Shackleberry: Would be useful if there was an XSD (XML Schema Definition) for each of the XML files, would make validating XML between version far easier.

falcongrey

Quote from: Kluge on April 15, 2016, 02:13:39 PM
Quote from: Topper on April 15, 2016, 02:00:07 PM
Why hasnt colonist bar, mod manager and prepare carefully integrated into the core game? Been asking for several alphas now. Is this an issue of the dev not cooperating or are not you willing to release your mods?
It may be a case of Tynan and Piotr not wanting to accept advanced third-party code which may cause, Idunno... memory leaks. :P -And then they'd have to go back and debug unfamiliar code because EdB isn't an employee. The obvious solution is to poach EdB from whatever company is currently stealing his time from superior projects. :D

Or a third possibility, Tynan slowly begins to incorporate his own variant of this same idea with permission of course. It also will be more of a 'polish' part and he may simply be waiting to add something like this at that stage of development instead of adding more complex codes to parse through before that state which can also break.

There is a 4th possibility, Tynan may simply not want to go down this kind of interface road. :)

Quote from: EdB on April 15, 2016, 09:59:23 AM
I was unable to work on the mods this week, but I'm back now and will start trying to figure out what's going on.  Unfortunately, there's nothing obvious in the code that is screaming "memory leak!", and I can't reproduce the problem with the simplest approach (new game with only this mod enabled).  Thanks to everyone for all of the investigation and information.  I will dig in and try to figure it out.

EDIT:  I can definitely see an obvious difference in memory usage between when the mod is enabled and when it is not.  That will make it easier to figure out.

Take your time and thank you for all your hard work.

I personally feel the game is just not the same without your 3 mods!
It matters not if we win or fail. It's that we stood and faced it.

Astasia

Quote from: EdB on April 15, 2016, 09:59:23 AM
I was unable to work on the mods this week, but I'm back now and will start trying to figure out what's going on.  Unfortunately, there's nothing obvious in the code that is screaming "memory leak!", and I can't reproduce the problem with the simplest approach (new game with only this mod enabled).  Thanks to everyone for all of the investigation and information.  I will dig in and try to figure it out.

EDIT:  I can definitely see an obvious difference in memory usage between when the mod is enabled and when it is not.  That will make it easier to figure out.

From what I gathered from the reports and playing, if you start a new game with this mod it doesn't leak memory right away. It's not until you save the game, quit, then reload it, that it starts leaking. Either that or it's very dependent on number of pawns, with little to no leak with the starting 3 colonists, and a much faster and more obvious leak with a higher number.

Hopefully that makes it easier to reproduce and track down.

EdB

Quote from: Astasia on April 15, 2016, 04:42:19 PM
From what I gathered from the reports and playing, if you start a new game with this mod it doesn't leak memory right away. It's not until you save the game, quit, then reload it, that it starts leaking. Either that or it's very dependent on number of pawns, with little to no leak with the starting 3 colonists, and a much faster and more obvious leak with a higher number.

Yes, that is correct.  I'm pretty sure it only affected games loaded from a save.  I've posted a new version of the colonist bar mod that I believe fixes the memory issue.  These things are difficult to test and verify, but I definitely saw the problem in the previous version and am not seeing the same behavior in the new version.  That said, I have not been playing the game for hours at a time, so I can't be certain that there aren't other memory issues besides the one I fixed.

I certainly appreciate the patience, and all of the work of everyone who's been gathering information about the problem.  It definitely pointed me in the right direction.

For anyone curious about the technical details: there's a quirk about the way the vanilla game loads map components.  When loading a saved game, it creates two instances of the map component class, which of course calls the constructor twice.  I was doing some initialization in the constructor that, when called twice, triggered a memory issue.  I reworked the way the mod is initialized to avoid the problem.


Lumaan

@EdB - Will do some testing of the new build. :)

Edit: Made a new world and a new save, saved and restarted the game, loaded up the save and 2 hours later still no sign of memory leak :)

Acruid

I added it back into an existing save. Three hours later the private memory of the game had only increased by ~200MB, so it looks like you fixed it.

Thanks for your work and your essential mod EdB!

bonebaby

Was getting the memory leak crashes, so I pulled the latest update and started a new world.  Everything looks good, then saved and exited.  Upon loading up the save, the colonist bar is duplicated, instead of 4 colonists theres 8 in the bar.  Two icons per colonist.  Still, it's better than crashing I suppose  ::)

-BB