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

Notification

Icon
Error

Options
Go to last post Go to first unread
Centrics  
#1 Posted : Thursday, April 27, 2023 3:00:55 PM(UTC)
Centrics

Rank: Newbie

Groups: Member
Joined: 5/7/2008(UTC)
Posts: 3

Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
at Aurigma.GraphicsMill.PipelineElement.RunPipeline()
at Aurigma.GraphicsMill.Pipeline.Run()
at Aurigma.GraphicsMill.Transforms.Transform.Apply(Bitmap source)
at Aurigma.GraphicsMill.TransformsProvider.ApplyAndDeleteTransform(IBitmapTransform transform)
at com.centrics.framework.imaging.ImageHelper.ResizeImage(Image src, Int32 newWidth, Int32 newHeight, Boolean force32bit, Boolean useWhiteBackground)
at PictureArchive.VersionedPicture.GenerateSizedImage(Image image, Int32 maxDimension)

We are getting the error above when running with this configuration at one of our locations. The other locations have the same configuration.
Note when this exception is raised, the application crashes, it is not caught by the try/catch wrapping our method. that exception info is outputted to the cmd console

We are loading the image from a memory stream

In Event Viewer there are four events related, with the third being weird since its happening when the pipeline is running internally. Maybe that will mean something to you. I tried with images on multiple drives on the machine.
1) Error Event 1026, It just had the callstack

2) Error Event 1000, Task Category 100
Faulting application name: SpecPrintProcessor.exe, version: 5.0.648.1, time stamp: 0xd6a1a0c8
Faulting module name: Aurigma.GraphicsMill.dll, version: 9.3.37.0, time stamp: 0x5b501c0c
Exception code: 0xc000001d
Fault offset: 0x0000000000afb431
Faulting process id: 0x1618
Faulting application start time: 0x01d9795549b637a2
Faulting application path: c:\xxx\SpecPrintProcessor.exe
Faulting module path: c:\xxx\Aurigma.GraphicsMill.dll
Report Id: 87c4838e-e548-11ed-813d-005056808975
Faulting package full name:
Faulting package-relative application ID:


3) Error Event 1005, Task Category 100
Windows cannot access the file for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program SpecPrintProcessor because of this error.

Program: SpecPrintProcessor
File:

The error value is listed in the Additional Data section.
User Action
1. Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.
2. If the file still cannot be accessed and
- It is on the network, your network administrator should verify that there is not a problem with the network and that the server can be contacted.
- It is on a removable disk, for example, a floppy disk or CD-ROM, verify that the disk is fully inserted into the computer.
3. Check and repair the file system by running CHKDSK. To run CHKDSK, click Start, click Run, type CMD, and then click OK. At the command prompt, type CHKDSK /F, and then press ENTER.
4. If the problem persists, restore the file from a backup copy.
5. Determine whether other files on the same disk can be opened. If not, the disk might be damaged. If it is a hard disk, contact your administrator or computer hardware vendor for further assistance.

Additional Data
Error value: 00000000
Disk type: 0


4) Information EventID 1001
Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: SpecPrintProcessor.exe
P2: 5.0.648.1
P3: d6a1a0c8
P4: Aurigma.GraphicsMill.dll
P5: 9.3.37.0
P6: 5b501c0c
P7: c000001d
P8: 0000000000afb431
P9:
P10:


Configuration
Windows Server 2012 R2 Build 9600
Microsoft Visual C++ 2015-2022 Redistributable (x64) 14.31.31103
.net 4.8
Aurigma GraphicsMill 9.3.37 x64
Console Application x64


