Is this a lot for a fused exe?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
togFox
Party member
Posts: 779
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Is this a lot for a fused exe?

Post by togFox »

Gvovkik reported a large memory size for my fused exe.

Image

Is this a lot and if so then how do I fault find?

I have a lot of individual images that are not yet sprite sheets. Could that be it? I have no audio at this point. I'ts pre-alpha so minimal everything in the assets department.
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
GVovkiv
Party member
Posts: 670
Joined: Fri Jan 15, 2021 7:29 am

Re: Is this a lot for a fused exe?

Post by GVovkiv »

If game opened at main.lua
Untitled2.png
Untitled2.png (1.65 KiB) Viewed 5227 times
Probably somewhere due to fused mode happening some memory leaks
Also, it takes from 70 to 300 mb per second, which is kinda scary
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Is this a lot for a fused exe?

Post by ReFreezed »

That memory usage is crazy. What is the program? It seems unlikely that the problem has anything to do with the program being fused, specifically.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
GVovkiv
Party member
Posts: 670
Joined: Fri Jan 15, 2021 7:29 am

Re: Is this a lot for a fused exe?

Post by GVovkiv »

ReFreezed wrote: Sat Aug 14, 2021 8:08 pm That memory usage is crazy. What is the program? It seems unlikely that the problem has anything to do with the program being fused, specifically.
viewtopic.php?f=14&t=91765&p=243027#p243027
togFox's game
maybe that problem specific for me and/or windows 10
or just game code/libraries have memory leak
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Is this a lot for a fused exe?

Post by ReFreezed »

Ok, the game does the same for me on Windows 7. After some testing, it seems the separate thread is the issue.

Code: Select all

local thread_code = [[
	while true do
		local command = io.read()
		console_channel:push(command) -- Commenting this out stops the crazy memory usage.
		require"love.timer".sleep(0.01) -- Adding this line also fixes the problem.
	end
]]
It only happens when running love.exe - not with lovec.exe, so it seems the problem is about there not being an attached console, in combination with the high amount of push() calls in little time. (Fused or not doesn't seem to matter.)
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
GVovkiv
Party member
Posts: 670
Joined: Fri Jan 15, 2021 7:29 am

Re: Is this a lot for a fused exe?

Post by GVovkiv »

ReFreezed wrote: Sat Aug 14, 2021 9:14 pm Ok, the game does the same for me on Windows 7. After some testing, it seems the separate thread is the issue.

Code: Select all

local thread_code = [[
	while true do
		local command = io.read()
		console_channel:push(command) -- Commenting this out stops the crazy memory usage.
		require"love.timer".sleep(0.01) -- Adding this line also fixes the problem.
	end
]]
It only happens when running love.exe - not with lovec.exe, so it seems the problem is about there not being an attached console, in combination with the high amount of push() calls in little time. (Fused or not doesn't seem to matter.)
Welp, good to hear that
User avatar
togFox
Party member
Posts: 779
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Is this a lot for a fused exe?

Post by togFox »

oh great. Thst thread is for debugging so it can come out super quick.

How did you diagnose that?

And how do I de- fuse the exe?
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Is this a lot for a fused exe?

Post by ReFreezed »

To reverse the fusion you can just open the exe with an archive program (7-zip or whatever) and extract the files. The fused exe is a valid .zip file because of how the zip format works.

I first searched for all calls to love.* functions, and when I saw the thread stuff I just had a hunch it might be the problem.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Is this a lot for a fused exe?

Post by zorg »

if there's no sleep called in a thread other than the main one, it will run as fast as it can; you pushing about a thousand or more times a second does probably fill up some memory since the channel needs to buffer all those things until another thread removes them.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Is this a lot for a fused exe?

Post by grump »

More like hundreds of thousands per second without that sleep.

Looks like io.read is blocking with lovec.exe but not with love.exe. Instead of using some arbitrary sleep value, the thread should use channel.supply instead of channel.push to synchronize writer and reader. Also don't push all those nils that io.read returns when there's nothing to read.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 194 guests