Sarkath

Active Member
Sep 8, 2019
510
854
Hmm...
...Wait "Event log entries are now capped at 50 to address a potential memory leak issue."
Correct me if I'm wrong, but would that not literally break any larger events?
Does this even fix the issue... or just stop the process in general?
I haven't looked, but I assume that the "event log" is the text dump on the right that says stuff like "game saved to blahblahblah." If so, that wouldn't have any impact on gameplay, and capping it is long overdue.

Calling it a memory leak doesn't sit right with me, though. A memory leak is when you have something unexpected sapping up resources (generally, memory that is allocated, used, and never properly deallocated), and is generally pretty difficult—though not impossible—to do in managed languages like C# and Java because the garbage collector is specifically designed to check for stuff like that. When you let an object grow indefinitely, it isn't a memory leak—it's just you using memory.
 

Quintilus

Engaged Member
Aug 8, 2020
2,687
7,640
Technically, leaked memory is a memory that contain garbage data that never would be used in future and which should be deleted. So its a memory leak at least by the meaning.
In any case, less memory consumption is a good thing.
 
  • Thinking Face
Reactions: Monstrous Moonshine

Sarkath

Active Member
Sep 8, 2019
510
854
Technically, leaked memory is a memory that contain garbage data that never would be used in future and which should be deleted. So its a memory leak at least by the meaning.
That's not what a memory leak is. Even if that definition were accurate, the data in the event log is never garbage data—it's meaningful data of dubious usefulness.

A memory leak is the result of memory that has not been properly deallocated and is effectively lost. When you have to manage your own memory it's exceedingly easy to create a memory leak. Here's an example in C:

C:
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv) {
    leaky_pp();
    return 0;
}

void leaky_pp() {
    char *str;
  
    str = malloc(sizeof(char) * 13);
    strcpy(str, "Hello world!");
  
    printf("%s\n", str);

    /* MEMORY LEAK: str is never freed! */
}
This example leaks 13 bytes of memory. When leaky_pp() is called, it allocates 13 bytes to hold the "Hello world!" string. The function is returned, but the memory is never frees. Since C doesn't do automatic reference counting or garbage collection, this memory remains allocated and is effectively unusable after the function returns and the pointer falls out of scope*. If leaky_pp() is called again, another 13 bytes will be leaked, as the subsequent malloc() call will allocate another 13 bytes of memory.

In this case it isn't a big deal, since the OS will clean up its memory after the program terminates. What if we were to throw the function call in a while loop, creating the traditional looping "Hello world!" program? Every single iteration would cause 13 bytes of memory to be allocated and would eventually run the system out of memory.

That's what a memory leak is. "Hello world!", for this application, was never garbage data. It's data that sticks around for far longer than intended due to a lack of an explicit deallocation. If you were writing a typical C#/Java application (and LT is just a typical Java application, large as it may be) the garbage collector would ensure that memory isn't lost like this.

To be clear, it's still possible to end up in this situation with managed languages but you have to go out of your way to do it. In C# you can cause a memory leak by calling a function like Marshal.AllocHGlobal() and not subsequently calling Marshal.FreeHGlobal() (or by P/Invoking malloc from the C library). It's not something someone is liable to do by accident while writing a typical application.

