Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 8:29 pm
All times are UTC + 0
Possible memory leak...
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Mar 27, 2015 6:48 am    Post subject:  Possible memory leak... Reply with quote  Mark this post and the followings unread

I was working on the same model the whole time, my Halo helicopter, which is rather big but not that detailed.

I used autonormals a few times, mostly just drawing lines and stuff since was removing the voxel texture side effects of wonky internal coloured dots...

Suddenly I noticed everything I did had a delay, so I popped open tasks, and woooo 3.7GB!



memleak.jpg
 Description:
 Filesize:  106.96 KB
 Viewed:  5472 Time(s)

memleak.jpg



Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Mar 27, 2015 4:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Finding memory leaks is a complicated task. It could be anywhere and VXLSE III has currently over 136k lines of code. It's quite big, believe it or not.

A couple of years ago, I've worked hard to reduce the memory leak, specially with the 3D viewer.

If you point out all the procedures that you did to reach 3.7gb, it will be easier for me to find out which parts of the code are leaking memory.

Back to top
View user's profile Send private message Visit poster's website Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Mar 27, 2015 6:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

I didn't use the 3d viewer in that session at all, I didn't copy/paste anything either...

99% of it was drawing lines/dots/fills and the occasional undo.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Mar 27, 2015 6:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'll keep an eye on it next time I work on a voxel at length.

I must say that impressively it didn't actually crash #Tongue

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Mar 27, 2015 11:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you don't disable the 3D viewer panel (that is below the two side view panels), you are still using.

But I'll pay a closer attention to the code from the drawing tools and Undo/Redo.

Back to top
View user's profile Send private message Visit poster's website Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat Mar 28, 2015 1:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Any idea why most models "center" in the viewer around a rearward side position?

It appears that more than half the voxel I load, if I rotate them in the viewer, they spin from a fixed point at the right-rear... the effect of this is when turning it to the side more of the voxel goes off screen. Also checking left and right sides often requires more fiddling with zoom...

I suspect it's related to the transformation size shrinking the voxel visually without moving the numeric "center" ?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sat Mar 28, 2015 4:04 am    Post subject: Reply with quote  Mark this post and the followings unread

The memory leak problem lies on the Undo/Redo, as far as I could see. I've fixed it in revision 505.

Regarding the viewer, the model is centered at the (0, 0, 0) position. If your model is bigger than the default frustum (which may happen very often), parts of it will be outside the view. Nothing that a zoom out doesn't solve, I guess.

Back to top
View user's profile Send private message Visit poster's website Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat Mar 28, 2015 4:24 am    Post subject: Reply with quote  Mark this post and the followings unread

OK... so I haven't tried 505 but I can report that after editing the model and saving it, opening a new model doesn't reduce the memory usage...

There should be obviously no residual data saved for things like undo or even underlying pixel data, or is that windows just not flushing unused allocations?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sat Mar 28, 2015 8:41 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Any idea why most models "center" in the viewer around a rearward side position?

It appears that more than half the voxel I load, if I rotate them in the viewer, they spin from a fixed point at the right-rear... the effect of this is when turning it to the side more of the voxel goes off screen. Also checking left and right sides often requires more fiddling with zoom...


This sounds like a problem with the HVA. Sometimes, if you modify an existing voxel (instead of creating one from scratch) without a proper .hva in the same folder, something like you described happens.

_________________


Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat Mar 28, 2015 10:18 am    Post subject: Reply with quote  Mark this post and the followings unread

It happens to voxels I use in game that are perfectly centered so it's not that.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Sat Mar 28, 2015 12:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've seen a LOT of voxels with bad bounds fixed with HVA Position.

That's why I always start working with other voxels by deleting the HVA and recalculate bounds via VXLSE.

Hint: the 3D Preview window ignores HVA Position.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sat Mar 28, 2015 4:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
OK... so I haven't tried 505 but I can report that after editing the model and saving it, opening a new model doesn't reduce the memory usage...

There should be obviously no residual data saved for things like undo or even underlying pixel data, or is that windows just not flushing unused allocations?


One of the reasons from this thing you have described is the residual memory related to Undo/Redo. And, as I said, this is fixed in the latest revision. So, please, try the latest version before we continue to investigate if we still have any serious memory leak problem with the program.

Back to top
View user's profile Send private message Visit poster's website Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat Mar 28, 2015 7:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

Banshee: I downloaded it after I posted that but I haven't used it yet...

Graion: I'm sure that's true, I also delete the hva whenever I resize the voxel...

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Mar 30, 2015 4:12 am    Post subject: Reply with quote  Mark this post and the followings unread

505 still has a memory leak, I just crashed editing my halo.vxl...

I did import texture and undo a couple times because I kept forgetting to uncheck the apply top/bottom colours option.

The last thing I did when it ran out of memory was a flood fill, I missed the line and filled the layer, I clicked the correct dot again 3 times because I didn't see anything updating.

"Out of memory."

I checked taskman, 3.76gb...

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Sep 24, 2015 5:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just an update: revision 519 has fixed many memory leaks with auto normals and a couple of other things based in what was reported in the first post of this topic.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1886s ][ Queries: 14 (0.0109s) ][ Debug on ]