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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 [IEvolution] GetScanline crash on application exit
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jritter

Germany
19 Posts

Posted - Feb 21 2017 :  03:05:39  Show Profile  Reply
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?

xequte

38182 Posts

Posted - May 29 2017 :  03:31:55  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: