scottoffen / grapevine

Fast, unopinionated, embeddable, minimalist web framework for .NET
https://scottoffen.github.io/grapevine/
MIT License
103 stars 16 forks source link

StackOverflowException when running Readme sample code #72

Closed Hyrius closed 3 years ago

Hyrius commented 3 years ago

I can start the server and even get the correct response (using Mozilla Firefox), but right after receiving it, the server just crashes. I'm not exactly sure what I'm doing wrong and Google hasn't helped, sorry.

image

trce: Grapevine.IRouteScanner[0] Begin Global Route Scanning trce: Grapevine.IRouteScanner[0] Generated route Grapevine.Route`1[MainServer.MyResource] trce: Grapevine.IRouteScanner[0] Scan of method Test complete: 1 total routes found trce: Grapevine.IRouteScanner[0] Scan of type MyResource complete: 1 total routes found trce: Grapevine.IRouteScanner[0] Global Route Scanning Complete: 1 total routes found trce: Grapevine.IRestServer[0] c29054bd-64b1-4891-8350-ade2a69cca22 : Request Received Get /api/test trce: Grapevine.IRestServer[0] c29054bd-64b1-4891-8350-ade2a69cca22 : Invoking OnRequest Handlers for Get /api/test trce: Grapevine.IRestServer[0] c29054bd-64b1-4891-8350-ade2a69cca22 : OnRequest Handlers Invoked for Get /api/test trce: Grapevine.IRestServer[0] c29054bd-64b1-4891-8350-ade2a69cca22 : Routing request Get /api/test dbug: Grapevine.IRouter[0] c29054bd-64b1-4891-8350-ade2a69cca22 : Routing Get /api/test dbug: Grapevine.IRouter[0] c29054bd-64b1-4891-8350-ade2a69cca22 : Matching routes discovered for Get /api/test trce: Grapevine.IRouter[0] c29054bd-64b1-4891-8350-ade2a69cca22 : Invoking before routing handlers for Get /api/test trce: Grapevine.IRouter[0] c29054bd-64b1-4891-8350-ade2a69cca22 : Before routing handlers invoked for Get /api/test dbug: Grapevine.IRouter[0] c29054bd-64b1-4891-8350-ade2a69cca22 : Executing MyResource.Test for Get /api/test dbug: Grapevine.IRouter[0] c29054bd-64b1-4891-8350-ade2a69cca22 : 1 of 1 routes invoked trce: Grapevine.IRouter[0] c29054bd-64b1-4891-8350-ade2a69cca22 : Invoking after routing handlers for Get /api/test trce: Grapevine.IRouter[0] c29054bd-64b1-4891-8350-ade2a69cca22 : After routing handlers invoked for Get /api/test trce: Grapevine.IRestServer[0] 514cd167-113e-44ee-b52f-9fd95b1c3bb5 : Request Received Get /favicon.ico trce: Grapevine.IRestServer[0] 514cd167-113e-44ee-b52f-9fd95b1c3bb5 : Invoking OnRequest Handlers for Get /favicon.ico trce: Grapevine.IRestServer[0] 514cd167-113e-44ee-b52f-9fd95b1c3bb5 : OnRequest Handlers Invoked for Get /favicon.ico trce: Grapevine.IRestServer[0] 514cd167-113e-44ee-b52f-9fd95b1c3bb5 : Routing request Get /favicon.ico dbug: Grapevine.IRouter[0] 514cd167-113e-44ee-b52f-9fd95b1c3bb5 : Routing Get /favicon.ico

Process is terminated due to StackOverflowException. An unhandled exception of type 'System.StackOverflowException' occurred in Grapevine.dll

ElegantCrab commented 3 years ago

This issue also happened to me and it's an issue they fixed in the last iteration of their code but it is not fixed in the package that's on the NuGet right now.

I'd suggest you download this repository and make a .nupkg of Grapevine and Grapeseed then add it manually to your project. This is how you can solve it.

Hyrius commented 3 years ago

Thanks for the tip! I'll definitely try it out ASAP.

scottoffen commented 3 years ago

Huh, you're right. I'll publish a new package this weekend with this fix in it. I thought I already had. Sorry about that!

scottoffen commented 3 years ago

New package 5.0.0-rc.8 uploaded with fix.