Memory leak

I have a config that does a bunch of operations with lists and a bunch of I.O.(FileAppendLines) inside of a loop and when i run it on 200 threads it goes from around 300MB to 10GB in about an hour or two, at which point openbullet just crashes.

If your config creates just one file and you’re also appending lines, so It gives abnormal result on your system, in OB2 you’re free to use C# codes so you can also check If you’re file is opened then create a new file or remain it open until closing the app.

Anyway, I suggest to use recommended snippets from C# forums for these such of thread-based processes.

If I create a new file when the main one is opened, it’s just going to cause the directory to get filled with a bunch of useless files due to the speed at which the lines are being appended. I also can’t really just use the same one stream because afaik OB 2 doesn’t support global variables. I feel like the only solutions to this problem are either severely hindering the performance of the config or ruri making the file I.O. blocks work similarly to the C/C++ standard file I.O. library’s, that is, by queuing the file I.O. operations and outputting them to the same one stream, which I’m guessing he isn’t doing, but idk, this definitely shouldn’t be a problem though.

Please open an issue on github about this, in .NET 6 they made a lot of improvements to async file operations so hopefully it will get better, but if there a memory leak issue inside OB2 itself then I would definitely like to see a memdump and investigate this ^^ Let’s discuss more on github

Hi sorry for commenting on this random post but when will .Net 6 be integrated? And what will it help with/add to OB2 Download .NET 6.0 (Linux, macOS, and Windows)

First I have to finish the .loli support, then I will upgrade the project to .NET 6 right after, I will list the improvements later on because right now I don’t know how many features of .NET 6 I will be using.