Stackoverflow Exception in drawing

Stimulsoft Reports.WEB discussion
Post Reply
hfirst
Posts: 25
Joined: Mon Apr 20, 2015 2:11 pm

Stackoverflow Exception in drawing

Post by hfirst »

2015.3

Code works on Win 7 and Server 2012. On a windows 10 machine, on the very first 'new StiReport()', it blows up with a StackOverflowException in drawing.

Also, we purchased source code license and I am trying to compile source code to try and figure out issue, but I can't compile source on win 7. It did auto fetch json via nuget but it's still complaining with:

Error 11 This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is D:\Stimulsoft\Stimulsoft-Reports-Web-2015.3-Source-Code\Net\\.nuget\NuGet.targets. D:\Stimulsoft\Stimulsoft-Reports-Web-2015.3-Source-Code\Net\Stimulsoft.Report.Mvc\Stimulsoft.Report.Mvc.csproj 776 5 Stimulsoft.Report.Mvc


Any ideas on the 2 issues?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Stackoverflow Exception in drawing

Post by Vladimir »

Hello,
Code works on Win 7 and Server 2012. On a windows 10 machine, on the very first 'new StiReport()', it blows up with a StackOverflowException in drawing.
Please send us the full error stack. Also please specify whether you use our libraries or source code?
Also, we purchased source code license and I am trying to compile source code to try and figure out issue, but I can't compile source on win 7. It did auto fetch json via nuget but it's still complaining with:
We do not use NuGet in our source code.
Please let us know what version of Visual Studio you open the source codes? Also just try to follow the instructions NuGet - enable NuGet Package Restore.

Thank you.
ddrake
Posts: 2
Joined: Tue Jan 12, 2016 1:52 pm

Re: Stackoverflow Exception in drawing

Post by ddrake »

I am having the exact same problem. I am using the 2015.3 libraries as I did not purchase the license that includes the source code. Everything works fine while I am debugging in Visual Studio 2013. When I publish the application to my file system and host it via IIS on my Windows 10 machine, I get the error on the first StiReport call and I get a prompt to debug the error. Here's the stack trace copied out of Visual Studio:

[Managed to Native Transition]
System.Drawing.dll!System.Drawing.Printing.PrinterSettings.GetDefaultPrinterName() Unknown
System.Drawing.dll!System.Drawing.Printing.PrinterSettings.PrinterName.get() Unknown
System.Drawing.dll!System.Drawing.Printing.PrinterSettings.Get_PaperSizes() Unknown
Stimulsoft.Report.dll!Stimulsoft.Report.Components.StiPageHelper.GetPaperSizeFromPaperKind(System.Drawing.Printing.PaperKind paperKind) Unknown
Stimulsoft.Report.dll!Stimulsoft.Report.Components.StiPage.PaperSize.set(System.Drawing.Printing.PaperKind value) Unknown
Stimulsoft.Report.dll!Stimulsoft.Report.StiReport.StiReport() Unknown
> Banking.MVC.dll!Banking.MVC.Areas.Reports.Controllers.StimulsoftController.GetReportTemplate(int? id, string category) Line 55 C#
[Lightweight Function]
System.Web.Mvc.dll!System.Web.Mvc.ReflectedActionDescriptor.Execute(System.Web.Mvc.ControllerContext controllerContext, System.Collections.Generic.IDictionary<string,object> parameters) Unknown
System.Web.Mvc.dll!System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionDescriptor actionDescriptor, System.Collections.Generic.IDictionary<string,object> parameters) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeSynchronousActionMethod.AnonymousMethod__41() Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(System.IAsyncResult asyncResult) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters.AnonymousMethod__33() Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously.AnonymousMethod__49() Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously.AnonymousMethod__49() Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(System.IAsyncResult asyncResult) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction.AnonymousMethod__20() Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction.AnonymousMethod__22(System.IAsyncResult asyncResult) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(System.IAsyncResult asyncResult) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Controller.BeginExecuteCore.AnonymousMethod__18(System.IAsyncResult asyncResult) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncResultWrapper.MakeVoidDelegate.AnonymousMethod__3(System.IAsyncResult ar) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Controller.EndExecuteCore(System.IAsyncResult asyncResult) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncResultWrapper.MakeVoidDelegate.AnonymousMethod__3(System.IAsyncResult ar) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Controller.EndExecute(System.IAsyncResult asyncResult) Unknown
System.Web.Mvc.dll!System.Web.Mvc.MvcHandler.BeginProcessRequest.AnonymousMethod__3(System.IAsyncResult asyncResult) Unknown
System.Web.Mvc.dll!System.Web.Mvc.Async.AsyncResultWrapper.MakeVoidDelegate.AnonymousMethod__3(System.IAsyncResult ar) Unknown
System.Web.Mvc.dll!System.Web.Mvc.MvcHandler.EndProcessRequest(System.IAsyncResult asyncResult) Unknown
System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() Unknown
System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously) Unknown
System.Web.dll!System.Web.HttpApplication.PipelineStepManager.ResumeSteps(System.Exception error) Unknown
System.Web.dll!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext context, System.AsyncCallback cb) Unknown
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest wr, System.Web.HttpContext context) Unknown
System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) Unknown
System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) Unknown
[AppDomain Transition]
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Stackoverflow Exception in drawing

Post by HighAley »

Hello.

Do you have any printer installed in the system?
Please, try to set next static option:

StiOptions.Print.AllowUsePaperSizesFromPrinterSettings = false;

Thank you.
ddrake
Posts: 2
Joined: Tue Jan 12, 2016 1:52 pm

Re: Stackoverflow Exception in drawing

Post by ddrake »

I do have a default printer installed. Setting AllowUsePaperSizesFromPrinterSettings to false fixed the issue in the hosted app.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Stackoverflow Exception in drawing

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.
hfirst
Posts: 25
Joined: Mon Apr 20, 2015 2:11 pm

Re: Stackoverflow Exception in drawing

Post by hfirst »

Vladimir wrote:Please send us the full error stack. Also please specify whether you use our libraries or source code?
I was using your libraries. The exception wasn't giving me any stacktrace or ability to debug, so I tried switching to the source code version to see if I could get more info.
We do not use NuGet in our source code.
Please let us know what version of Visual Studio you open the source codes? Also just try to follow the instructions NuGet - enable NuGet Package Restore.
I use Visual Studio 2013. There are some nuget refences in some of your csproj. First time I tried to compile, my vs downloaded newtonsoft.json. I had to remove them from 2 of your csproj. Then it complained about oracle and I used nuget to get dotConnect.Express.for.Oracle package. Finally it compiled. However, it still wouldn't give me a stacktrace on the exception even with the pdb files!
hfirst
Posts: 25
Joined: Mon Apr 20, 2015 2:11 pm

Re: Stackoverflow Exception in drawing

Post by hfirst »

HighAley wrote:Hello.

Do you have any printer installed in the system?
Please, try to set next static option:

StiOptions.Print.AllowUsePaperSizesFromPrinterSettings = false;
I also have a default printer, but the above suggestion solved the problem.

What are the implications of having to set that and why?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Stackoverflow Exception in drawing

Post by HighAley »

Hello.

Sorry, for this issue.
We have found an issue with NuGet on our side.
We have made an improvement and uploaded fixed source code.
Please, check it and let us know about results.

Thank you.
Post Reply