PostSharp terminates due to StackOverflow

Questions about integration in Visual Studio, MSBuild or other IDEs or build tools.

PostSharp terminates due to StackOverflow

Postby GrahamMcDonald on Wed Aug 27, 2008 4:24 pm

Hi everyone

I have a project that goes into an infinite loop while PostSharp is running. The output I get is:

PostSharp 1.0 [1.0.10.403] - Copyright (c) Gael Fraiteur, 2005-2008.

info PS0092: Unexpected error during auto-update check: The remote server returned an error: (407) Proxy Authentication Required.

Process is terminated due to StackOverflowException.
C:\Program Files (x86)\PostSharp 1.0\PostSharp-1.0.targets(255,5): error : The PostSharp build step failed (exit code -2147023895). See previous errors or the build log for details.
Done building project "FileStructureService.csproj" -- FAILED.

On other C# solutions on the same machine using PostSharp this does not occur. I am sure this is trivial to fix, but is currently beyond my skill with PostSharp.

Thanks in advance
Graham J McDonald
GrahamMcDonald
 
Posts: 2
Joined: Fri Aug 22, 2008 10:03 am
First Name: Graham
Last Name: J McDonald
Company: MAN Investments

Re: PostSharp terminates due to StackOverflow

Postby gfraiteur on Wed Aug 27, 2008 4:38 pm

Graham,

Please build your project using the command line:

Code: Select all
msbuild /p:PostSharpAttachDebugger=true


The debugger should break at the exception. Please copy the call stack and paste it here.

Thanks,

-gael
Gael Fraiteur, project leader
gfraiteur
Site Admin
 
Posts: 834
Joined: Tue Dec 18, 2007 3:09 pm
First Name: Gael
Last Name: Fraiteur
Company: postsharp.org

Re: PostSharp terminates due to StackOverflow

Postby GrahamMcDonald on Wed Aug 27, 2008 6:32 pm

Gael,

The problem was a recursive call in the aspect code. The debugger tip pushed me in the right direction. I was just surprised to see that code in the aspect was really getting executed at compile time. Increased my knowledge 100% :D

Thanks,
Graham J McDonald
GrahamMcDonald
 
Posts: 2
Joined: Fri Aug 22, 2008 10:03 am
First Name: Graham
Last Name: J McDonald
Company: MAN Investments

Re: PostSharp terminates due to StackOverflow

Postby gfraiteur on Wed Aug 27, 2008 8:06 pm

I suspected it ;)
Gael Fraiteur, project leader
gfraiteur
Site Admin
 
Posts: 834
Joined: Tue Dec 18, 2007 3:09 pm
First Name: Gael
Last Name: Fraiteur
Company: postsharp.org


Return to Integration with IDE and Build Scripts