ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 LoadFromFileIev memory leak and Out of memory

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
RudBus Posted - Feb 22 2022 : 16:55:14
Hi,

I just updated to ImageEn 10.3.0_41640 and I still have 2 issues with ievect.LoadFromFileIev.

First I have a memory leak with softshadow when loading an image from LoadFromFileIev because it raises in the Stream.Read(Name^, q) that follows the softshadow create. Here is the call stack:

System.ZLib.ZDecompressCheckWithoutBufferError(-3)
System.ZLib.TZDecompressionStream.Read(???,1701564)
ievect.TImageEnVect.ReadObj($7D97AF00,87,True,0)
ievect.TImageEnVect.LoadFromStreamIEV($7D95E360,False)
ievect.TImageEnVect.LoadFromFileIEV('ImageNameCorrupted.iev',True)


And I also have an Out of memory with another image. Here is the call stack:

hyieutils.IEStrDup(#1)
hyieutils.IEStrDup('€¬’'#3'€€€€€€€€€€€€€€€€€€€...
ievect.TImageEnVect.AddVObject($19F27C)
ievect.TImageEnVect.ReadObj($7D97AF00,84,True,1)
ievect.TImageEnVect.ReadObj($7D97AF00,84,True,1)
ievect.TImageEnVect.LoadFromStreamIEV($7D95DB40,True)
ievect.TImageEnVect.LoadFromFileIEV('ImageOutOfMemory.iev',True)


I have attached both images a zip file. I'm using FastMM4. While I guess both images are corrupted and that corruption can be very unpredictable, do you think there is anything that could be done to prevent those 2 issues ? Thank you.

attach/RudBus/2022222165358_Images.zip
914 Bytes
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 01 2022 : 22:25:10
Thanks. We'll have a fix for this in the next release.

Nigel
Xequte Software
www.imageen.com
RudBus Posted - Mar 01 2022 : 13:22:25
I'm sorry the leak is for another image I didn't attach before. You may try with this one and you should have the leak now.

attach/RudBus/20223113207_ImageLineCorrupted.zip
847 Bytes
xequte Posted - Feb 27 2022 : 21:08:36
Hi

I tested ImageNameCorrupted.iev as follows:

- Created a blank project
- Added a TImageEnVect and a button
- Added to the button click code: ImageEnVect1.LoadFromFileIEV( 'D:\ImageNameCorrupted.iev' );
- Enable memory leak detection for the project

>>> I did not see any memory leak error on closure. Can you try the above and let me know.

Nigel
Xequte Software
www.imageen.com
RudBus Posted - Feb 24 2022 : 17:19:31
Thank you Nigel, I see you made improvements in the ReadObj for the corrupted files and it's working fine for the Out of memory problem!

About the memory leak issue (ImageNameCorrupted.iev) the softshadow leaks no more but there is still a leak. This is the leak I have (I'm still using version 10.3.0 with the ReadObj from the 10.3.1 Beta update):

A memory block has been leaked. The size is: 1703780

This block was allocated by thread 0x3D24, and the stack trace (return addresses) at the time was:
40A066 [System.pas][System][@GetMem$qqri][4745]
1DB1142 [ievect.pas][ievect][TImageEnVect.ReadObj$qqrp22System.Classes.TStreamucoi][9496]
77BEFBD0 [RtlRegisterSecureMemoryCacheCallback]
1B7459C [iexLayers.pas][iexLayers][TIELayer.GetWidthD$qqrv][9159]
77B82C4C [ZwSetInformationFile]
76D6D962 [SetFilePointer]
76D6D987 [SetFilePointer]
76D6D987 [SetFilePointer]
5C49A7 [inflate.c][System.ZLib][Zlib.inflatePrime$qr20System.Zlib.z_streamii][413]
5C5ECF [inflate.c][System.ZLib][Zlib.inflate$qr20System.Zlib.z_streami][1244]
4C6CC3 [System.Classes.pas][System.Classes][Classes.THandleStream.Seek$qqrxj26System.Classes.TSeekOrigin][8759]

The block is currently used for an object of class: Unknown


It seems tricky though.
xequte Posted - Feb 22 2022 : 19:26:24
Hi

We have made some improvements to cope with corrupted files. You can email me to test the update.

Nigel
Xequte Software
www.imageen.com