We've come to a point where our report doesn't work anymore because of a StackOverflow exception when rendering the report from code.
The problem seems to be from how the report code is contstructed. The 'InitializeComponent' code is splitted by StimulReports over different 'InitializeComponent2', 'InitializeComponent3', ... methods. In our report, the code has 66 of this InitializeComponent methods. From somewhere around the 40th InitializeComponent, we get the stackoverflow exception.
This is because StimulReports calls each InitializeComponent method from within another one. So InitializeComponent calls InitializeComponent2, which in turn calls InitializeComponent3, etc. This creates a large call stack which gives us eventually the stackoverflow exception.
The workaround for now is to modify the generated code so it looks like this:
public Report()
{
this.InitializeComponent();
this.InitializeComponent2();
this.InitializeComponent3();
this.InitializeComponent4();
...
this.InitializeComponent66();
}
This is a problem since we always have to modify the code when changes need to be published, and we need to add new code and provide a new software build to our clients, which is nearly impossible because our reports
may change several times a week.
The problem started to occur since we switched from .NET framework 4 to 4.5. Probably since version 4.5 more information is added to the stack so there is less space for nested calls.
Is there any workaround you can suggest or can this issue be addressed in future release?
Stackoverflow exception when creating report
Re: Stackoverflow exception when creating report
Hello.
The issue is fixed.
We have applied your suggestions with some changes.
But we can't understand we this error was occurred. 40 method is not so much for the stack.
Do you have any assumption?
Thank you.
The issue is fixed.
We have applied your suggestions with some changes.
But we can't understand we this error was occurred. 40 method is not so much for the stack.
Do you have any assumption?
Thank you.
Re: Stackoverflow exception when creating report
Hi
We are facing the same problem. When will the prerelease build be available for this issue?
thx
We are facing the same problem. When will the prerelease build be available for this issue?
thx
Using Stimulsoft since 2007
Re: Stackoverflow exception when creating report
Hello,
The next prerelease build will be available on this week.
Thank you.
The next prerelease build will be available on this week.
Thank you.