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
 [IEvolution] GetScanline crash on application exit

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
jritter Posted - Feb 21 2017 : 03:05:39
Hello,

I have a problem when using the getscanline() method.

I wrote simple program, which contains the following (IEvolution 5.0.0):


IEImage Bild = new IEImage();
            ieViewer1.Image.CopyImageTo(Bild);
            int size = Bild.Height * Bild.Width * 3;
            byte[] data = new byte[size];

            for (int i = 0; i < Bild.Height; i++)
            {

                Marshal.Copy(Bild.GetScanline(i), data, i * (Bild.Width * 3), Bild.Width * 3);

            }


Everything else in code is just open file, text output etc.
While the result is correct, the application crashes when leaving the programm with "Exception Code: c000041d".

And rarely it crashes while doing nothing. Open Image -> click button -> calculating things -> everything is fine -> calculating a lot of things for 10 min -> everything is fine -> finished calculation -> switching to browser -> programm still open doing nothing -> a few seconds or minutes later: crash.

But not on every system.

Win 8.1 laptop: crash
Win 10 PC 1: crash
Win 10 PC 2: crash

Win 7 PC 1: works fine
Win 7 PC 2: works fine
Virtual Box Win 10: works fine


Am I doing something wrong?

1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 29 2017 : 03:31:55
Hi

When a IEImage is created at runtime (with "new"), it should be manually disposed.

For example:

IEImage Bild = new IEImage();
...


Bild.Dispose(); // <<< this is required



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com