This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

AccessViolationException error

When I use PsdReader to read psd fild,I foreach frames and use GetBitmap method .I meet a error:
An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module. Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
This error stopped my development environment from running.I try to capture this error. But I can not. C# code ' try{}catch(Exception e){} ' doesn't work at all.
My code is :
            var image = new PsdReader(sourceFileName);
            for (int i = 1; i < image.Frames.Count; i++)
            {
                try
                {
                    var layer = image.Frames[i];
                    if (layer.Type == FrameType.Group)
                    {
                        continue;
                    }
                    using (var bitmap = layer.GetBitmap()) //There's going to be a mistake.
                    {
                        var ms = new MemoryStream();
                        bitmap.Save(ms, new PngSettings());
                        var image2 = Image.FromStream(ms);
                        image2.Save(dataDir + "testimg\\" + i + ".png");
                    }
                }
                catch (Exception e)
                {
                    continue;
                }
            }
Please post here or submit a case with the PSD file you would like to process.
Fedor;32904
Please post here or submit a case with the PSD file you would like to process.


<THE LINK WAS REMOVED>
We confirm the problem. It occurs in the x64 version only, so you can use the 32-bit assemblies to test the functionality. We will fix it in the future releases.
Fedor;32912
We confirm the problem. It occurs in the x64 version only, so you can use the 32-bit assemblies to test the functionality. We will fix it in the future releases.


When I used Aurigma.GraphicsMill.Core.x86.dll , it also made a mistake.
Which version do you use? I couldn't reproduce it with the version 10.1.4.
Fedor;32914
Whi version do you use? I couldn't reproduce it with the version 10.1.4.


I use the 10.1.4 version. And I reproduce it sometime, when I used the console project .If I'm using a web project,it's bound to go wrong.
Okay, thanks for the information. We will fix it in the further releases.