Things I tried
  1. I tried processing different image files (all jpgs)
  2. reinstalling the vs redist,
  3. copied the Aurigma GraphicsMill dll from a known good location (diff'ed them first, and the were the same)
  4. Tried installing the GraphicsMillRedistributable.exe that came with the sdk
  5. Enabled Fusion to see if there were any binding failures, none.
  6. Used Procmon.exe and procexp64.exe to see if it was failing to find/open a resource
  7. Created a linqPad script that just loads an image into an Aurigma bitmap, saves a copy to disk, then tries to apply rotate and resize transforms. With the linqpad, it does not crash, but just never returns from the transform call. I think linqpad is running in a separate process and that process is crashing in the background
    Code:
    string filename = @"C:\Support\ElvirJason.jpg";
    
    void Main()
    {
    	int newWidth = 252;
    	int newHeight = 250;
    	using(var imgOutput = new Aurigma.GraphicsMill.Bitmap(filename))
    	{
    		Console.WriteLine($"Saving agBmp before resize2");
    		imgOutput.Save($@"C:\temp\agBmpBeforeResize_{DateTime.Now.Ticks}.jpg");
    		
    		Console.WriteLine($"rotate imgOutput");
    		imgOutput.Transforms.Rotate(90);
    		imgOutput.Save($@"C:\temp\agBmpAfterRotate_{DateTime.Now.Ticks}.jpg");
    
    		Console.WriteLine($"Resizing imgOutput to {newWidth}x{newHeight}");
    		imgOutput.Transforms.Resize(newWidth, newHeight); //, Aurigma.GraphicsMill.Transforms.ResizeInterpolationMode.High, Aurigma.GraphicsMill.Transforms.ResizeMode.Resize);
    		
    		Console.WriteLine($"saving to disk");
    		imgOutput.Save($@"C:\temp\agBmpBeforeResize_{DateTime.Now.Ticks}.jpg");
    	}
    }
The method from the actual application:
Code:
public static System.Drawing.Image ResizeImage(System.Drawing.Image src, int newWidth, int newHeight, bool force32bit = false, bool useWhiteBackground = false)
{
	Aurigma.GraphicsMill.Bitmap imgOutput = null;

	try
	{
		bool hasAlpha = (((ImageFlags)src.Flags).HasFlag(ImageFlags.HasAlpha) || ((ImageFlags)src.Flags).HasFlag(ImageFlags.HasTranslucent));
		//No point putting in a white background if the incoming image does not have transparency
		if (useWhiteBackground && (hasAlpha || src.PixelFormat == System.Drawing.Imaging.PixelFormat.Format32bppArgb))
		{
			using (var srcAG = new Aurigma.GraphicsMill.Bitmap((System.Drawing.Bitmap)src))
			{
				imgOutput = new Aurigma.GraphicsMill.Bitmap(src.Width, src.Height, Aurigma.GraphicsMill.PixelFormat.Format32bppArgb, Aurigma.GraphicsMill.RgbColor.White);
				imgOutput.Draw(srcAG, 0, 0, Aurigma.GraphicsMill.Transforms.CombineMode.Alpha);
			}
		}
		else
		{
			imgOutput = new Aurigma.GraphicsMill.Bitmap((System.Drawing.Bitmap)src);
			Console.WriteLine($"Loaded gdibmp to agBmp");
		}
		imgOutput.Transforms.Resize(newWidth, newHeight, Aurigma.GraphicsMill.Transforms.ResizeInterpolationMode.High, Aurigma.GraphicsMill.Transforms.ResizeMode.Resize);
		if (force32bit && imgOutput.PixelFormat != Aurigma.GraphicsMill.PixelFormat.Format32bppArgb)
		{
			imgOutput.ColorManagement.Convert(Aurigma.GraphicsMill.PixelFormat.Format32bppArgb);
		}
		return imgOutput.ToGdiPlusBitmap();
	}
	catch (Exception ex)
	{
		throw new ApplicationException(string.Format(CultureInfo.InvariantCulture, "Exception resizing image. Parameters: newWidth,newHeight {0},{1}, src w,h: {2},{3}", newWidth, newHeight, src.Width, src.Height), ex);
	}
	finally
	{
		if (imgOutput != null)
		{
			Console.WriteLine($"disposing imgOutput");
			imgOutput.Dispose();
		}
	}
}

Edited by user Thursday, April 27, 2023 3:07:02 PM(UTC)  | Reason: Not specified

Eugene Kosmin  
#2 Posted : Wednesday, May 3, 2023 5:50:22 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 505

Was thanked: 41 time(s) in 41 post(s)
Hi,

I answered you in the support case ticket.
Best regards,
Eugene Kosmin
The Aurigma Development Team
Users browsing this topic
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.