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] ieMulti_click event error
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jritter

Germany
19 Posts

Posted - Aug 20 2017 :  00:58:46  Show Profile  Reply
Hi,

I'm using ievolution 5.0.0, .Net 4.5, visual studio 2015 and there is a reproducible error (vshost32.exe stoped working) if I use the ieMulti_Click event, LINQ-code to check the existence of a point (in my excample) in a list<point> and then alt+tab.

Form contains 1x ieMulti, 2x button.


private void button1_Click(object sender, EventArgs e)
        {
            
            ieMulti1.ImageList.AppendImage(@"test.jpg");
        }



private void ieMulti1_Click(object sender, EventArgs e)
        {
            IEImage image = new IEImage();
            //or load image with string, or copy ieMulti-image to ieView
        }



private async void button2_Click(object sender, EventArgs e)
        {

            await Task.Run(() =>dostuff());

        }



private void dostuff()
        {

            List<Point> Punkte = new List<Point>();
            for (int i = 0; i < 30000; i++)
            {
                Point Punkt = new Point(i, i);
                Punkte.Add(Punkt);
            }
            List<Point> Ouput = LFP(Punkte[0],  Punkte);
            

        }



private List<Point> LFP(Point P, List<Point> Input)
        {

            List<Point> Punkte = new List<Point>();
            List<Point> Best = new List<Point>();
            Best.Add(P);
            bool b1 = new bool();
                        
            for (int i = 0; i < 20000; i++)
            {
                Point Punkt = new Point(0, 0);
                Punkt = Input[i];
                Punkte.Add(Punkt);
            }

            for (int s = 0; s < Punkte.Count - 1; s++)
            {
                                   
                for (int j = 0; j <= 100; j++)
                {
                        Point Test = new Point(0, 0);
                        b1 = Punkte.Exists(p => p.X == Test.X && p.Y == Test.Y);
                }
            }
            

            return Best;
        }


If I remove "b1 = Punkte.Exists(p => p.X == Test.X && p.Y == Test.Y);" it works.

Same problem occourred (70% chance or so ;)) if I use a method with Lock.Bits and marshal.copy to copy pixel information in an array.


How can I avoid that? Is it maybe fixed in newer versions?

Thank you for any advice.

xequte

39142 Posts

Posted - Aug 20 2017 :  21:32:06  Show Profile  Reply
Hi

Can you email me with your details so I can check if you qualify for 6.0.0.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jritter

Germany
19 Posts

Posted - Aug 21 2017 :  00:47:10  Show Profile  Reply
Thank you for the reply.

That means it is fixed in the new version?

I don't own a personal licence, I'm using a license from the company where I am currently writing my thesis.
If it's fixed, I'll talk to my superior and I think they will take care of it.
Go to Top of Page

xequte

39142 Posts

Posted - Aug 21 2017 :  01:25:28  Show Profile  Reply
I'm afraid we have not had other reports of the issue, so I cannot confirm whether it is fixed, but there were a lot of enhancements and fixes in 6.0.0, so it could well be addressed.

Please email me as a first step, so we can determine the best way to proceed.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jritter

Germany
19 Posts

Posted - Aug 21 2017 :  13:49:16  Show Profile  Reply
I have sent you an email with project details.
Go to Top of Page

xequte

39142 Posts

Posted - Aug 21 2017 :  15:11:18  Show Profile  Reply
I've sent you a link for 6.0.0. Let me know if you are still seeing the issue.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jritter

Germany
19 Posts

Posted - Aug 22 2017 :  01:20:10  Show Profile  Reply
Thank you! After a first test it seems fixed =).
I will check a few more things, if the error occures again I'll let you know.
Go to Top of Page

jritter

Germany
19 Posts

Posted - Sep 14 2017 :  04:50:33  Show Profile  Reply
Sorry for the late response, but I bumped into this error again.
I added an ieViewer to the test programm and if I copy the image from ieMulti with

 private void ieMulti1_Click(object sender, EventArgs e)
        {
                        ieMulti1.ImageList.GetImage(ieMulti1.SelectedImage).CopyImageTo(ieViewer1.Image);            
                        
        }


it crashes with the same vshost error.

In short:
Add image to ieMulti -> copy image to ieViewer -> Alt+Tab -> no problem

Add image to ieMulti -> copy image to ieViewer -> LINQ-Code -> Alt+Tab -> error



Go to Top of Page

xequte

39142 Posts

Posted - Oct 16 2017 :  01:18:25  Show Profile  Reply
Hi

Please use the following method to to copy an image from ieMulti to ieViewer:

ieMulti1.ImageList.CopyTo(ieMulti1.SelectedImage, ieViewer1.Image);

As specified in the documentation, ImageList.GetImage() cannot be used because it requires a call to ImageList.ReleaseImage().


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: