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

Notification

Icon
Error

Options
Go to last post Go to first unread
bmiller  
#1 Posted : Monday, July 7, 2014 10:52:56 AM(UTC)
bmiller

Rank: Newbie

Groups: Guest
Joined: 7/2/2014(UTC)
Posts: 3

I took the sample code for .NET and have made some minor modifications to it. I am able to get the watermarking code working with no problems but the combine images page is giving me this error:

The type initializer for 'Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry' threw an exception.

I have all the DLLs in the bin folder and also have the license file in there too. Any ideas what might be causing the exception?

Here is the full runtime error:

[SEHException (0x80004005): External component has thrown an exception.]
ImagingFramework.Drawing.AggFontRegistry.InitFromSystem(AggFontRegistry* ) +0
Aurigma.GraphicsMill.AdvancedDrawing.InstalledFontRegistry..ctor() +84
Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry..cctor() +39

[TypeInitializationException: The type initializer for 'Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry' threw an exception.]
Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry.get_Installed() +0
Aurigma.GraphicsMill.AjaxControls.VectorObjects.Configuration..ctor() +134
Aurigma.GraphicsMill.AjaxControls.VectorObjects.Configuration.<.cctor>b__0() +39
Aurigma.GraphicsMill.AjaxControls.VectorObjects.Singleton.SingletonFactory`1.GetInstance() +114
Aurigma.GraphicsMill.AjaxControls.VectorObjects.Configuration.get_Instance() +30
Aurigma.GraphicsMill.AjaxControls.VectorObjects.Canvas.OnPreRender(EventArgs e) +195
System.Web.UI.Control.PreRenderRecursiveInternal() +103
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
Fedor  
#2 Posted : Monday, July 7, 2014 9:05:16 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Could you post a code snippet to reproduce the problem?
Best regards,
Fedor Skvortsov
bmiller  
#3 Posted : Tuesday, July 8, 2014 6:19:48 AM(UTC)
bmiller

Rank: Newbie

Groups: Guest
Joined: 7/2/2014(UTC)
Posts: 3

The error occurs right after Page_Load in Main.master.cs of the example code:

Code:


        protected void Page_Load(object sender, EventArgs e)
        {           
            if (IsPostBack)
            {
                ImageId = ImageDropDownList.SelectedItem.Value;
                UploadFileMessage.Text = "";
                if (FileInput.PostedFile != null && !String.IsNullOrEmpty(FileInput.PostedFile.FileName))
                {
                    try
                    {
                        GalleryItem image = Gallery.Add(FileInput.PostedFile, SiteMap.CurrentNode["action"], FileSize, ColorSpace, ColorProfile);
                        ImageId = image.Id;

                        ImageDropDownList.Items.Add(new ListItem(Utils.ShrinkFileName(image.Name, 25), image.Id.ToString()));
                        ImageDropDownList.SelectedIndex = ImageDropDownList.Items.Count - 1;
                        ImageDropDownList_IndexChanged(this, EventArgs.Empty);
                    }
                    catch (ApplicationException exception)
                    {
                        UploadFileMessage.Text = exception.Message;
                    }
                }
            }
            else
            {
                //if (SiteMap.CurrentNode.NextSibling != null)                
                //    NextLink.NavigateUrl = HttpUtility.HtmlDecode(SiteMap.CurrentNode.NextSibling.Url);                
                //else if (SiteMap.CurrentNode.ParentNode.NextSibling != null)                
                //    NextLink.NavigateUrl = HttpUtility.HtmlDecode(SiteMap.CurrentNode.ParentNode.NextSibling.ChildNodes[0].Url);                
                //else                 
                //    NextLink.CssClass += " disabled";                
                
                //if (SiteMap.CurrentNode.PreviousSibling != null)                
                //    PreviousLink.NavigateUrl = SiteMap.CurrentNode.PreviousSibling.Url;                
                //else if (SiteMap.CurrentNode.ParentNode.PreviousSibling != null)                
                //    PreviousLink.NavigateUrl = HttpUtility.HtmlDecode(SiteMap.CurrentNode.ParentNode.PreviousSibling.ChildNodes[SiteMap.CurrentNode.ParentNode.PreviousSibling.ChildNodes.Count - 1].Url);                
                //else                
                //    PreviousLink.CssClass += " disabled";                     
                
                LoadGalleryItems(); 
            }
        } // end of Page_Load - error occurs after this


I have commented out the navigation code as we don't need that but that shouldn't have any effect on the call to the imaging component. In fact the watermarking page references this same Main.master.cs and works without error.

In Visual Studio I am debugging by stepping through one line at a time and it errors right as it leaves the Page_Load event.
samreddy78  
#4 Posted : Thursday, September 18, 2014 8:48:16 AM(UTC)
samreddy78

Rank: Newbie

Groups: Guest
Joined: 8/12/2014(UTC)
Posts: 7

Fedor, could you please reply on this post. we did all our development in windows 7 and deployed in IIS7 in DEV server and we didn't face any issue.

now we need to deploy this in IIS6( windows server 2003) and same production as well. and when we run locally or deploy in windows server 2003 this issue happens.
our test and prod are same servers.

THIS IS THE ERROR:


Code:
External component has thrown an exception.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.SEHException: External component has thrown an exception.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[SEHException (0x80004005): External component has thrown an exception.]
   ImagingFramework.Drawing.AggFontRegistry.InitFromSystem(AggFontRegistry* ) +0
   Aurigma.GraphicsMill.AdvancedDrawing.InstalledFontRegistry..ctor() +84
   Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry..cctor() +39

[TypeInitializationException: The type initializer for 'Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry' threw an exception.]
   Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry.get_Installed() +0
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Configuration..ctor() +134
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Configuration.<.cctor>b__0() +39
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Singleton.SingletonFactory`1.GetInstance() +114
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Configuration.get_Instance() +30
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Canvas.OnPreRender(EventArgs e) +195
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeSt

Edited by moderator Friday, September 19, 2014 7:25:38 PM(UTC)  | Reason: Not specified

Eugene Kosmin  
#5 Posted : Friday, September 19, 2014 11:14:54 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Guest
Joined: 9/19/2006(UTC)
Posts: 505

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

Unfortunately forum's binding with out test cases system was broken for some time and we didn't get previous reply. Sorry.

The fix will be available with the next nuget package update (> 7.1.65) as soon as possible.

Best regards,
Eugene Kosmin
The Aurigma Development Team
Eugene Kosmin  
#6 Posted : Sunday, September 21, 2014 6:16:00 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Guest
Joined: 9/19/2006(UTC)
Posts: 505

Was thanked: 41 time(s) in 41 post(s)
The update is ready. Please download it from NuGet repository:

https://www.nuget.org/pa...a.GraphicsMill.Core.x86/

Edited by moderator Sunday, September 21, 2014 10:18:00 PM(UTC)  | Reason: Not specified

Best regards,
Eugene Kosmin
The Aurigma Development Team
samreddy78  
#7 Posted : Monday, September 22, 2014 10:06:10 AM(UTC)
samreddy78

Rank: Newbie

Groups: Guest
Joined: 8/12/2014(UTC)
Posts: 7

Thanks for the eply Kosmin.

I have downloaded the latest Graphics Mill Core (x86) 7.1.67 and installed it through Packet manager console and tried to run it locally in windows 2003 server.
Then the same issue is happening. This is not happening in windows 7 or IIS7.
this is only happening in windows server 2003 and in IIS6.

It is also happening with Aurigma samples project C:\Program Files\Aurigma\Graphics Mill 7 SDK\Samples\ASP.NET as well.
i have installed the latest latest Graphics Mill Core (x86) 7.1.67 which you provided for this sample project as well and when i tried to open the Combineimage.aspx it throws the following exception. Please have a look at it and let you know what we can do to fix this and deploy our applciation in win 2003 IIS6.

Code:
Server Error in '/' Application.

External component has thrown an exception.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.SEHException: External component has thrown an exception.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[SEHException (0x80004005): External component has thrown an exception.]
   ImagingFramework.Drawing.AggFontRegistry.InitFromSystem(AggFontRegistry* ) +0
   Aurigma.GraphicsMill.AdvancedDrawing.InstalledFontRegistry..ctor() +84
   Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry..cctor() +39

