Am 06.06.2014 02:23, schrieb Darius Clark:
Hi,
I am having a issue currently with getting segfaults when attempting to access sessions.
The current code is
class AuthenicateService{ private SessionVar!(AuthSess, "AuthSess") authSess; @path("/login") @method(HTTPMethod.GET) void GetLogin(){ auto auth = authSess; if(auth.isValid) //segfault redirect("/dashboard"); render!("login.index.jade", auth); } }
I do not know why it does this. In the example, there is no segfault and it points to the line thats currently commented. The other way would just adding the param for the sessions directly.
Do you have a HTTPServerSettings.sessionStore
set? The strange thing
is though that there should be an assertion error message in that case,
so if this is not the reason, can you try to get full a stack trace by
running it inside GDB?
Or is AuthSess
a class type and maybe still initialized to null
?