WF Designer re-hosting System.StackOverflowException

I need help with re-hosted designer of WF4. It should be used for design very complex workflow but there is limit of the nested activities. (It's around 40th nested activities in one branch). If is that limit exceeded, an System.StackOverflowException occurred in PresentationCore.dll.

Is there any way, how to increase limit for System.StackOverflowException?

Here is the code example for download. After building and executing application, move the scrollbars to last activity with number 40 and exception should occur.


I can run it without error and scroll to the very bottom - though it does get a bit slow - (64 bit machine, 16 gb memory).

You can allocate stack size on creation of a new thread, but I don't know how you could change the size for the default UI thread in your application...and if you can I'm not sure it'd be a good idea.

Besides, increasing the limit is only hiding the overall issue - which is why you need this in the first place - is anyone really going to nest 40 layers of complexity in a workflow? It would be completely unwieldy and incredibly difficult to support. Couldn't the logic be split into sub workflows, etc?

I solved the problem by increasing the size of the stack by using utility EDITBIN from VisualStudio

editbin /STACK:6291456 "WpfApplication1.exe"

Unfortunately it doesn't work in VisualStudio by adding into Post-Build section in project properties. So I'd created the bat file, which is necessary to execute after build.

Need Your Help

How to iterate from first row of excel and try to login and then again iterate to second row and try to login again using Selenium with POI?

java selenium apache-poi

My scenario is I have an excel with three rows and two columns. First Column is User Name and second column is Password and under which three rows with some data exists.

How to retrieve wishlists and carts of a user from Ebay?

ebay ebay-lms

How do I retrieve the items from wishlists and carts in Ebay?