[TypeInitializationException: The type initializer for 'Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry' threw an exception.]
   Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry.get_Installed() +0
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Configuration..ctor() +129
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Configuration.<.cctor>b__0() +39
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Singleton.SingletonFactory`1.GetInstance() +106
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Configuration.get_Instance() +30
   Aurigma.GraphicsMill.AjaxControls.VectorObjects.Canvas.OnPreRender(EventArgs e) +195
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

Edited by moderator Tuesday, September 23, 2014 2:34:28 AM(UTC)  | Reason: Not specified

Fedor  
#8 Posted : Tuesday, September 23, 2014 2:22:57 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Hi samreddy78,

We need to check whether the recent version of Graphics Mill is actually used.

Could you build the attached project and run the binaries on the target machine?

Please post a console output.

Best regards,
Fedor Skvortsov

Edited by user Tuesday, September 23, 2014 2:26:44 AM(UTC)  | Reason: Not specified

File Attachment(s):
CheckVersion.zip (4kb) downloaded 15 time(s).
Best regards,
Fedor Skvortsov
samreddy78  
#9 Posted : Tuesday, September 23, 2014 8:02:52 AM(UTC)
samreddy78

Rank: Newbie

Groups: Guest
Joined: 8/12/2014(UTC)
Posts: 7

Hello Fedor, thanks for the reply and below is the update.

I tried to run the checkversion console applciation in in target machine win 2003 server, as 4.5 not supported on 2003 ,i changed the target framework to 4 and i installed Aurigma 7.1.67.400
through Nuget Packet Manager Coinsole.PM> Install-Package Aurigma.GraphicsMill.Core.x86.

Please find the attached screen shot for the error i got when i ran the application.
Also i ran the application on windows 2007 i got the same error
File Attachment(s):
Error_page.bmp (3,841kb) downloaded 14 time(s).
Fedor  
#10 Posted : Tuesday, September 23, 2014 7:42:43 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Please specify "Platform target" explicitly to x86 and try again. It seems the incorrect type of library is loaded.
Best regards,
Fedor Skvortsov
samreddy78  
#11 Posted : Wednesday, September 24, 2014 7:14:06 AM(UTC)
samreddy78

Rank: Newbie

Groups: Guest
Joined: 8/12/2014(UTC)
Posts: 7

Fedor thanks for being patience with US. Please see the results we got.

We made sure Platform target is X86 and tried again. its the same error as yesterday
and also to make sure the difference i tried with both the dlls and shared the screenshots with you.
this is where old dll is throwing the exception a
Aurigma.GraphicsMill.AdvancedDrawing.Font f = bitmapv.GetAdvancedGraphics().CreateFont("Arial", "Bold", 14f);

nd new dll is throwing "A procedure imported by 'Aurigma.GraphicsMill.dll' could not be loaded."

please have a look at it and let us know what else we can do.
File Attachment(s):
7-1-67-400_dll.bmp (3,841kb) downloaded 12 time(s).
70-0-28-383_dll.bmp (3,841kb) downloaded 10 time(s).
Fedor  
#12 Posted : Wednesday, September 24, 2014 7:40:24 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Hi samreddy78,

Graphics Mill 7.1 is build using Visual Studio 2013. It seems that's why you receive the error with the new binaries.

So please install Visual C++ Redistributable Packages for Visual Studio 2013 and try to run again.
Best regards,
Fedor Skvortsov
samreddy78  
#13 Posted : Wednesday, September 24, 2014 8:16:21 AM(UTC)
samreddy78

Rank: Newbie

Groups: Guest
Joined: 8/12/2014(UTC)
Posts: 7

Fedor , thanks for the quick reply,

I have just now installed Visual C++ Redistributable Packages for Visual Studio 2013( actually it was already installed in our server, uninstalled and installed again)
and restarted the visual studio, and removed all C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\ files as well. But no luck same error again "A procedure imported by 'Aurigma.GraphicsMill.dll' could not be loaded."
Fedor  
#14 Posted : Thursday, September 25, 2014 8:18:33 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Our engineers have found the reason of the problem, however haven't fixed it yet.

I will keep you posted on the progress.
Best regards,
Fedor Skvortsov
samreddy78  
#15 Posted : Thursday, September 25, 2014 8:30:55 AM(UTC)
samreddy78

Rank: Newbie

Groups: Guest
Joined: 8/12/2014(UTC)
Posts: 7

Thank you Fedor, will be waiting for the solution.
Fedor  
#16 Posted : Friday, September 26, 2014 4:38:50 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Here are the result of our research:

- Graphics Mill 7.1 uses the new Visual C++ runtime.
- The version for .NET 4.0 uses the new functions of Windows API and can not run on Windows XP/2003
- The version for .NET 3.5 uses the old functions of Windows API and can run on Windows XP/2003

So you should either use assemblies for .NET 3.5 or deploy on Windows 2008/Vista or later.

To downgrade to .NET 3.5 you need to change the target platform and reinstall the NuGet package of Graphics Mill.

Code:
Uninstall-Package Aurigma.GraphicsMill.Core.x86
Install-Package Aurigma.GraphicsMill.Core.x86


The package contains libraries for both .NET 3.5 and 4.0.

Please let me know if this option doesn't fit your needs.
Best regards,
Fedor Skvortsov
samreddy78  
#17 Posted : Friday, September 26, 2014 6:24:30 AM(UTC)
samreddy78

Rank: Newbie

Groups: Guest
Joined: 8/12/2014(UTC)
Posts: 7

Thanks for the reply Fedor,

I changed target framework to 3.5, uninstalled and installed Aurigma.GraphicsMill.Core.x86 and ran the application. Please see the attached screenshot. Looks like it worked when we changed the target frame work, now we need to check how can we change our project framework.
File Attachment(s):
worked.bmp (3,841kb) downloaded 13 time(s).
Fedor  
#18 Posted : Friday, September 26, 2014 7:50:09 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
The attached screenshot shows that you use the correct version of Graphics Mill and the original problem should be fixed.

Please let me whether you need any further assistance.
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.