On Mar 12, 2019, at 12:10 AM, Hermann Calabria <herm...@ivouch.com> wrote:
> 
> if I restart (perl ./bin/app.pl) and repeat exactly what I was doing prior to 
> the crash, it usually works just fine.

Are you using a persistent Session store?  If so, and emptying it between 
stopping and restarting the app now makes the symptom reproducible, you know 
the problem is due to data cached in the Session object.

In that case, I’d guess you’ve put “undef” into a variable and are now trying 
to use it in a context where a defined value is expected.

This includes the Dancer::Session::Cookie option: if you’re using that and fail 
to toss the browser’s cookies between tests, you aren’t starting from a fresh 
state.

*Something* must be persisting between app runs to cause it to have differing 
behavior from one run to the next, so if it isn’t the Session/Cookie, then it’d 
have to be your app’s backing data store, whatever that is.

If chasing all of the persistence layers in your app doesn’t bring you to a 
solution, I’d start removing large chunks of code until the problem went away, 
then perform a binary search on the last chunk removed to pare the problem down 
to a single line.

> Is this a known problem?

When chasing problems in a widely-used infrastructure component like this, 
always suspect your own code first.
_______________________________________________
dancer-users mailing list
dancer-users@dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to