Either way (and yes, I know I'm being pedantic), what's happening in LT isn't a memory leak. It's simply that the event log was uncapped and would eventually grow to stupidly large sizes.

*It technically can be used and even freed later on, but that would require knowing its memory address. It's not particularly feasible to attain that after the fact.
 

NODOGAN

Well-Known Member
Dec 11, 2017
1,392
2,155
So at risk of sounding extremely noob (considering i've been playing this game for years) finally decided to explore abit more npc interactions and talked with Pix at the gym, i didn't knew training with her could give you an extra physique perk-point so i wanna ask to people that have already exploited this:

How many physique points can you farm by training with Pix?
 

Quintilus

Engaged Member
Aug 8, 2020
2,687
7,640
I mean, yeah, leaked memory is a memory that OS still think is assigned to program, but pointer to which was lost by program.
If you so pedantic, I omit cases where program are allowed to directly manipulate/work with physical memory, because there are...impossible to "leak" memory?? (program lost pointer to memory block -> it think this memory is empty -> override previous data with new).
But still, its maybe not precise, but relatively good name for a thing that constantly allocate memory without freeing it, since there are no any agreed name for such thing/situation.
 
  • Angry
Reactions: Monstrous Moonshine

Sarkath

Active Member
Sep 8, 2019
510
854
So at risk of sounding extremely noob (considering i've been playing this game for years) finally decided to explore abit more npc interactions and talked with Pix at the gym, i didn't knew training with her could give you an extra physique perk-point so i wanna ask to people that have already exploited this:

How many physique points can you farm by training with Pix?
There's no limit to the number of physique points you can get from Pix's training, but the game does enforce a limit of 100 elsewhere in the code.

So, 100. :)

If you so pedantic, I omit cases where program are allowed to directly manipulate/work with physical memory, because there are...impossible to "leak" memory?? (program lost pointer to memory block -> it think this memory is empty -> override previous data with new).
I'm not sure I follow you. Are you referring to platforms like older consoles/computers where the application has full control of the system? If so, it really depends on how they manage their memory. If they statically allocate everything then there's no chance of a leak happening. If they implement some form of dynamic memory allocation then yes, they can still leak memory as they're basically rolling their own malloc.

But still, its maybe not precise, but relatively good name for a thing that constantly allocate memory without freeing it, since there are no any agreed name for such thing/situation.
I dunno. That use is a bit too far removed from the original definition for my liking. I think I'd just rather call it "wasting resources." :p
 

NODOGAN

Well-Known Member
Dec 11, 2017
1,392
2,155
There's no limit to the number of physique points you can get from Pix's training, but the game does enforce a limit of 100 elsewhere in the code.

So, 100.
Sooo if you're patient enough (and have the money which honestly isn't an issue in this game) you can get ALL the physique stuff through this and use the perk-points ya get by leveling up elsewhere? awesome! (granted the game ain't difficult enough to do this, but the fact you can do it if you want i find cool.)
 

fudejoranek

Newbie
Oct 30, 2018
84
88
Sooo if you're patient enough (and have the money which honestly isn't an issue in this game) you can get ALL the physique stuff through this and use the perk-points ya get by leveling up elsewhere? awesome! (granted the game ain't difficult enough to do this, but the fact you can do it if you want i find cool.)
You can afford a life-time pix gym subscription within 15 minutes of the game starting by selling some slaves. This makes further sessions free. You then have to spend half a year of in-game time training with pix, always declining her shower scene because that takes time (I've fully muscle memorized the process). This is the meta for every build. Since you will get hit a lot in this game, you either have be able to kill every enemy in one turn (this is basically impossible with 4 enemies unless you use an AOE weapon) or be able to take a ton of damage on higher difficulties.

I'm half considering modifying my game to prevent me from doing this because I can't help but play efficiently.
 

tehlemon

Well-Known Member
Jan 26, 2021
1,224
1,556
So at risk of sounding extremely noob (considering i've been playing this game for years) finally decided to explore abit more npc interactions and talked with Pix at the gym, i didn't knew training with her could give you an extra physique perk-point so i wanna ask to people that have already exploited this:

How many physique points can you farm by training with Pix?
You can get 100, but don't get more than 50.

Not that you'd need to, because you can hit max level in about 10 minutes. And the extra 50 points are pretty meaningless if you're trying to break the game anyways, because anything outside of the phys tree becomes pointless and you'll have the phys tree maxed out either way.

This is the kind of thing that'd be more interesting if the game's progression was a curve and not just a single step.
 

Quintilus

Engaged Member
Aug 8, 2020
2,687
7,640
I'm not sure I follow you. Are you referring to platforms like older consoles/computers where the application has full control of the system? If so, it really depends on how they manage their memory. If they statically allocate everything then there's no chance of a leak happening. If they implement some form of dynamic memory allocation then yes, they can still leak memory as they're basically rolling their own malloc.
Have you ever seen a more or less complex program/game that runs on stack completely?? Well, mario probably and other (s)nes/sega games. But they are more like historical curiosities than actual software now. Putting a code with sounds and graphics in so little space that even screenshot of a game have bigger size that whole package...wow, cool how did you make it? Not that I ever would do that...
 
  • Like
Reactions: Sarkath

fudejoranek

Newbie
Oct 30, 2018
84
88
About AOE weapon. There are only illegal shotgun(s) and (sub)machinegun(s), right?!



Try factorio or mindustry then.
There is a wide selection in the debug menu, most of them are illegal ranged weapons, they all require some resource to do the AOE attack. You'd think there is some AOE spell in the game, but the most I could find was the fireball spell that targets two enemies.
 

Warthogs308

Member
Jan 25, 2021
125
354
That's not what a memory leak is. Even if that definition were accurate, the data in the event log is never garbage data—it's meaningful data of dubious usefulness.

A memory leak is the result of memory that has not been properly deallocated and is effectively lost. When you have to manage your own memory it's exceedingly easy to create a memory leak. Here's an example in C:

C:
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv) {
    leaky_pp();
    return 0;
}

void leaky_pp() {
    char *str;
 
    str = malloc(sizeof(char) * 13);
    strcpy(str, "Hello world!");
 
    printf("%s\n", str);

    /* MEMORY LEAK: str is never freed! */
}
This example leaks 13 bytes of memory. When leaky_pp() is called, it allocates 13 bytes to hold the "Hello world!" string. The function is returned, but the memory is never frees. Since C doesn't do automatic reference counting or garbage collection, this memory remains allocated and is effectively unusable after the function returns and the pointer falls out of scope*. If leaky_pp() is called again, another 13 bytes will be leaked, as the subsequent malloc() call will allocate another 13 bytes of memory.

In this case it isn't a big deal, since the OS will clean up its memory after the program terminates. What if we were to throw the function call in a while loop, creating the traditional looping "Hello world!" program? Every single iteration would cause 13 bytes of memory to be allocated and would eventually run the system out of memory.

That's what a memory leak is. "Hello world!", for this application, was never garbage data. It's data that sticks around for far longer than intended due to a lack of an explicit deallocation. If you were writing a typical C#/Java application (and LT is just a typical Java application, large as it may be) the garbage collector would ensure that memory isn't lost like this.

To be clear, it's still possible to end up in this situation with managed languages but you have to go out of your way to do it. In C# you can cause a memory leak by calling a function like Marshal.AllocHGlobal() and not subsequently calling Marshal.FreeHGlobal() (or by P/Invoking malloc from the C library). It's not something someone is liable to do by accident while writing a typical application.

Either way (and yes, I know I'm being pedantic), what's happening in LT isn't a memory leak. It's simply that the event log was uncapped and would eventually grow to stupidly large sizes.

*It technically can be used and even freed later on, but that would require knowing its memory address. It's not particularly feasible to attain that after the fact.
I never thought I would learn something like this on a hentai thread
 
  • Haha
Reactions: Monstrous Moonshine

ebonheart2319

Member
Jul 21, 2017
132
397
All the C:
So, hypothetically this "data leak" fix would just limit the drips to 50 lines added at a time?
or worse...
Is it capping event LOGS at 50 while the processes its supposed to log can go on infinitely?
Because that almost sounds like pasting an opaque sticker over a digital display and calling it fixed...


Then again I did have to dubious honor of learning LT error reports generate exponentially.
35gigs of .txt
 
  • Wow
Reactions: Monstrous Moonshine

anubis1970

Engaged Member
Mar 1, 2018
2,106
2,344
I would hope what is does is makes the event log into a queue 50 units long, so that whenever something new enters one end the item at the other end is deleted.
 

ebonheart2319

Member
Jul 21, 2017
132
397
Error: X is not defined
Error: error has happened
???
It reported and logged an error (specifically missing mod reference because I am stupid)
The next tick copypasted the ENTIRE errorlog and generated a new error which was identical to the original error.
The third tick copypasted the ENTIRE errorlog and generated a new error which was identical to the original error.

Continue on each tick.

35gigs of .txt

In fact the game did not visibly react to that building behemoth till my rig started asking questions.

This event log cap sounds like it may have been a vaguely similar issue... if Inno coded such logs without recursive and redundant limits.
 
  • Haha
Reactions: Monstrous Moonshine

tehlemon

Well-Known Member
Jan 26, 2021
1,224
1,556
It reported and logged an error (specifically missing mod reference because I am stupid)
The next tick copypasted the ENTIRE errorlog and generated a new error which was identical to the original error.
The third tick copypasted the ENTIRE errorlog and generated a new error which was identical to the original error.

Continue on each tick.

35gigs of .txt

In fact the game did not visibly react to that building behemoth till my rig started asking questions.

This event log cap sounds like it may have been a vaguely similar issue... if Inno coded such logs without recursive and redundant limits.
Why the fuck would anyone write error logging to work that way. In what world would you ever want to completely copy a log and add it to the same log. That's just like, incredibly dumb. There's no way that would ever be useful.
 
  • Haha
Reactions: Monstrous Moonshine
4.10 star(s) 119 Votes