RejectedSoftware Forums

Sign up

NullPointerError in session.d:77

As I understand, any null pointer access inside of library is a bug, isn't it?

etc.linux.memoryerror.NullPointerError@src/etc/linux/memoryerror.d(325)
----------------
??:? void etc.linux.memoryerror.sigsegvUserspaceProcess(void*) [0xd528e5]
??:? void etc.linux.memoryerror.sigsegvDataHandler() [0xd52832]
../../.dub/packages/vibe-d-0.7.30/vibe-d/source/vibe/http/session.d:77 bool vibe.http.session.Session.isKeySet(immutable(char)[]) [0xc43eb8]
source/vcm/SessionMessages.d:23 immutable(char)[][] vcm.sessionMessages.SessionMessages.get() [0xad0c5a]
../../.dub/packages/diet-ng-1.1.1/diet-ng/source/diet/html.d:82 void diet.html.compileHTMLDietFile!("page.dt", _D3vcm4page4base9basicHtml56__T13BasicHtmlPageTC3vcm4page4base7bouncer11ForAllUsersZ13BasicHtmlPage8doRenderMFZ7contentDFZv, _D3vcm4page4base9basicHtml56__T13BasicHtmlPageTC3vcm4page4base7bouncer11ForAllUsersZ13BasicHtmlPage8doRenderMFZ9json_dataAya, _D3vcm4page4base9basicHtml56__T13BasicHtmlPageTC3vcm4page4base7bouncer11ForAllUsersZ13BasicHtmlPage8doRenderMFZ4pageC3vcm4page4base9basicHtml56__T13BasicHtmlPageTC3vcm4page4base7bouncer11ForAllUsersZ13BasicHtmlPage).exec!(vibe.stream.wrapper.StreamOutputRange*).exec(ref vibe.stream.wrapper.StreamOutputRange*) [0xb36841]

Re: NullPointerError in session.d:77

On Tue, 17 Jan 2017 04:51:45 GMT, Alexey Kulentsov wrote:

As I understand, any null pointer access inside of library is a bug, isn't it?

I'm not sure about that.

As for a solution to your problem, have you created a session store?

Re: NullPointerError in session.d:77

On Tue, 17 Jan 2017 21:01:58 GMT, Rene Zwanenburg wrote:

On Tue, 17 Jan 2017 04:51:45 GMT, Alexey Kulentsov wrote:

As I understand, any null pointer access inside of library is a bug, isn't it?

I'm not sure about that.

As for a solution to your problem, have you created a session store?

Thank you, I solved this problem, but it is not what I wrote about. Even if I can't call the method at this moment, I expect to see some readable exception like "Session is not started, you can't call isKeySet()", not things like the null pointer exception and segmentation fault.