Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
chenwp  
#1 Posted : Sunday, August 18, 2019 11:00:15 PM(UTC)
chenwp

Rank: Member

Groups:
Joined: 8/13/2019(UTC)
Posts: 17

Thanks: 1 times
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 :

Code:
            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;
                }
            }

Edited by moderator Monday, August 19, 2019 4:16:39 AM(UTC)  | Reason: Not specified

Fedor  
#2 Posted : Monday, August 19, 2019 4:43:38 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Please post here or submit a case with the PSD file you would like to process.

Edited by user Monday, August 19, 2019 6:54:28 AM(UTC)  | Reason: Not specified

Best regards,

Fedor Skvortsov

chenwp  
#3 Posted : Tuesday, August 20, 2019 6:04:30 PM(UTC)
chenwp

Rank: Member

Groups:
Joined: 8/13/2019(UTC)
Posts: 17

Thanks: 1 times
Originally Posted by: Fedor Go to Quoted Post
Please post here or submit a case with the PSD file you would like to process.

<THE LINK WAS REMOVED>

Edited by moderator Tuesday, August 20, 2019 6:33:55 PM(UTC)  | Reason: Not specified

Fedor  
#4 Posted : Tuesday, August 20, 2019 6:31:19 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
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.
Best regards,

Fedor Skvortsov

chenwp  
#5 Posted : Tuesday, August 20, 2019 6:35:55 PM(UTC)
chenwp

Rank: Member

Groups:
Joined: 8/13/2019(UTC)
Posts: 17

Thanks: 1 times
Originally Posted by: Fedor Go to Quoted Post
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.

Fedor  
#6 Posted : Tuesday, August 20, 2019 6:37:40 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Which version do you use? I couldn't reproduce it with the version 10.1.4.

Edited by user Tuesday, August 20, 2019 6:54:59 PM(UTC)  | Reason: Not specified

Best regards,

Fedor Skvortsov

chenwp  
#7 Posted : Tuesday, August 20, 2019 6:42:23 PM(UTC)
chenwp

Rank: Member

Groups:
Joined: 8/13/2019(UTC)
Posts: 17

Thanks: 1 times
Originally Posted by: Fedor Go to Quoted Post
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.

Fedor  
#8 Posted : Tuesday, August 20, 2019 7:15:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Okay, thanks for the information. We will fix it in the further releases.
Best regards,

Fedor Skvortsov

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.